{"openapi":"3.1.0","info":{"title":"AKAD Aviation Data Hub","description":"Independent aviation data service. Sandbox data is explicitly labeled. Cookie + CSRF admin; X-API-Key REST clients.","version":"1.0.0"},"paths":{"/api/v1/access":{"get":{"summary":"Access Info","operationId":"access_info_api_v1_access_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]}]}},"/":{"get":{"summary":"Home","operationId":"home__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/healthz":{"get":{"summary":"Health","operationId":"health_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/auth/login":{"post":{"summary":"Login","operationId":"login_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Login"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/me":{"get":{"summary":"Me","operationId":"me_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/auth/logout":{"post":{"summary":"Logout","operationId":"logout_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/admin/users":{"post":{"summary":"Add User","operationId":"add_user_admin_users_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/{resource}":{"get":{"summary":"Registry","operationId":"registry_admin__resource__get","parameters":[{"name":"resource","in":"path","required":true,"schema":{"type":"string","title":"Resource"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/airports":{"post":{"summary":"Airport","operationId":"airport_admin_airports_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Airport"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/sources/{ident}":{"put":{"summary":"Source","operationId":"source_admin_sources__ident__put","parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Ident"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Source"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/sources/{ident}/collect":{"post":{"summary":"Run","operationId":"run_admin_sources__ident__collect_post","parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Ident"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/sources/{ident}/import":{"post":{"summary":"Manual","operationId":"manual_admin_sources__ident__import_post","parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Ident"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Import"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/keys":{"post":{"summary":"Issue","operationId":"issue_admin_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Key"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/extractions":{"post":{"summary":"Extraction","operationId":"extraction_admin_extractions_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Extraction"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/extractions/{ident}/approve":{"post":{"summary":"Approve","operationId":"approve_admin_extractions__ident__approve_post","parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"integer","title":"Ident"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/keys/{ident}":{"delete":{"summary":"Revoke","operationId":"revoke_admin_keys__ident__delete","parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Ident"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/flights":{"get":{"summary":"Dashboard","operationId":"dashboard_dashboard_flights_get","parameters":[{"name":"airport","in":"query","required":false,"schema":{"type":"string","default":"EBL","title":"Airport"}},{"name":"include_synthetic","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Synthetic"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/{airport}/arrivals":{"get":{"summary":"Arrivals","operationId":"arrivals_api_v1__airport__arrivals_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"airport","in":"path","required":true,"schema":{"type":"string","title":"Airport"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"}},{"name":"include_synthetic","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Synthetic"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/{airport}/departures":{"get":{"summary":"Departures","operationId":"departures_api_v1__airport__departures_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"airport","in":"path","required":true,"schema":{"type":"string","title":"Airport"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"}},{"name":"include_synthetic","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Synthetic"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/{airport}/statistics":{"get":{"summary":"Stats","operationId":"stats_api_v1__airport__statistics_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"airport","in":"path","required":true,"schema":{"type":"string","title":"Airport"}},{"name":"include_synthetic","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Synthetic"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/flights/{ident}/status":{"get":{"summary":"Status","operationId":"status_api_v1_flights__ident__status_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"ident","in":"path","required":true,"schema":{"type":"string","title":"Ident"}},{"name":"include_synthetic","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Synthetic"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Airport":{"properties":{"iata":{"type":"string","pattern":"^[A-Z]{3}$","title":"Iata"},"icao":{"type":"string","pattern":"^[A-Z]{4}$","title":"Icao"},"name":{"type":"string","maxLength":150,"minLength":2,"title":"Name"},"timezone":{"type":"string","title":"Timezone"}},"additionalProperties":false,"type":"object","required":["iata","icao","name","timezone"],"title":"Airport"},"Extraction":{"properties":{"source":{"type":"string","title":"Source"},"rights_attestation":{"type":"string","maxLength":1000,"minLength":10,"title":"Rights Attestation"},"html":{"type":"string","maxLength":100000,"minLength":1,"title":"Html"}},"additionalProperties":false,"type":"object","required":["source","rights_attestation","html"],"title":"Extraction"},"Flight":{"properties":{"flight":{"type":"string","pattern":"^[A-Z0-9]{2,3}[0-9]{1,4}[A-Z]?$","title":"Flight"},"operating_flight":{"anyOf":[{"type":"string","pattern":"^[A-Z0-9]{2,3}[0-9]{1,4}[A-Z]?$"},{"type":"null"}],"title":"Operating Flight"},"direction":{"type":"string","enum":["arrival","departure"],"title":"Direction"},"counterpart":{"anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}],"title":"Counterpart"},"counterpart_name":{"anyOf":[{"type":"string","maxLength":150},{"type":"null"}],"title":"Counterpart Name"},"raw_status":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Raw Status"},"source_updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Updated At"},"time_basis":{"anyOf":[{"type":"string","maxLength":250},{"type":"null"}],"title":"Time Basis"},"scheduled":{"type":"string","title":"Scheduled"},"estimated":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Estimated"},"actual":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actual"},"status":{"type":"string","enum":["scheduled","boarding","gate_closed","en_route","departed","landed","delayed","cancelled","diverted","unknown"],"title":"Status"},"gate":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Gate"}},"additionalProperties":false,"type":"object","required":["flight","direction","scheduled","status"],"title":"Flight"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Import":{"properties":{"rights_attestation":{"type":"string","maxLength":1000,"minLength":10,"title":"Rights Attestation"},"rows":{"items":{"$ref":"#/components/schemas/Flight"},"type":"array","maxItems":2000,"title":"Rows"}},"additionalProperties":false,"type":"object","required":["rights_attestation","rows"],"title":"Import"},"Key":{"properties":{"label":{"type":"string","maxLength":100,"minLength":1,"title":"Label"},"allow_research":{"type":"boolean","title":"Allow Research","default":false},"days":{"anyOf":[{"type":"integer","maximum":365.0,"minimum":1.0},{"type":"null"}],"title":"Days","default":30},"all_airports":{"type":"boolean","title":"All Airports","default":false},"airports":{"items":{"type":"string"},"type":"array","maxItems":100,"minItems":1,"title":"Airports"}},"additionalProperties":false,"type":"object","required":["label"],"title":"Key"},"Login":{"properties":{"username":{"type":"string","maxLength":100,"title":"Username"},"password":{"type":"string","maxLength":256,"title":"Password"}},"additionalProperties":false,"type":"object","required":["username","password"],"title":"Login"},"Source":{"properties":{"airport":{"type":"string","pattern":"^[A-Z]{3}$","title":"Airport"},"kind":{"type":"string","enum":["manual","fixture","html","api"],"title":"Kind"},"adapter":{"type":"string","enum":["generic","ebl-board"],"title":"Adapter","default":"generic"},"date_offset":{"type":"integer","maximum":1.0,"minimum":0.0,"title":"Date Offset","default":0},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"credential_env":{"anyOf":[{"type":"string","pattern":"^HUB_SOURCE_[A-Z0-9_]+$"},{"type":"null"}],"title":"Credential Env"},"timezone":{"type":"string","title":"Timezone"},"time_semantics":{"type":"string","enum":["local","offset"],"title":"Time Semantics"},"enabled":{"type":"boolean","title":"Enabled","default":false},"interval":{"type":"integer","maximum":86400.0,"minimum":300.0,"title":"Interval","default":300},"min_interval":{"type":"integer","maximum":86400.0,"minimum":300.0,"title":"Min Interval","default":300},"permission":{"type":"string","enum":["blocked","approved","sandbox","manual","research"],"title":"Permission","default":"blocked"},"evidence":{"type":"string","maxLength":4000,"title":"Evidence","default":""},"expires":{"type":"number","title":"Expires","default":0}},"additionalProperties":false,"type":"object","required":["airport","kind","timezone","time_semantics"],"title":"Source"},"User":{"properties":{"username":{"type":"string","maxLength":100,"title":"Username"},"password":{"type":"string","maxLength":256,"title":"Password"},"role":{"type":"string","enum":["admin","operator","viewer"],"title":"Role"}},"additionalProperties":false,"type":"object","required":["username","password","role"],"title":"User"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"}}}}