{"source":"banenor","operation":"get_disruptions","description":"Cancellations and disruptions of individual train journeys, from Bane\nNOR's situation exchange feed. Signature: get_disruptions(hours_ahead: integer, optional, default 24; station_id: string, optional, default None; train_number: string, optional, default None; offset: integer, items, optional, default 0; limit: integer, items, optional, default 25).","signature":"get_disruptions(hours_ahead: integer, optional, default 24; station_id: string, optional, default None; train_number: string, optional, default None; offset: integer, items, optional, default 0; limit: integer, items, optional, default 25)","parameters":[{"name":"hours_ahead","type":"integer","schema":{"minimum":0,"type":"integer"},"required":false,"default":24,"description":"Only situations whose valid_from lies between 12 hours ago and this many hours from now (default 24). The feed has no end times, so a situation that started in the last 12 hours counts as current: its train may still be running (the longest passenger runs take ~10 hours). Older ones are dropped; upstream keeps them for days, and not consistently across its servers. The full feed carries ~a week of planned changes (thousands of records); keep this small unless you really want them all.","unit":null},{"name":"station_id","type":"string","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false,"default":null,"description":"Only situations touching this station code (e.g. \"OSL\"). An unknown code is a not-found error.","unit":null},{"name":"train_number","type":"string","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false,"default":null,"description":"Only situations for this train number.","unit":null},{"name":"offset","type":"integer","schema":{"minimum":0,"type":"integer"},"required":false,"default":0,"description":"Skip this many matching situations (default 0). When the response is truncated it carries `next_offset`; pass that back as offset for the next page. Prefer narrowing with station, train_number or hours_ahead over paging through the national feed. Unit: items.","unit":"items"},{"name":"limit","type":"integer","schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"display_type":"integer","required":false,"default":25,"description":"Maximum list items returned by the gateway (default 25, maximum 100).","unit":"items"}],"json_get_url_template":"https://allemannsdata.com/wiki/api/v1/kilder/banenor/get_disruptions?hours_ahead=24&station_id={station_id}&train_number={train_number}&offset=0&limit=25","example_url":"https://allemannsdata.com/wiki/api/v1/kilder/banenor/get_disruptions","schema_scope":"#/data in the successful operation envelope","response_schema":{"type":"object","properties":{"total_count":{"type":"integer"},"offset":{"type":"integer"},"disruptions":{"type":"array","items":{"type":"object","properties":{"situation":{"type":"string"},"conditions":{"type":"array","items":{"type":"string"}},"train":{"type":"string"},"date":{"type":"string"},"valid_from":{"type":"string","format":"date-time"},"affected_stops":{"type":"array","items":{"type":"object","properties":{"code":{"type":["string","null"]},"name":{"type":["string","null"]},"condition":{"type":["string","null"]}},"additionalProperties":false}}},"additionalProperties":false}},"truncated":{"type":"boolean"},"next_offset":{"type":"integer"},"note":{"type":["string","null"]},"attribution":{"type":"string"}},"additionalProperties":false,"required":["total_count","offset","disruptions","truncated","attribution"]},"response_schema_status":{"status":"declared","codegen_safe":true,"description":"Maintained response contract."},"entity_projection":{"status":"projected","entity_types":["rail_station"],"description":"Recognized records and stable operation identifiers are projected; an empty array means the successful payload contained no recognizable entity."},"error_contract":{"scope":"top-level HTTP error response; never part of a success payload","schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object"}},"additionalProperties":false,"required":["code","message","retryable"]},"suggestion":{"type":"string"},"_meta":{"type":"object","properties":{"retrieved_at":{"type":"string","format":"date-time"},"language":{"type":"string","const":"en"},"content_languages":{"type":"array","items":{"type":"string"}},"sources":{"type":"array","items":{"type":"object"}}},"required":["retrieved_at","language","content_languages","sources"]},"_links":{"type":"object","properties":{"self":{"type":"string","format":"uri"},"api_index":{"type":"string","format":"uri"},"feedback":{"type":"string","format":"uri"}},"required":["self","api_index","feedback"],"additionalProperties":false}},"additionalProperties":false,"required":["error","suggestion","_meta","_links"]},"statuses":{"400":{"codes":["MISSING_PARAMETER","INVALID_PARAMETER","INVALID_REQUEST"],"retryable":false},"404":{"codes":["SOURCE_NOT_FOUND","OPERATION_NOT_FOUND","ENTITY_NOT_FOUND","ENDPOINT_NOT_FOUND"],"retryable":false},"405":{"codes":["METHOD_NOT_ALLOWED"],"retryable":false},"429":{"codes":["RATE_LIMITED","GATEWAY_RATE_LIMITED"],"retryable":true},"503":{"codes":["SOURCE_UNAVAILABLE"],"retryable":true},"500":{"codes":["INTERNAL_ERROR"],"retryable":false}}},"_links":{"self":"https://allemannsdata.com/wiki/api/v1/kilder/banenor/get_disruptions/schema","operation":"https://allemannsdata.com/wiki/api/v1/kilder/banenor/get_disruptions","source":"https://allemannsdata.com/wiki/api/v1/kilder/banenor","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"},"output_fields":["total_count","offset","disruptions","disruptions[].situation","disruptions[].conditions","disruptions[].train","disruptions[].date","disruptions[].valid_from","disruptions[].affected_stops","disruptions[].affected_stops[].code","disruptions[].affected_stops[].name","disruptions[].affected_stops[].condition","truncated","next_offset","note","attribution"],"output_fields_truncated":false,"canonical_field_aliases":{"date":["disruptions[].date"],"identifier":["disruptions[].affected_stops[].code"],"name":["disruptions[].affected_stops[].name"]},"temporal_conventions":{"timezone":"explicit_offset","join_guidance":"date-time fields are RFC 3339 with an explicit offset (Z, +00:00 or the Europe/Oslo offset); compare absolute instants, not clock text. date fields are calendar dates without a time zone.","datetime_fields":["disruptions[].valid_from"]},"response_example":{"source":"banenor","operation":"get_disruptions","parameters":{"limit":25,"offset":0},"data":{"total_count":1,"offset":1,"disruptions":[{"situation":"example value","conditions":["example value"],"train":"example value","date":"2026-01-15","valid_from":"2026-01-15T12:00:00Z","affected_stops":[{"code":"example value","name":"Example","condition":"example value"}]}],"truncated":true,"next_offset":1,"note":"example value","attribution":"example value"},"entities":[],"_meta":{"retrieved_at":"2026-01-15T12:00:00Z","language":"en","content_languages":["en"],"sources":[{"id":"banenor","name":"Bane NOR train data","description":"Real-time station boards, train movements and rail disruptions from the infrastructure manager.","publisher":"Bane NOR SF","license":"https://data.norge.no/nlod/en/2.0/","cache_ttl_seconds":30,"documentation":"https://www.banenor.no/reise-og-trafikk/apne-data/"}]},"_provenance":{"data":{"source":"banenor","source_api":"https://allemannsdata.com/wiki/api/v1/kilder/banenor"},"entities":{"source":"banenor","source_api":"https://allemannsdata.com/wiki/api/v1/kilder/banenor","derived_from":"#/data","description":"Normalized projection of data."}},"_links":{"self":"https://allemannsdata.com/wiki/api/v1/kilder/banenor/get_disruptions","source":"https://allemannsdata.com/wiki/api/v1/kilder/banenor","wiki":"https://allemannsdata.com/wiki/kilder/banenor/get_disruptions/","feedback":"https://allemannsdata.com/wiki/api/v1/feedback"}}}
