{"source":"banenor","operation":"get_station_board","description":"Live departure/arrival board for one Norwegian railway station, straight\nfrom Bane NOR - the data shown on the physical station screens.","parameters":[{"name":"station","schema":{"type":"string"},"required":true,"default":null,"description":"Bane NOR station code, e.g. \"OSL\" (Oslo S), \"BRG\" (Bergen), \"TND\" (Trondheim S). Use lookup_station to find a code. Unknown codes error."},{"name":"direction","schema":{"type":"string"},"required":false,"default":"all","description":"\"all\" (default), \"departures\" or \"arrivals\"."},{"name":"minutes_ahead","schema":{"type":"integer"},"required":false,"default":120,"description":"Window from now, in minutes (default 120)."},{"name":"line","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false,"default":null,"description":"Only this line, e.g. \"L2\", \"R12\", \"FLY1\". Exact match."},{"name":"destination","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false,"default":null,"description":"Only trains whose final stop is this station NAME (e.g. \"Skien\", not \"SKN\")."},{"name":"operator","schema":{"anyOf":[{"type":"string"},{"type":"null"}]},"required":false,"default":null,"description":"Only this operator code, e.g. \"VY\", \"VYG\", \"FLY\", \"GAG\", \"SJN\"."},{"name":"max_trains","schema":{"type":"integer"},"required":false,"default":20,"description":"Cap on trains returned (default 20), applied upstream to the trains departing/arriving next."},{"name":"include_formation","schema":{"type":"boolean"},"required":false,"default":false,"description":"Also return train formation per train where reported: wagon order and types, open/closed state, on-board services (bicycle, quiet, wheelchair, bistro, wlan, ...) and automatic passenger-count occupancy. Verbose; off by default."},{"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)."},{"name":"offset","type":"integer","schema":{"type":"integer","minimum":0,"default":0},"display_type":"integer","required":false,"default":0,"description":"Number of list items to skip before returning the page."}],"json_get_url_template":"https://allemannsdata.com/wiki/api/v1/kilder/banenor/get_station_board?station={station}&direction=all&minutes_ahead=120&line={line}&destination={destination}&operator={operator}&max_trains=20&include_formation=false&limit=25&offset=0","schema_scope":"#/data in the successful operation envelope","response_schema":{"type":"object","properties":{"station":{"type":"string"},"train_count":{"type":"integer"},"trains":{"type":"array","items":{"anyOf":[{"x-allemannsdata-schema-status":"unresolved","description":"Response shape is not yet declared; any JSON value is permitted."},{"type":"object","properties":{"train":{"x-allemannsdata-schema-status":"unresolved","description":"Response shape is not yet declared; any JSON value is permitted."},"line":{"x-allemannsdata-schema-status":"unresolved","description":"Response shape is not yet declared; any JSON value is permitted."},"operator":{"x-allemannsdata-schema-status":"unresolved","description":"Response shape is not yet declared; any JSON value is permitted."},"product":{"x-allemannsdata-schema-status":"unresolved","description":"Response shape is not yet declared; any JSON value is permitted."},"service":{"x-allemannsdata-schema-status":"unresolved","description":"Response shape is not yet declared; any JSON value is permitted."},"origin":{"x-allemannsdata-schema-status":"unresolved","description":"Response shape is not yet declared; any JSON value is permitted."},"destination":{"x-allemannsdata-schema-status":"unresolved","description":"Response shape is not yet declared; any JSON value is permitted."},"via":{"type":"array","items":{"x-allemannsdata-schema-status":"unresolved","description":"Response shape is not yet declared; any JSON value is permitted."}},"at_stop":{"type":"boolean"},"formation":{"anyOf":[{"type":"null"},{"anyOf":[{"type":"object","properties":{"wagon_count":{"type":"integer"},"wagons":{"type":"array","items":{"anyOf":[{"x-allemannsdata-schema-status":"unresolved","description":"Response shape is not yet declared; any JSON value is permitted."},{"type":"object","properties":{"number":{"x-allemannsdata-schema-status":"unresolved","description":"Response shape is not yet declared; any JSON value is permitted."},"type":{"type":["string","null"]},"open":{"type":"boolean"},"engine":{"type":"boolean"},"occupancy":{"type":"integer"},"goods":{"type":"boolean"},"services":{"type":"array","items":{"x-allemannsdata-schema-status":"unresolved","description":"Response shape is not yet declared; any JSON value is permitted."}}},"additionalProperties":false}]}}},"additionalProperties":false},{"type":"null"}]}]},"prediction_inaccurate":{"type":"boolean"}},"additionalProperties":false}]}},"attribution":{"type":["object","null"],"properties":{},"additionalProperties":false}},"additionalProperties":false},"response_schema_status":{"status":"incomplete","codegen_safe":false,"description":"Not suitable for typed model generation: the container shape and field names are useful, but unresolved values accept any JSON value."},"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"}},"required":["self","api_index"],"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"],"retryable":false},"429":{"codes":["RATE_LIMITED","GATEWAY_RATE_LIMITED"],"retryable":true},"502":{"codes":["SOURCE_UNAVAILABLE"],"retryable":true},"500":{"codes":["INTERNAL_ERROR"],"retryable":true}}},"_links":{"self":"https://allemannsdata.com/wiki/api/v1/kilder/banenor/get_station_board/schema","operation":"https://allemannsdata.com/wiki/api/v1/kilder/banenor/get_station_board","source":"https://allemannsdata.com/wiki/api/v1/kilder/banenor"},"output_fields":["station","train_count","trains","trains[].train","trains[].line","trains[].operator","trains[].product","trains[].service","trains[].origin","trains[].destination","trains[].via","trains[].at_stop","trains[].formation","trains[].formation.wagon_count","trains[].formation.wagons","trains[].prediction_inaccurate","attribution"],"output_fields_truncated":false,"canonical_field_aliases":{}}
