{"openapi":"3.1.0","info":{"title":"Create Railways Navigator Web API","version":"1.1.0.0","description":"A Minecraft Create Mod addon that adds several new features related to train navigation, such as improved display boards, a navigator for searching routes, new schedule entries, and more.","license":{"name":"GNU Lesser General Public License v3.0"},"contact":{"url":"https://wiki.mrjulsen.net/createrailwaysnavigator"}},"servers":[{"url":"/createrailwaysnavigator/api/v1","description":"Base path via the \u0027createrailwaysnavigator\u0027 namespace."},{"url":"/crn/api/v1","description":"Base path via the \u0027crn\u0027 namespace."}],"tags":[{"name":"Common","description":"Service data, health checks and the API specification."},{"name":"Trains","description":"Live and scheduled data for individual trains."},{"name":"Stations","description":"Stations known to the backend and what calls at them."},{"name":"Lines and Categories","description":"Train lines and categories with the trains using them."},{"name":"Departures","description":"Station departure boards and departure statistics."},{"name":"Routing","description":"Route search between stations."},{"name":"Create","description":"Raw data from Create, unfiltered by CRN\u0027s display rules."},{"name":"Global Settings","description":"All CRN settings, like lines, categories, station tags and blacklists."}],"paths":{"/openapi":{"get":{"operationId":"get_openapi","tags":["Common"],"summary":"OpenAPI 3.1 specs","description":"The OpenAPI document describing every endpoint of this API.","responses":{"200":{"description":"OpenAPI 3.1 specs","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/openapi.json":{"get":{"operationId":"get_openapi_json","tags":["Common"],"summary":"OpenAPI 3.1 specs","description":"The OpenAPI document describing every endpoint of this API.","responses":{"200":{"description":"OpenAPI 3.1 specs","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/ping":{"get":{"operationId":"get_ping","tags":["Common"],"summary":"Health check","description":"Returns a small plain-text response to check if the API is reachable.","responses":{"200":{"description":"A short plain-text reply.","content":{"text/plain":{"schema":{"type":"string"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/hello":{"get":{"operationId":"get_hello","tags":["Common"],"summary":"Health check","description":"Returns a small plain-text response to check if the API is reachable.","responses":{"200":{"description":"A short plain-text reply.","content":{"text/plain":{"schema":{"type":"string"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/about":{"get":{"operationId":"get_about","tags":["Common"],"summary":"About this server","description":"All information about the mod, the running game instance and the loaded mod list.","parameters":[{"$ref":"#/components/parameters/Fields"}],"responses":{"200":{"description":"About this server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AboutEndpointData"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/navigate":{"get":{"operationId":"get_navigate","tags":["Routing"],"summary":"Search for routes","description":"Runs a route search between two stations and returns possible connection journeys. All times are in game ticks. A 200 response still carries a status that says whether journeys were found (OK) or why not (NO_ROUTE, NO_DIRECT_ROUTE, SAME_STATION or BACKEND_INACTIVE); an invalid query or an unknown station is reported as a 400 or 404 instead.","parameters":[{"name":"max_transfers","in":"query","required":false,"description":"The max number of transfers a journey may have. -1 means unlimited. The server\u0027s configured cap still applies on top of this.","schema":{"type":"integer","format":"int32"}},{"name":"avoid_stations","in":"query","required":false,"description":"Names of stations the journey must not call at.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"only_lines","in":"query","required":false,"description":"If set, the only line ids the journey may use.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"excluding_lines","in":"query","required":false,"description":"Line ids the journey must avoid.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"only_categories","in":"query","required":false,"description":"If set, the only category ids the journey may use.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"departure_in","in":"query","required":false,"description":"Earliest departure, given as a number of ticks from now.","schema":{"type":"integer","format":"int64"}},{"name":"via","in":"query","required":false,"description":"Waypoints the journey must pass through, in order. Repeat the parameter for each waypoint. Every value is a station name, optionally suffixed with \u0027:\u003cminStay\u003e\u0027 (a minimum stay in ticks).","example":"Central Station:600","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","pattern":"^[^:]+(:[0-9]+)?$"}}},{"name":"transfer_time","in":"query","required":false,"description":"The least time to allow for a transfer, in ticks.","schema":{"type":"integer","format":"int64"}},{"name":"max_results","in":"query","required":false,"description":"The most journeys to return.","schema":{"type":"integer","format":"int32"}},{"name":"excluding_categories","in":"query","required":false,"description":"Category ids the journey must avoid.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"direct","in":"query","required":false,"description":"Whether to accept only journeys that need no transfer.","schema":{"type":"boolean"}},{"name":"optimization","in":"query","required":false,"description":"How the found journeys are ordered.","schema":{"type":"string","enum":["FASTEST","FEWEST_TRANSFERS"]}},{"name":"from","in":"query","required":true,"description":"The station the journey starts at.","example":"Central Station","schema":{"type":"string"}},{"name":"to","in":"query","required":true,"description":"The station the journey ends at.","example":"Airport","schema":{"type":"string"}},{"$ref":"#/components/parameters/Fields"}],"responses":{"200":{"description":"Search for routes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NavigationResult"}}}},"400":{"description":"A required parameter is missing or empty, or a parameter could not be parsed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"A station named in the query (origin, destination or a waypoint) does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/trains":{"get":{"operationId":"get_trains","tags":["Trains"],"summary":"List trains","description":"Every train that is shown publicly.","parameters":[{"name":"lines","in":"query","required":false,"description":"Keep only trains working one of these line ids now.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"categories","in":"query","required":false,"description":"Keep only trains running under one of these category ids now.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"reportable","in":"query","required":false,"description":"Keep only trains that are (true) or are not (false) fit to be shown publicly.","schema":{"type":"boolean"}},{"name":"name","in":"query","required":false,"description":"Keep only trains with exactly this name.","schema":{"type":"string"}},{"name":"delayed_only","in":"query","required":false,"description":"Keep only trains that are (true) or are not (false) running late.","schema":{"type":"boolean"}},{"name":"cancelled_only","in":"query","required":false,"description":"Keep only trains that are (true) or are not (false) out of service.","schema":{"type":"boolean"}},{"name":"session_ids","in":"query","required":false,"description":"Keep only trains with one of these tracking session ids.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"service_state","in":"query","required":false,"description":"Keep only trains in this service state.","schema":{"type":"string","enum":["IN_SERVICE","DISRUPTED","IDLE"]}},{"name":"live_state","in":"query","required":false,"description":"Keep only trains in this live state.","schema":{"type":"string","enum":["NO_SCHEDULE","SCHEDULE_PAUSED","SCHEDULE_COMPLETED","DERAILED","AT_STATION","EN_ROUTE","WAITING_FOR_SIGNAL","STALLED"]}},{"name":"owners","in":"query","required":false,"description":"Keep only trains owned by one of these player ids.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"state","in":"query","required":false,"description":"Keep only trains in this lifecycle state.","schema":{"type":"string","enum":["PREPARING","LEARNING","READY","CANCELLED","IDLE"]}},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Offset"}],"responses":{"200":{"description":"List trains","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TrainSnapshot"}}}},"headers":{"X-Total-Count":{"description":"Total number of matching items.","schema":{"type":"integer"}},"X-Offset":{"description":"Index of the first returned item.","schema":{"type":"integer"}},"X-Limit":{"description":"The limit that was applied (only when a limit was given).","schema":{"type":"integer"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/trains/positions":{"get":{"operationId":"get_trains_positions","tags":["Trains"],"summary":"List train positions","description":"The location of every train publicly visible and its current speed.","parameters":[{"name":"moving_only","in":"query","required":false,"description":"Keep only trains that are (true) or are not (false) moving.","schema":{"type":"boolean"}},{"name":"at_station_only","in":"query","required":false,"description":"Keep only trains that are (true) or are not (false) standing at a station.","schema":{"type":"boolean"}},{"name":"dimensions","in":"query","required":false,"description":"Keep only trains in one of these dimensions, e.g. minecraft:overworld.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","example":"minecraft:overworld"}}},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Offset"}],"responses":{"200":{"description":"List train positions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TrainPositionSnapshot"}}}},"headers":{"X-Total-Count":{"description":"Total number of matching items.","schema":{"type":"integer"}},"X-Offset":{"description":"Index of the first returned item.","schema":{"type":"integer"}},"X-Limit":{"description":"The limit that was applied (only when a limit was given).","schema":{"type":"integer"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/train/{id}":{"get":{"operationId":"get_train_by_id","tags":["Trains"],"summary":"Get a train","description":"A train by its id.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Fields"}],"responses":{"200":{"description":"Get a train","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainSnapshot"}}}},"404":{"description":"No train with that id exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/train/{id}/journey":{"get":{"operationId":"get_train_by_id_journey","tags":["Trains"],"summary":"Get a train\u0027s journey","description":"The full run of one train.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"in_cycles","in":"query","required":false,"description":"The number of cycles for which the train should be simulated to the future.","schema":{"type":"integer"}},{"$ref":"#/components/parameters/Fields"}],"responses":{"200":{"description":"Get a train\u0027s journey","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JourneySnapshot"}}}},"404":{"description":"No train with that id exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/train/{id}/section":{"get":{"operationId":"get_train_by_id_section","tags":["Trains"],"summary":"Get a train\u0027s current section","description":"The current schedule section of a train.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Fields"}],"responses":{"200":{"description":"Get a train\u0027s current section","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SectionSnapshot"}}}},"404":{"description":"No train with that id exists, or it has no active section.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/train/{id}/position":{"get":{"operationId":"get_train_by_id_position","tags":["Trains"],"summary":"Get a train\u0027s position","description":"The location of one train with its current speed.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Fields"}],"responses":{"200":{"description":"Get a train\u0027s position","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainPositionSnapshot"}}}},"404":{"description":"No train with that id exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/train/{id}/composition":{"get":{"operationId":"get_train_by_id_composition","tags":["Trains"],"summary":"Get a train\u0027s composition","description":"Information about all carriages of a train.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Fields"}],"responses":{"200":{"description":"Get a train\u0027s composition","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainCompositionSnapshot"}}}},"404":{"description":"No train with that id exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/train/{id}/stops":{"get":{"operationId":"get_train_by_id_stops","tags":["Trains"],"summary":"List all train stops","description":"All stops of one train.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"direction","in":"query","required":false,"description":"The stops to list (ALL (default), PREVIOUS or NEXT).","schema":{"type":"string","enum":["ALL","PREVIOUS","NEXT"],"default":"ALL"}},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Offset"}],"responses":{"200":{"description":"List all train stops","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StopSnapshot"}}}},"headers":{"X-Total-Count":{"description":"Total number of matching items.","schema":{"type":"integer"}},"X-Offset":{"description":"Index of the first returned item.","schema":{"type":"integer"}},"X-Limit":{"description":"The limit that was applied (only when a limit was given).","schema":{"type":"integer"}}}},"404":{"description":"No train with that id exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/train/{id}/stop":{"get":{"operationId":"get_train_by_id_stop","tags":["Trains"],"summary":"Get one train stop","description":"A single stop of a train.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"direction","in":"query","required":false,"description":"The stop to return (PREVIOUS, CURRENT (default) or NEXT).","schema":{"type":"string","enum":["PREVIOUS","CURRENT","NEXT"],"default":"CURRENT"}},{"name":"station","in":"query","required":false,"description":"The stop to be searched for in the selected direction, instead of the next one.","schema":{"type":"string"}},{"$ref":"#/components/parameters/Fields"}],"responses":{"200":{"description":"Get one train stop","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StopSnapshot"}}}},"404":{"description":"No train with that id exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/train/{id}/delay-report":{"get":{"operationId":"get_train_by_id_delay_report","tags":["Trains"],"summary":"Get a train\u0027s delay report","description":"Information about the delays of a train, like the reasons and the actual delay value.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Fields"}],"responses":{"200":{"description":"Get a train\u0027s delay report","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DelayReport"}}}},"404":{"description":"No train with that id exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/board/{station}":{"get":{"operationId":"get_board_by_station","tags":["Departures"],"summary":"Station board","description":"The calls at a station, ordered by arrival, just like a departure board would show them.","parameters":[{"name":"station","in":"path","required":true,"schema":{"type":"string"}},{"name":"only_line","in":"query","required":false,"description":"Restrict the board to entries of this line id.","schema":{"type":"string","format":"uuid"}},{"name":"no_platform_changes","in":"query","required":false,"description":"Drop trains merely timetabled here but diverted to another station.","schema":{"type":"boolean"}},{"name":"only_category","in":"query","required":false,"description":"Restrict the board to entries of this category id.","schema":{"type":"string","format":"uuid"}},{"name":"show_cancelled","in":"query","required":false,"description":"Also include trains that are out of service.","schema":{"type":"boolean"}},{"name":"allow_duplicates","in":"query","required":false,"description":"Keep every call of a train rather than only its earliest.","schema":{"type":"boolean"}},{"name":"time","in":"query","required":false,"description":"Start the board at this time (in ticks) instead of now.","schema":{"type":"integer","format":"int64"}},{"name":"timespan","in":"query","required":false,"description":"How many ticks after the start time to include. Zero or less means no upper bound.","schema":{"type":"integer","format":"int64"}},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Offset"}],"responses":{"200":{"description":"Station board","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BoardEntry"}}}},"headers":{"X-Total-Count":{"description":"Total number of matching items.","schema":{"type":"integer"}},"X-Offset":{"description":"Index of the first returned item.","schema":{"type":"integer"}},"X-Limit":{"description":"The limit that was applied (only when a limit was given).","schema":{"type":"integer"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/lines":{"get":{"operationId":"get_lines","tags":["Lines and Categories"],"summary":"List lines","description":"Every line with the trains using it.","parameters":[{"name":"trains","in":"query","required":false,"description":"Keep only lines worked by one of these train ids.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"station_tags","in":"query","required":false,"description":"Keep only lines calling at a station in one of these tag ids.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"stations","in":"query","required":false,"description":"Keep only lines calling at a station whose name matches this filter (wildcard syntax allowed).","schema":{"type":"string"}},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Offset"}],"responses":{"200":{"description":"List lines","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LineSnapshot"}}}},"headers":{"X-Total-Count":{"description":"Total number of matching items.","schema":{"type":"integer"}},"X-Offset":{"description":"Index of the first returned item.","schema":{"type":"integer"}},"X-Limit":{"description":"The limit that was applied (only when a limit was given).","schema":{"type":"integer"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/line/{id}":{"get":{"operationId":"get_line_by_id","tags":["Lines and Categories"],"summary":"Get a line","description":"One line with the trains using it.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Fields"}],"responses":{"200":{"description":"Get a line","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineSnapshot"}}}},"404":{"description":"No line with that id exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/categories":{"get":{"operationId":"get_categories","tags":["Lines and Categories"],"summary":"List categories","description":"Every category with the trains using it.","parameters":[{"name":"lines","in":"query","required":false,"description":"Keep only categories covering one of these line ids.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"trains","in":"query","required":false,"description":"Keep only categories run under by one of these train ids.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Offset"}],"responses":{"200":{"description":"List categories","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CategorySnapshot"}}}},"headers":{"X-Total-Count":{"description":"Total number of matching items.","schema":{"type":"integer"}},"X-Offset":{"description":"Index of the first returned item.","schema":{"type":"integer"}},"X-Limit":{"description":"The limit that was applied (only when a limit was given).","schema":{"type":"integer"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/category/{id}":{"get":{"operationId":"get_category_by_id","tags":["Lines and Categories"],"summary":"Get a category","description":"One category with the trains using it.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Fields"}],"responses":{"200":{"description":"Get a category","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategorySnapshot"}}}},"404":{"description":"No category with that id exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/stations":{"get":{"operationId":"get_stations","tags":["Stations"],"summary":"List stations","description":"Every station the backend knows about, ordered by name.","parameters":[{"name":"lines","in":"query","required":false,"description":"Keep only stations served by one of these line ids.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"categories","in":"query","required":false,"description":"Keep only stations served by one of these category ids.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"trains","in":"query","required":false,"description":"Keep only stations served by one of these train ids.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"station_tags","in":"query","required":false,"description":"Keep only stations belonging to one of these tag ids.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"hide_blacklisted","in":"query","required":false,"description":"Drop stations hidden from public display when set to true.","schema":{"type":"boolean"}},{"name":"filter","in":"query","required":false,"description":"Keep only stations whose name matches this filter, which may use the schedule\u0027s wildcard syntax.","schema":{"type":"string"}},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Offset"}],"responses":{"200":{"description":"List stations","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StationSnapshot"}}}},"headers":{"X-Total-Count":{"description":"Total number of matching items.","schema":{"type":"integer"}},"X-Offset":{"description":"Index of the first returned item.","schema":{"type":"integer"}},"X-Limit":{"description":"The limit that was applied (only when a limit was given).","schema":{"type":"integer"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/station/{name}":{"get":{"operationId":"get_station_by_name","tags":["Stations"],"summary":"Get a station","description":"Information about a station, like its tags, the lines and categories calling there, and the trains that serve it.","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Fields"}],"responses":{"200":{"description":"Get a station","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StationSnapshot"}}}},"404":{"description":"No station with that name exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/departure-stats/{station}":{"get":{"operationId":"get_departure_stats_by_station","tags":["Departures"],"summary":"Station departure statistics","description":"Summary about the departures recorded at a specific station (e.g. punctually).","parameters":[{"name":"station","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Fields"}],"responses":{"200":{"description":"Station departure statistics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepartureStats"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/time":{"get":{"operationId":"get_time","tags":["Common"],"summary":"Current game time","description":"The current time on the server. Use this to Compare snapshot timestamps.","responses":{"200":{"description":"Current game time","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeNowEndpointData"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/backend-stats":{"get":{"operationId":"get_backend_stats","tags":["Common"],"summary":"Backend status","description":"Whether the train data backend is active and how many trains are being tracked.","responses":{"200":{"description":"Backend status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainManagerStatsEndpointData"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/create/stations":{"get":{"operationId":"get_create_stations","tags":["Create"],"summary":"List Create stations","description":"Raw station data from Create.","parameters":[{"name":"assembling","in":"query","required":false,"description":"Keep only stations that are (true) or are not (false) assembling a train.","schema":{"type":"boolean"}},{"name":"nearest_train","in":"query","required":false,"description":"Keep only stations whose nearest train is one of these ids.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"imminent_train","in":"query","required":false,"description":"Keep only stations whose imminent train is one of these ids.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"present_train","in":"query","required":false,"description":"Keep only stations with one of these train ids currently present.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"id","in":"query","required":false,"description":"Keep only stations with one of these ids.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"dimension","in":"query","required":false,"description":"Keep only stations in one of these dimensions.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","example":"minecraft:overworld"}}},{"name":"filter","in":"query","required":false,"description":"Keep only stations whose name matches this filter (wildcard syntax allowed).","schema":{"type":"string"}},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Offset"}],"responses":{"200":{"description":"List Create stations","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CreateStationSnapshot"}}}},"headers":{"X-Total-Count":{"description":"Total number of matching items.","schema":{"type":"integer"}},"X-Offset":{"description":"Index of the first returned item.","schema":{"type":"integer"}},"X-Limit":{"description":"The limit that was applied (only when a limit was given).","schema":{"type":"integer"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/create/station/{id}":{"get":{"operationId":"get_create_station_by_id","tags":["Create"],"summary":"Get a Create station","description":"Raw Create station data by its id.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Fields"}],"responses":{"200":{"description":"Get a Create station","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStationSnapshot"}}}},"404":{"description":"No station with that id exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/create/trains":{"get":{"operationId":"get_create_trains","tags":["Create"],"summary":"List Create trains","description":"Raw train data from Create, not processed or modified by CRN\u0027s backend.","parameters":[{"name":"graph","in":"query","required":false,"description":"Keep only trains on one of these track graph ids.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"derailed","in":"query","required":false,"description":"Keep only trains that are (true) or are not (false) derailed.","schema":{"type":"boolean"}},{"name":"id","in":"query","required":false,"description":"Keep only trains with one of these ids.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"dimension","in":"query","required":false,"description":"Keep only trains in one of these dimensions.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","example":"minecraft:overworld"}}},{"name":"filter","in":"query","required":false,"description":"Keep only trains whose name matches this filter (wildcard syntax allowed).","schema":{"type":"string"}},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Offset"}],"responses":{"200":{"description":"List Create trains","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CreateTrainSnapshot"}}}},"headers":{"X-Total-Count":{"description":"Total number of matching items.","schema":{"type":"integer"}},"X-Offset":{"description":"Index of the first returned item.","schema":{"type":"integer"}},"X-Limit":{"description":"The limit that was applied (only when a limit was given).","schema":{"type":"integer"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/create/train/{id}":{"get":{"operationId":"get_create_train_by_id","tags":["Create"],"summary":"Get a Create train","description":"Raw Create train data by its id.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Fields"}],"responses":{"200":{"description":"Get a Create train","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTrainSnapshot"}}}},"404":{"description":"No train with that id exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/create/train/{id}/schedule":{"get":{"operationId":"get_create_train_by_id_schedule","tags":["Create"],"summary":"Get a Create train\u0027s schedule","description":"The raw Create schedule assigned to a train.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Get a Create train\u0027s schedule","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"No train with that id exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/create/signals":{"get":{"operationId":"get_create_signals","tags":["Create"],"summary":"List Create signals","description":"Raw signal data from Create.","parameters":[{"name":"id","in":"query","required":false,"description":"Keep only signals with one of these ids.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"dimension","in":"query","required":false,"description":"Keep only signals in one of these dimensions.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","example":"minecraft:overworld"}}},{"name":"group","in":"query","required":false,"description":"Keep only signals of one of these signal group ids.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Offset"}],"responses":{"200":{"description":"List Create signals","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CreateSignalSnapshot"}}}},"headers":{"X-Total-Count":{"description":"Total number of matching items.","schema":{"type":"integer"}},"X-Offset":{"description":"Index of the first returned item.","schema":{"type":"integer"}},"X-Limit":{"description":"The limit that was applied (only when a limit was given).","schema":{"type":"integer"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/create/signal/{id}":{"get":{"operationId":"get_create_signal_by_id","tags":["Create"],"summary":"Get a Create signal","description":"Raw Create signal data by its id.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Fields"}],"responses":{"200":{"description":"Get a Create signal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSignalSnapshot"}}}},"404":{"description":"No signal with that id exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/create/tracks":{"get":{"operationId":"get_create_tracks","tags":["Create"],"summary":"List Create track graphs","description":"The raw track network from Create, grouped by track graphs.","parameters":[{"name":"id","in":"query","required":false,"description":"Keep only track graphs with one of these ids.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"dimension","in":"query","required":false,"description":"Restrict each returned graph to the nodes in these dimensions.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","example":"minecraft:overworld"}}},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Offset"}],"responses":{"200":{"description":"List Create track graphs","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CreateTrackGraphSnapshot"}}}},"headers":{"X-Total-Count":{"description":"Total number of matching items.","schema":{"type":"integer"}},"X-Offset":{"description":"Index of the first returned item.","schema":{"type":"integer"}},"X-Limit":{"description":"The limit that was applied (only when a limit was given).","schema":{"type":"integer"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/global-settings/blacklist/stations":{"get":{"operationId":"get_global_settings_blacklist_stations","tags":["Global Settings"],"summary":"List blacklisted stations","description":"The names of blacklisted stations.","responses":{"200":{"description":"List blacklisted stations","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/global-settings/blacklist/trains":{"get":{"operationId":"get_global_settings_blacklist_trains","tags":["Global Settings"],"summary":"List blacklisted trains","description":"The names of all blacklisted trains.","responses":{"200":{"description":"List blacklisted trains","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/global-settings/train-categories":{"get":{"operationId":"get_global_settings_train_categories","tags":["Global Settings"],"summary":"List train categories","description":"All train categories matching the given query values.","parameters":[{"name":"name","in":"query","required":false,"description":"Keep only categories with one of these names.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"id","in":"query","required":false,"description":"Keep only categories with one of these ids.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"by","in":"query","required":false,"description":"Keep only categories owned by one of these players (by name).","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"by_id","in":"query","required":false,"description":"Keep only categories owned by one of these players (by UUID).","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"trusted","in":"query","required":false,"description":"Keep only categories that have one of these players as trusted members (by name).","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"trusted_id","in":"query","required":false,"description":"Keep only categories that have one of these players as trusted members (by UUID).","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Offset"}],"responses":{"200":{"description":"List train categories","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TrainCategory"}}}},"headers":{"X-Total-Count":{"description":"Total number of matching items.","schema":{"type":"integer"}},"X-Offset":{"description":"Index of the first returned item.","schema":{"type":"integer"}},"X-Limit":{"description":"The limit that was applied (only when a limit was given).","schema":{"type":"integer"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/global-settings/train-category/{id}":{"get":{"operationId":"get_global_settings_train_category_by_id","tags":["Global Settings"],"summary":"Get a train category","description":"A train category by its id.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Fields"}],"responses":{"200":{"description":"Get a train category","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainCategory"}}}},"404":{"description":"No train category with that id exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/global-settings/train-lines":{"get":{"operationId":"get_global_settings_train_lines","tags":["Global Settings"],"summary":"List train lines","description":"All train lines matching the given query values.","parameters":[{"name":"name","in":"query","required":false,"description":"Keep only lines with one of these names.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"id","in":"query","required":false,"description":"Keep only lines with one of these ids.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"by","in":"query","required":false,"description":"Keep only lines owned by one of these players (by name).","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"by_id","in":"query","required":false,"description":"Keep only lines owned by one of these players (by id).","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"trusted","in":"query","required":false,"description":"Keep only lines that have one of these players as trusted members (by name).","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"trusted_id","in":"query","required":false,"description":"Keep only lines that have one of these players as trusted members (by UUID).","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Offset"}],"responses":{"200":{"description":"List train lines","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TrainLine"}}}},"headers":{"X-Total-Count":{"description":"Total number of matching items.","schema":{"type":"integer"}},"X-Offset":{"description":"Index of the first returned item.","schema":{"type":"integer"}},"X-Limit":{"description":"The limit that was applied (only when a limit was given).","schema":{"type":"integer"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/global-settings/train-line/{id}":{"get":{"operationId":"get_global_settings_train_line_by_id","tags":["Global Settings"],"summary":"Get a train line","description":"A train line by its id.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Fields"}],"responses":{"200":{"description":"Get a train line","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrainLine"}}}},"404":{"description":"No train line with that id exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/global-settings/station-tags":{"get":{"operationId":"get_global_settings_station_tags","tags":["Global Settings"],"summary":"List station tags","description":"All station tags matching the given query values.","parameters":[{"name":"name","in":"query","required":false,"description":"Keep only tags with one of these names.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"id","in":"query","required":false,"description":"Keep only tags with one of these ids.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"station","in":"query","required":false,"description":"Keep only tags that contain one of these station names.","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"by","in":"query","required":false,"description":"Keep only tags owned by one of these players (by name).","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"by_id","in":"query","required":false,"description":"Keep only tags owned by one of these players (by UUID).","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"trusted","in":"query","required":false,"description":"Keep only tags that have one of these players as trusted members (by name).","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"trusted_id","in":"query","required":false,"description":"Keep only tags that have one of these players as trusted members (by UUID).","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/Sort"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Offset"}],"responses":{"200":{"description":"List station tags","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StationTag"}}}},"headers":{"X-Total-Count":{"description":"Total number of matching items.","schema":{"type":"integer"}},"X-Offset":{"description":"Index of the first returned item.","schema":{"type":"integer"}},"X-Limit":{"description":"The limit that was applied (only when a limit was given).","schema":{"type":"integer"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/global-settings/station-tag/{id}":{"get":{"operationId":"get_global_settings_station_tag_by_id","tags":["Global Settings"],"summary":"Get a station tag","description":"A station tag by its id.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Fields"}],"responses":{"200":{"description":"Get a station tag","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StationTag"}}}},"404":{"description":"No station tag with that id exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"AboutEndpointData":{"type":"object","title":"About Endpoint Data","properties":{"minecraft_version":{"type":"string"},"mod_id":{"type":"string"},"mod_name":{"type":"string"},"mod_version":{"type":"string"},"mod_homepage":{"type":"string"},"mod_sources":{"type":"string"},"mod_issue_tracker":{"type":"string"},"mod_license":{"type":"array","items":{"type":"string"}},"platform":{"type":"string"},"api_version":{"type":"string"},"dev_env":{"type":"boolean"},"environment":{"type":"string"},"modlist":{"type":"array","items":{"$ref":"#/components/schemas/AboutEndpointSimpleModEntry"}}}},"AboutEndpointSimpleModEntry":{"type":"object","title":"About Endpoint Simple Mod Entry","properties":{"mod_id":{"type":"string"},"mod_name":{"type":"string"},"version":{"type":"string"}}},"NavigationResult":{"type":"object","title":"Navigation Result","properties":{"status":{"type":"string","enum":["OK","BACKEND_INACTIVE","INCOMPLETE_QUERY","UNKNOWN_STATION","SAME_STATION","NO_DIRECT_ROUTE","NO_ROUTE"]},"journeys":{"type":"array","items":{"$ref":"#/components/schemas/RouteJourney"}},"computed_at":{"type":"integer","format":"int64"},"duration_ms":{"type":"integer","format":"int64"},"stations_searched":{"type":"integer","format":"int32"},"trips_scanned":{"type":"integer","format":"int32"}}},"RouteJourney":{"type":"object","title":"Route Journey","properties":{"legs":{"type":"array","items":{"$ref":"#/components/schemas/RouteLeg"}},"transfers":{"type":"array","items":{"$ref":"#/components/schemas/RouteTransfer"}}}},"RouteLeg":{"type":"object","title":"Route Leg","properties":{"train_id":{"type":"string","format":"uuid"},"session_id":{"type":"string","format":"uuid"},"train_name":{"type":"string"},"icon_id":{"type":"string","example":"minecraft:overworld"},"line":{"$ref":"#/components/schemas/LineRef"},"category":{"$ref":"#/components/schemas/TrainCategoryRef"},"destination_text":{"type":"string"},"section_index":{"type":"integer","format":"int32"},"cancelled":{"type":"boolean"},"calls":{"type":"array","items":{"$ref":"#/components/schemas/RouteCall"}},"delays":{"$ref":"#/components/schemas/DelayLog"}}},"LineRef":{"type":"object","title":"Line Ref","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"color":{"type":"string","description":"ARGB color as #AARRGGBB.","example":"#FF3366CC"}}},"TrainCategoryRef":{"type":"object","title":"Train Category Ref","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"color":{"type":"string","description":"ARGB color as #AARRGGBB.","example":"#FF3366CC"}}},"RouteCall":{"type":"object","title":"Route Call","properties":{"scheduled_station":{"$ref":"#/components/schemas/StationRef"},"entry_index":{"type":"integer","format":"int32"},"cycle":{"type":"integer","format":"int32"},"scheduled":{"$ref":"#/components/schemas/StopTimes"},"station":{"$ref":"#/components/schemas/StationRef"},"realtime":{"$ref":"#/components/schemas/StopTimes"},"passed":{"type":"boolean"}}},"StationRef":{"type":"object","title":"Station Ref","properties":{"name":{"type":"string"},"tag_name":{"type":"string"},"tag_id":{"type":"string","format":"uuid"},"info":{"$ref":"#/components/schemas/StationTagStationInfo"}}},"StationTagStationInfo":{"type":"object","title":"Station Tag Station Info","properties":{"platform":{"type":"string"}}},"StopTimes":{"type":"object","title":"Stop Times","properties":{"arrival":{"type":"integer","format":"int64"},"departure":{"type":"integer","format":"int64"},"min_departure":{"type":"integer","format":"int64"}}},"DelayLog":{"type":"object","title":"Delay Log","properties":{"entries":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/RecordedDelay"}},"frozen":{"type":"boolean"}}},"RecordedDelay":{"type":"object","title":"Recorded Delay","properties":{"instance":{"$ref":"#/components/schemas/DelayInstance"},"until":{"type":"integer","format":"int64"}}},"DelayInstance":{"type":"object","title":"Delay Instance","properties":{"cause_id":{"type":"string","example":"minecraft:overworld"},"severity":{"type":"string","enum":["INFO","DELAY","IMPORTANT"]},"since":{"type":"integer","format":"int64"},"estimated_delay_ticks":{"type":"integer","format":"int64"},"args":{"type":"array","items":{"$ref":"#/components/schemas/DelayArgument"}},"origin":{"type":"string","enum":["DETECTED","REPORTED"]}}},"DelayArgument":{"type":"object","title":"Delay Argument","properties":{"type":{"type":"string","enum":["TEXT","TRAIN_NAME","STATION_NAME","LINE_NAME","DURATION_TICKS","NUMBER"]},"value":{"type":"string"}}},"RouteTransfer":{"type":"object","title":"Route Transfer","properties":{"from":{"$ref":"#/components/schemas/RouteCall"},"to":{"$ref":"#/components/schemas/RouteCall"},"min_transfer_time":{"type":"integer","format":"int64"},"risk_buffer":{"type":"integer","format":"int64"},"stays_seated":{"type":"boolean"}}},"TrainSnapshot":{"type":"object","title":"Train Snapshot","properties":{"train_id":{"type":"string","format":"uuid"},"session_id":{"type":"string","format":"uuid"},"train_name":{"type":"string"},"owner_id":{"type":"string","format":"uuid"},"icon_id":{"type":"string","example":"minecraft:overworld"},"map_color_index":{"type":"integer","format":"int32"},"line":{"$ref":"#/components/schemas/LineRef"},"category":{"$ref":"#/components/schemas/TrainCategoryRef"},"lifecycle":{"type":"string","enum":["PREPARING","LEARNING","READY","CANCELLED","IDLE"]},"live_state":{"type":"string","enum":["NO_SCHEDULE","SCHEDULE_PAUSED","SCHEDULE_COMPLETED","DERAILED","AT_STATION","EN_ROUTE","WAITING_FOR_SIGNAL","STALLED"]},"service_state":{"type":"string","enum":["IN_SERVICE","DISRUPTED","IDLE"]},"max_deviation":{"type":"integer","format":"int64"},"delay_offset":{"type":"integer","format":"int64"},"total_duration":{"type":"integer","format":"int64"},"current_title":{"type":"string"},"destination":{"$ref":"#/components/schemas/StationRef"},"current_station":{"$ref":"#/components/schemas/StationRef"},"next_station":{"$ref":"#/components/schemas/StationRef"},"section_index":{"type":"integer","format":"int32"},"stop_count":{"type":"integer","format":"int32"},"carriage_count":{"type":"integer","format":"int32"},"position":{"$ref":"#/components/schemas/TrainPositionSnapshot"},"delays":{"type":"array","items":{"$ref":"#/components/schemas/DelayInstance"}}},"required":["train_id","session_id"]},"TrainPositionSnapshot":{"type":"object","title":"Train Position Snapshot","properties":{"train_id":{"type":"string","format":"uuid"},"dimension":{"type":"string","example":"minecraft:overworld"},"position":{"type":"object","properties":{"x":{"type":"integer","format":"int32"},"y":{"type":"integer","format":"int32"},"z":{"type":"integer","format":"int32"}}},"dimensions":{"type":"array","items":{"type":"string","example":"minecraft:overworld"}},"speed":{"type":"number","format":"double"},"target_speed":{"type":"number","format":"double"},"max_speed":{"type":"number","format":"double"},"throttle":{"type":"number","format":"double"},"backwards":{"type":"boolean"},"distance_to_next_stop":{"type":"number","format":"double"},"exit_side":{"type":"string","enum":["UNKNOWN","RIGHT","LEFT"]}},"required":["train_id"]},"JourneySnapshot":{"type":"object","title":"Journey Snapshot","properties":{"train_id":{"type":"string","format":"uuid"},"train_name":{"type":"string"},"line":{"$ref":"#/components/schemas/LineRef"},"cyclic":{"type":"boolean"},"total_duration":{"type":"integer","format":"int64"},"stops":{"type":"array","items":{"$ref":"#/components/schemas/StopSnapshot"}},"sections":{"type":"array","items":{"$ref":"#/components/schemas/SectionSnapshot"}},"current_stop_index":{"type":"integer","format":"int32"},"current_section_index":{"type":"integer","format":"int32"}},"required":["train_id"]},"StopSnapshot":{"type":"object","title":"Stop Snapshot","properties":{"entry_index":{"type":"integer","format":"int32"},"stop_index":{"type":"integer","format":"int32"},"section_index":{"type":"integer","format":"int32"},"station_filter":{"type":"string"},"scheduled_station":{"$ref":"#/components/schemas/StationRef"},"station":{"$ref":"#/components/schemas/StationRef"},"title":{"type":"string"},"scheduled":{"$ref":"#/components/schemas/StopTimes"},"realtime":{"$ref":"#/components/schemas/StopTimes"},"previous_actual":{"$ref":"#/components/schemas/StopTimes"},"leg_duration_ticks":{"type":"integer","format":"int32"},"dwell_duration_ticks":{"type":"integer","format":"int64"},"completed_visits":{"type":"integer","format":"int32"}}},"SectionSnapshot":{"type":"object","title":"Section Snapshot","properties":{"index":{"type":"integer","format":"int32"},"entry_index":{"type":"integer","format":"int32"},"line":{"$ref":"#/components/schemas/LineRef"},"category":{"$ref":"#/components/schemas/TrainCategoryRef"},"origin":{"$ref":"#/components/schemas/StationRef"},"destination":{"$ref":"#/components/schemas/StationRef"},"stops":{"type":"array","items":{"$ref":"#/components/schemas/StopSnapshot"}},"current_stop_index":{"type":"integer","format":"int32"},"usable":{"type":"boolean"},"default_section":{"type":"boolean"},"includes_next_section_start":{"type":"boolean"}}},"TrainCompositionSnapshot":{"type":"object","title":"Train Composition Snapshot","properties":{"train_id":{"type":"string","format":"uuid"},"carriages":{"type":"array","items":{"$ref":"#/components/schemas/CarriageSnapshot"}},"total_length_blocks":{"type":"integer","format":"int32"},"double_ended":{"type":"boolean"},"backwards":{"type":"boolean"}},"required":["train_id"]},"CarriageSnapshot":{"type":"object","title":"Carriage Snapshot","properties":{"index":{"type":"integer","format":"int32"},"length_blocks":{"type":"integer","format":"int32"},"on_two_bogeys":{"type":"boolean"},"dimension":{"type":"string","example":"minecraft:overworld"},"position":{"type":"object","properties":{"x":{"type":"integer","format":"int32"},"y":{"type":"integer","format":"int32"},"z":{"type":"integer","format":"int32"}}},"blocked":{"type":"boolean"},"stalled":{"type":"boolean"},"has_conductor":{"type":"boolean"},"has_storage":{"type":"boolean"},"in_multiple_dimensions":{"type":"boolean"}}},"DelayReport":{"type":"object","title":"Delay Report","properties":{"train_id":{"type":"string","format":"uuid"},"train_name":{"type":"string"},"delayed":{"type":"boolean"},"cancelled":{"type":"boolean"},"max_deviation":{"type":"integer","format":"int64"},"delay_offset":{"type":"integer","format":"int64"},"next_stop_arrival_deviation":{"type":"integer","format":"int64"},"next_stop_departure_deviation":{"type":"integer","format":"int64"},"signal_wait_ticks":{"type":"integer","format":"int32"},"stalled_ticks":{"type":"integer","format":"int32"},"dwell_ticks":{"type":"integer","format":"int32"},"separation_hold_ticks":{"type":"integer","format":"int64"},"blocking_trains":{"type":"array","items":{"type":"string"}},"causes":{"type":"array","items":{"$ref":"#/components/schemas/DelayInstance"}}},"required":["train_id"]},"BoardEntry":{"type":"object","title":"Board Entry","properties":{"train_id":{"type":"string","format":"uuid"},"session_id":{"type":"string","format":"uuid"},"train_name":{"type":"string"},"carriage_count":{"type":"integer","format":"int32"},"line":{"$ref":"#/components/schemas/LineRef"},"category":{"$ref":"#/components/schemas/TrainCategoryRef"},"arrival_line":{"$ref":"#/components/schemas/LineRef"},"arrival_category":{"$ref":"#/components/schemas/TrainCategoryRef"},"station":{"$ref":"#/components/schemas/StationRef"},"scheduled_station":{"$ref":"#/components/schemas/StationRef"},"origin":{"$ref":"#/components/schemas/StationRef"},"title":{"type":"string"},"destination":{"$ref":"#/components/schemas/StationRef"},"scheduled":{"$ref":"#/components/schemas/StopTimes"},"realtime":{"$ref":"#/components/schemas/StopTimes"},"service_state":{"type":"string","enum":["IN_SERVICE","DISRUPTED","IDLE"]},"visit_state":{"type":"string","enum":["PASSED","CURRENT","UPCOMING"]},"entry_index":{"type":"integer","format":"int32"},"section_index":{"type":"integer","format":"int32"},"terminus":{"type":"boolean"},"originating":{"type":"boolean"},"section_change":{"type":"boolean"},"stopovers":{"type":"array","items":{"$ref":"#/components/schemas/StationRef"}},"delays":{"type":"array","items":{"$ref":"#/components/schemas/DelayInstance"}}},"required":["train_id","session_id","station"]},"LineSnapshot":{"type":"object","title":"Line Snapshot","properties":{"line":{"$ref":"#/components/schemas/LineRef"},"train_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"stations":{"type":"array","items":{"$ref":"#/components/schemas/StationRef"}},"delayed_trains":{"type":"integer","format":"int32"}},"required":["line"]},"CategorySnapshot":{"type":"object","title":"Category Snapshot","properties":{"category":{"$ref":"#/components/schemas/TrainCategoryRef"},"train_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"lines":{"type":"array","items":{"$ref":"#/components/schemas/LineRef"}},"delayed_trains":{"type":"integer","format":"int32"}},"required":["category"]},"StationSnapshot":{"type":"object","title":"Station Snapshot","properties":{"station":{"$ref":"#/components/schemas/StationRef"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/StationTagRef"}},"lines":{"type":"array","items":{"$ref":"#/components/schemas/LineRef"}},"categories":{"type":"array","items":{"$ref":"#/components/schemas/TrainCategoryRef"}},"train_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"blacklisted":{"type":"boolean"}},"required":["station"]},"StationTagRef":{"type":"object","title":"Station Tag Ref","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"DepartureStats":{"type":"object","title":"Departure Stats","properties":{"last_departure":{"type":"integer","format":"int64"},"departures_by_category":{"type":"object","additionalProperties":{"type":"integer","format":"int64"}},"departures_by_line":{"type":"object","additionalProperties":{"type":"integer","format":"int64"}},"departures_by_name":{"type":"object","additionalProperties":{"type":"integer","format":"int64"}}}},"TimeNowEndpointData":{"type":"object","title":"Time Now Endpoint Data","properties":{"time":{"type":"integer","format":"int64","description":"The current game time in ticks."}}},"TrainManagerStatsEndpointData":{"type":"object","title":"Train Manager Stats Endpoint Data","properties":{"active":{"type":"boolean","description":"Whether a server is running and the backend is ready."},"tracked_trains_count":{"type":"integer","format":"int32","description":"How many trains the backend is tracking, including those hidden from public display."}}},"CreateStationSnapshot":{"type":"object","title":"Create Station Snapshot","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"position":{"type":"object","properties":{"x":{"type":"integer","format":"int32"},"y":{"type":"integer","format":"int32"},"z":{"type":"integer","format":"int32"}}},"dimension":{"type":"string","example":"minecraft:overworld"},"assembling":{"type":"boolean"},"nearest_train":{"type":"string","format":"uuid"},"imminent_train":{"type":"string","format":"uuid"},"present_train":{"type":"string","format":"uuid"},"edge_location":{"type":"array","items":{"$ref":"#/components/schemas/TrackNodeLocationSnapshot"}},"edge_position":{"type":"number","format":"double"}},"required":["id"]},"TrackNodeLocationSnapshot":{"type":"object","title":"Track Node Location Snapshot","properties":{"x":{"type":"integer","format":"int32"},"y":{"type":"integer","format":"int32"},"z":{"type":"integer","format":"int32"},"y_offset_pixels":{"type":"integer","format":"int32"},"dimension":{"type":"string","example":"minecraft:overworld"}}},"CreateTrainSnapshot":{"type":"object","title":"Create Train Snapshot","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"owner":{"type":"string","format":"uuid"},"graph":{"type":"string","format":"uuid"},"dimension":{"type":"string","example":"minecraft:overworld"},"position":{"$ref":"#/components/schemas/Vec3Snapshot"},"speed":{"type":"number","format":"double"},"backwards":{"type":"boolean"},"derailed":{"type":"boolean"},"status":{"$ref":"#/components/schemas/CreateTrainStatusSnapshot"},"carriages":{"type":"array","items":{"$ref":"#/components/schemas/CreateCarriageSnapshot"}},"current_station":{"type":"string","format":"uuid"}},"required":["id"]},"Vec3Snapshot":{"type":"object","title":"Vec3 Snapshot","properties":{"x":{"type":"number","format":"double"},"y":{"type":"number","format":"double"},"z":{"type":"number","format":"double"}}},"CreateTrainStatusSnapshot":{"type":"object","title":"Create Train Status Snapshot","properties":{"navigation_failed":{"type":"boolean"},"track_problem":{"type":"boolean"},"conductor_missing":{"type":"boolean"},"stalled":{"type":"boolean"},"has_schedule":{"type":"boolean"},"paused":{"type":"boolean"},"completed":{"type":"boolean"},"schedule_state":{"type":"string"},"title":{"type":"string"},"destination":{"type":"string"},"distance_to_destination":{"type":"number","format":"double"},"waiting_for_signal":{"type":"boolean"}}},"CreateCarriageSnapshot":{"type":"object","title":"Create Carriage Snapshot","properties":{"id":{"type":"integer","format":"int32"},"leading":{"$ref":"#/components/schemas/Vec3Snapshot"},"trailing":{"$ref":"#/components/schemas/Vec3Snapshot"},"length":{"type":"number","format":"double"},"bogey_spacing":{"type":"integer","format":"int32"}}},"CreateSignalSnapshot":{"type":"object","title":"Create Signal Snapshot","properties":{"id":{"type":"string","format":"uuid"},"edge_location":{"type":"array","items":{"$ref":"#/components/schemas/TrackNodeLocationSnapshot"}},"position":{"type":"number","format":"double"},"dimension":{"type":"string","example":"minecraft:overworld"},"types":{"type":"array","items":{"type":"string"}},"groups":{"type":"array","items":{"type":"string","format":"uuid"}},"states":{"type":"array","items":{"type":"string"}},"block_positions":{"type":"array","items":{"type":"object","properties":{"x":{"type":"integer","format":"int32"},"y":{"type":"integer","format":"int32"},"z":{"type":"integer","format":"int32"}}}}},"required":["id"]},"CreateTrackGraphSnapshot":{"type":"object","title":"Create Track Graph Snapshot","properties":{"id":{"type":"string","format":"uuid"},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/CreateTrackNodeSnapshot"}},"edges":{"type":"array","items":{"$ref":"#/components/schemas/CreateTrackEdgeSnapshot"}}},"required":["id"]},"CreateTrackNodeSnapshot":{"type":"object","title":"Create Track Node Snapshot","properties":{"net_id":{"type":"integer","format":"int32"},"location":{"$ref":"#/components/schemas/TrackNodeLocationSnapshot"}},"required":["net_id"]},"CreateTrackEdgeSnapshot":{"type":"object","title":"Create Track Edge Snapshot","properties":{"node1":{"type":"integer","format":"int32"},"node2":{"type":"integer","format":"int32"},"length":{"type":"number","format":"double"},"turn":{"type":"boolean"},"inter_dimensional":{"type":"boolean"}}},"TrainCategory":{"type":"object","title":"Train Category","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"color":{"type":"string","description":"ARGB color as #AARRGGBB.","example":"#FF3366CC"},"owner":{"$ref":"#/components/schemas/Lock"},"last_editor":{"$ref":"#/components/schemas/Owner"},"last_edited_time":{"type":"integer","format":"int64"}}},"Lock":{"type":"object","title":"Lock","properties":{"owner":{"$ref":"#/components/schemas/Owner"},"state":{"type":"string","enum":["UNLOCKED","LOCKED"]},"trusted":{"type":"array","items":{"$ref":"#/components/schemas/Owner"}}}},"Owner":{"type":"object","title":"Owner","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"TrainLine":{"type":"object","title":"Train Line","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"line_color":{"type":"string","description":"ARGB color as #AARRGGBB.","example":"#FF3366CC"},"owner":{"$ref":"#/components/schemas/Lock"},"last_editor":{"$ref":"#/components/schemas/Owner"},"last_edited_time":{"type":"integer","format":"int64"}}},"StationTag":{"type":"object","title":"Station Tag","properties":{"id":{"type":"string","format":"uuid"},"tag_name":{"$ref":"#/components/schemas/TagName"},"stations":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/StationTagStationInfo"}},"owner":{"$ref":"#/components/schemas/Lock"},"last_editor":{"$ref":"#/components/schemas/Owner"},"last_edited_time":{"type":"integer","format":"int64"}}},"TagName":{"type":"object","title":"Tag Name","properties":{"name":{"type":"string"}}},"Error":{"type":"object","properties":{"status":{"type":"integer","format":"int32"},"error":{"type":"string"}}}},"parameters":{"Fields":{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as \u0027parent.child\u0027. When this parameter is set, only the listed fields plus the ones the server always includes are returned, so a field otherwise marked as required in the schema may be missing.","schema":{"type":"string"}},"Sort":{"name":"sort","in":"query","required":false,"description":"Comma-separated list of fields by which the array response should be sorted. Add the prefix \u0027-\u0027 for descending order.","schema":{"type":"string"}},"Limit":{"name":"limit","in":"query","required":false,"description":"Maximum number of items to return from an array response.","schema":{"type":"integer"}},"Offset":{"name":"offset","in":"query","required":false,"description":"Amount of items to skip from the start of an array response.","schema":{"type":"integer"}}}},"externalDocs":{"url":"https://wiki.mrjulsen.net/createrailwaysnavigator","description":"Project page"}}