@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api DFlight API
@base https://dflight-api.ljaero.com/
@version V 1.0.0
@auth ApiKey x-api-key in header
@common_fields {x-api-key: str}
@endpoints 24
@hint download_for_search
@toc us(24)

@endpoint POST /us/v1/airspace/distance-query
@desc Retrieve all requested types of airspace located within given distance of location.
@required {longitude: any, latitude: any, distance: any, asptypes: [str]}
@returns(200) {found: [map]} # A list of GeoJSON FeatureCollections, one for each Airspace type requested.
@errors {422: Validation Error}

@endpoint POST /us/v1/airspace/route-query
@desc Retrieve all requested types of airspace traversed by route.
@required {route: map, asptypes: [str]}
@returns(200) {found: [map]} # A list of GeoJSON FeatureCollections, one for each Airspace type requested.
@errors {422: Validation Error}

@endpoint POST /us/v1/airspace/polygon-query
@desc Retrieve all requested types of airspace located within given GeoJSON Polygon.
@required {poly: map, asptypes: [str]}
@returns(200) {found: [map]} # A list of GeoJSON FeatureCollections, one for each Airspace type requested.
@errors {422: Validation Error}

@endpoint POST /us/v1/wx-forecast/distance-query
@desc Retrieve forecast values within given distance of location for all requested weather elements and time periods.
@required {longitude: any, latitude: any, distance: any, wxtypes: [str], hours: int}
@returns(200) {found: map} # A GeoJSON FeatureCollection with one Feature for each forecast location found within requested area.
@errors {422: Validation Error}

@endpoint POST /us/v1/wx-forecast/route-query
@desc Retrieve forecast values along a route for all requested weather elements and time periods.
@required {route: map, wxtypes: [str], hours: int}
@returns(200) {found: map} # A GeoJSON FeatureCollection with one Feature for each forecast location found within requested area.
@errors {422: Validation Error}

@endpoint POST /us/v1/wx-forecast/polygon-query
@desc Retrieve forecast values within given GeoJSON polygon for all requested weather elements and time periods.
@required {poly: map, wxtypes: [str], hours: int}
@returns(200) {found: map} # A GeoJSON FeatureCollection with one Feature for each forecast location found within requested area.
@errors {422: Validation Error}

@endpoint POST /us/v1/restrictions/distance-query
@desc Retrieve flight restrictions applicable within given distance of location.
@required {longitude: any, latitude: any, distance: any}
@returns(200) {found: map} # A GeoJSON FeatureCollection, one Feature for each restriction.
@errors {422: Validation Error}

@endpoint POST /us/v1/restrictions/route-query
@desc Retrieve flight restrictions applicable along route.
@required {route: map}
@returns(200) {found: map} # A GeoJSON FeatureCollection, one Feature for each restriction.
@errors {422: Validation Error}

@endpoint POST /us/v1/restrictions/polygon-query
@desc Retrieve flight restrictions applicable within given area.
@required {poly: map}
@returns(200) {found: map} # A GeoJSON FeatureCollection, one Feature for each restriction.
@errors {422: Validation Error}

@endpoint POST /us/v1/ssa/distance-query
@desc Retrieve all special security areas located within given distance of location.
@required {longitude: any, latitude: any, distance: any}
@returns(200) {found: map} # A GeoJSON FeatureCollection, one Feature for each area found.
@errors {422: Validation Error}

@endpoint POST /us/v1/ssa/route-query
@desc Retrieve all special security areas traversed by route.
@required {route: map}
@returns(200) {found: map} # A GeoJSON FeatureCollection, one Feature for each area found.
@errors {422: Validation Error}

@endpoint POST /us/v1/ssa/polygon-query
@desc Retrieve all special security areas located within given GeoJSON Polygon.
@required {poly: map}
@returns(200) {found: map} # A GeoJSON FeatureCollection, one Feature for each area found.
@errors {422: Validation Error}

@endpoint POST /us/v1/venues/distance-query
@desc Retrieve all restricted public venues located within given distance of location.
@required {longitude: any, latitude: any, distance: any}
@returns(200) {found: map} # A GeoJSON FeatureCollection, one Feature for each venue found.
@errors {422: Validation Error}

@endpoint POST /us/v1/venues/route-query
@desc Retrieve all restricted public venues traversed by route.
@required {route: map}
@returns(200) {found: map} # A GeoJSON FeatureCollection, one Feature for each venue found.
@errors {422: Validation Error}

@endpoint POST /us/v1/venues/polygon-query
@desc Retrieve all restricted public venues located within given GeoJSON Polygon.
@required {poly: map}
@returns(200) {found: map} # A GeoJSON FeatureCollection, one Feature for each venue found.
@errors {422: Validation Error}

@endpoint POST /us/v1/obstacles/distance-query
@desc Retrieve obstacles within given distance of location.
@required {longitude: any, latitude: any, distance: any}
@returns(200) {found: map} # A GeoJSON FeatureCollection, one Feature for each obstacle found.
@errors {422: Validation Error}

@endpoint POST /us/v1/obstacles/route-query
@desc Retrieve obstacles found along a route.
@required {route: map}
@returns(200) {found: map} # A GeoJSON FeatureCollection, one Feature for each obstacle found.
@errors {422: Validation Error}

@endpoint POST /us/v1/obstacles/polygon-query
@desc Retrieve obstacles located within given area.
@required {poly: map}
@returns(200) {found: map} # A GeoJSON FeatureCollection, one Feature for each obstacle found.
@errors {422: Validation Error}

@endpoint POST /us/v1/uoa/distance-query
@desc Retrieve UAS Operating Areas (UOAs) found within given distance of location.
@required {longitude: any, latitude: any, distance: any}
@returns(200) {found: map} # A GeoJSON FeatureCollection, one Feature for each UOA.
@errors {422: Validation Error}

@endpoint POST /us/v1/uoa/route-query
@desc Retrieve UAS Operating Areas (UOAs) found along route.
@required {route: map}
@returns(200) {found: map} # A GeoJSON FeatureCollection, one Feature for each UOA.
@errors {422: Validation Error}

@endpoint POST /us/v1/uoa/polygon-query
@desc Retrieve UAS Operating Areas (UOAs) found within given area.
@required {poly: map}
@returns(200) {found: map} # A GeoJSON FeatureCollection, one Feature for each UOA.
@errors {422: Validation Error}

@endpoint POST /us/v1/aerodromes/distance-query
@desc Retrieve aerodromes within given distance of location.
@required {longitude: any, latitude: any, distance: any}
@returns(200) {found: map} # A GeoJSON FeatureCollection, one Feature for each aerodrome found.
@errors {422: Validation Error}

@endpoint POST /us/v1/aerodromes/route-query
@desc Retrieve aerodromes found along a route.
@required {route: map}
@returns(200) {found: map} # A GeoJSON FeatureCollection, one Feature for each aerodrome found.
@errors {422: Validation Error}

@endpoint POST /us/v1/aerodromes/polygon-query
@desc Retrieve aerodromes located within given area.
@required {poly: map}
@returns(200) {found: map} # A GeoJSON FeatureCollection, one Feature for each aerodrome found.
@errors {422: Validation Error}

@end
