The Ninth Circuit has held that the consular nonreviewability doctrine does not impact a federal court's subject matter jurisdiction to hear a challenge to a visa denial. The court concluded, however, that the APA provides no avenue for review of a consular officer’s adjudication of a visa on the merits. The consular officer need only provide a facially legitimate and bona fide reasons for rejecting a visa application.
The full text of Allen v. Milas can be found here:
http://cdn.ca9.uscourts.gov/datastore/opinions/2018/07/24/16-15728.pdf