{"openapi":"3.1.0","info":{"title":"Disruption API","description":"\nDisruption intelligence for travel: live signals (IT outages, aviation programs,\nweather warnings, natural hazards, travel advisories, internet outages) with\nimpact forecasts based on what similar past events did to travel.\n\nEvery probability comes with **n**, the number of past events it is based on.\n","version":"1.0.0"},"paths":{"/v1/plans":{"get":{"tags":["account"],"summary":"Plans","operationId":"plans_v1_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/me":{"get":{"tags":["account"],"summary":"Me","operationId":"me_v1_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/usage":{"get":{"tags":["account"],"summary":"Get Usage","operationId":"get_usage_v1_usage_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/signals":{"get":{"tags":["signals"],"summary":"List Signals","operationId":"list_signals_v1_signals_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","pattern":"^(active|resolved|all)$","default":"active","title":"Status"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"comma-separated: it_outage, aviation, weather, natural_hazard, security, internet, health, labor, infrastructure","title":"Type"},"description":"comma-separated: it_outage, aviation, weather, natural_hazard, security, internet, health, labor, infrastructure"},{"name":"min_severity","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(minor|moderate|severe|extreme)$"},{"type":"null"}],"title":"Min Severity"}},{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}],"description":"ISO 3166-1 alpha-2","title":"Country"},"description":"ISO 3166-1 alpha-2"},{"name":"airport","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":3,"maxLength":3},{"type":"null"}],"description":"IATA code","title":"Airport"},"description":"IATA code"},{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"only signals updated at or after this UTC time","title":"Since"},"description":"only signals updated at or after this UTC time"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/signals/{signal_id}":{"get":{"tags":["signals"],"summary":"Get Signal","operationId":"get_signal_v1_signals__signal_id__get","parameters":[{"name":"signal_id","in":"path","required":true,"schema":{"type":"string","title":"Signal Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/forecast":{"get":{"tags":["forecasts"],"summary":"What If","description":"What history says an outage of this provider and failure layer does to travel.","operationId":"what_if_v1_forecast_get","parameters":[{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"}},{"name":"failure_layer","in":"query","required":true,"schema":{"type":"string","description":"see /v1/failure-layers","title":"Failure Layer"},"description":"see /v1/failure-layers"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/failure-layers":{"get":{"tags":["forecasts"],"summary":"Failure Layers","operationId":"failure_layers_v1_failure_layers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/exposure/check":{"post":{"tags":["exposure"],"summary":"Check Exposure","description":"Which active disruptions touch these flights, trips, places, carriers or providers, why,\nand what history says they will do.","operationId":"check_exposure_v1_exposure_check_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExposureRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/watchlists":{"get":{"tags":["watchlists"],"summary":"List Watchlists","operationId":"list_watchlists_v1_watchlists_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["watchlists"],"summary":"Create Watchlist","description":"Create a watchlist, optionally with its first items. Pair it with a webhook filtered on\n`watchlists` to be told when a new disruption touches any item.","operationId":"create_watchlist_v1_watchlists_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchlistIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/watchlists/{wl_id}":{"get":{"tags":["watchlists"],"summary":"Get Watchlist","operationId":"get_watchlist_v1_watchlists__wl_id__get","parameters":[{"name":"wl_id","in":"path","required":true,"schema":{"type":"string","title":"Wl Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["watchlists"],"summary":"Delete Watchlist","operationId":"delete_watchlist_v1_watchlists__wl_id__delete","parameters":[{"name":"wl_id","in":"path","required":true,"schema":{"type":"string","title":"Wl Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/watchlists/{wl_id}/items":{"post":{"tags":["watchlists"],"summary":"Add Items","description":"Add or update items, keyed by your `id`. Flights and trips expire a day after they end.","operationId":"add_items_v1_watchlists__wl_id__items_post","parameters":[{"name":"wl_id","in":"path","required":true,"schema":{"type":"string","title":"Wl Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemsIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/watchlists/{wl_id}/items/{ref}":{"delete":{"tags":["watchlists"],"summary":"Delete Item","operationId":"delete_item_v1_watchlists__wl_id__items__ref__delete","parameters":[{"name":"wl_id","in":"path","required":true,"schema":{"type":"string","title":"Wl Id"}},{"name":"ref","in":"path","required":true,"schema":{"type":"string","title":"Ref"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/watchlists/{wl_id}/exposure":{"get":{"tags":["watchlists"],"summary":"Watchlist Exposure","description":"Items in this watchlist that active disruptions touch right now.","operationId":"watchlist_exposure_v1_watchlists__wl_id__exposure_get","parameters":[{"name":"wl_id","in":"path","required":true,"schema":{"type":"string","title":"Wl Id"}},{"name":"min_severity","in":"query","required":false,"schema":{"type":"string","pattern":"^(minor|moderate|severe|extreme)$","default":"moderate","title":"Min Severity"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/airports/{iata}":{"get":{"tags":["reference"],"summary":"Airport","operationId":"airport_v1_airports__iata__get","parameters":[{"name":"iata","in":"path","required":true,"schema":{"type":"string","title":"Iata"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/carriers/{code}":{"get":{"tags":["reference"],"summary":"Carrier","operationId":"carrier_v1_carriers__code__get","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/sources":{"get":{"tags":["reference"],"summary":"Sources Register","description":"Every upstream source behind our signals: publisher, coverage, licence and the\nattribution to show, how often we check it and whether it is fresh right now.","operationId":"sources_register_v1_sources_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/providers":{"get":{"tags":["reference"],"summary":"Providers","description":"IT providers we watch and whether they have an active incident now.","operationId":"providers_v1_providers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/events":{"get":{"tags":["history"],"summary":"List Events","description":"The catalogue of past disruptions the forecasts learn from.","operationId":"list_events_v1_events_get","parameters":[{"name":"provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider"}},{"name":"failure_layer","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Layer"}},{"name":"anchor_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Anchor Only"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/events/{event_id}":{"get":{"tags":["history"],"summary":"Get Event","operationId":"get_event_v1_events__event_id__get","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks":{"get":{"tags":["webhooks"],"summary":"List Webhooks","operationId":"list_webhooks_v1_webhooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["webhooks"],"summary":"Create Webhook","description":"Create a webhook. The signing secret is returned once; store it.","operationId":"create_webhook_v1_webhooks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/webhooks/{hook_id}":{"delete":{"tags":["webhooks"],"summary":"Delete Webhook","operationId":"delete_webhook_v1_webhooks__hook_id__delete","parameters":[{"name":"hook_id","in":"path","required":true,"schema":{"type":"string","title":"Hook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ExposureRequest":{"properties":{"items":{"anyOf":[{"items":{"$ref":"#/components/schemas/Item"},"type":"array","maxItems":500},{"type":"null"}],"title":"Items"},"trips":{"anyOf":[{"items":{"$ref":"#/components/schemas/Item"},"type":"array","maxItems":500},{"type":"null"}],"title":"Trips","description":"older name for items; still accepted"},"min_severity":{"type":"string","pattern":"^(minor|moderate|severe|extreme)$","title":"Min Severity","default":"moderate"}},"type":"object","title":"ExposureRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Item":{"properties":{"id":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Id","description":"your own reference"},"kind":{"anyOf":[{"type":"string","pattern":"^(flight|trip|place|carrier|provider)$"},{"type":"null"}],"title":"Kind"},"label":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Label"},"carrier":{"anyOf":[{"type":"string","maxLength":3},{"type":"null"}],"title":"Carrier"},"carriers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Carriers"},"origin":{"anyOf":[{"type":"string","maxLength":3},{"type":"null"}],"title":"Origin"},"destination":{"anyOf":[{"type":"string","maxLength":3},{"type":"null"}],"title":"Destination"},"via":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Via"},"legs":{"anyOf":[{"items":{"$ref":"#/components/schemas/Leg"},"type":"array","maxItems":20},{"type":"null"}],"title":"Legs"},"depart_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Depart At"},"return_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return At"},"airport":{"anyOf":[{"type":"string","maxLength":3},{"type":"null"}],"title":"Airport"},"lat":{"anyOf":[{"type":"number","maximum":90.0,"minimum":-90.0},{"type":"null"}],"title":"Lat"},"lon":{"anyOf":[{"type":"number","maximum":180.0,"minimum":-180.0},{"type":"null"}],"title":"Lon"},"radius_km":{"anyOf":[{"type":"number","maximum":500.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Radius Km"},"country":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Country"},"countries":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Countries"},"starts_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Starts At"},"ends_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ends At"},"provider":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Provider","description":"aws, azure, gcp, cloudflare, microsoft_365, ..."},"failure_layer":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Failure Layer"},"expires_at":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Expires At"}},"additionalProperties":true,"type":"object","title":"Item","description":"Anything you want checked. Set `kind`, or we infer it from the fields you send."},"ItemsIn":{"properties":{"items":{"items":{"$ref":"#/components/schemas/Item"},"type":"array","maxItems":1000,"minItems":1,"title":"Items"}},"type":"object","required":["items"],"title":"ItemsIn"},"Leg":{"properties":{"carrier":{"anyOf":[{"type":"string","maxLength":3},{"type":"null"}],"title":"Carrier","description":"IATA airline code"},"origin":{"anyOf":[{"type":"string","maxLength":3},{"type":"null"}],"title":"Origin","description":"IATA airport code"},"destination":{"anyOf":[{"type":"string","maxLength":3},{"type":"null"}],"title":"Destination"},"depart_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Depart At"},"arrive_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Arrive At"}},"type":"object","title":"Leg"},"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"},"WatchlistIn":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"},"items":{"anyOf":[{"items":{"$ref":"#/components/schemas/Item"},"type":"array","maxItems":1000},{"type":"null"}],"title":"Items"}},"type":"object","required":["name"],"title":"WatchlistIn"},"WebhookIn":{"properties":{"url":{"type":"string","maxLength":500,"title":"Url"},"filters":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Filters","description":"types, min_severity, countries, airports, carriers, events, watchlists ([\"*\"] or ids)"}},"type":"object","required":["url"],"title":"WebhookIn"}}}}