The content of this page was automatically generated from an OpenAPI JSON file.
Create Railways Navigator Web API 1.1.0.0¶
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.
Servers¶
| URL | Description |
|---|---|
/createrailwaysnavigator/api/v1
|
Base path via the 'createrailwaysnavigator' namespace. |
/crn/api/v1
|
Base path via the 'crn' namespace. |
Common¶
GET /openapi
OpenAPI 3.1 specs
The OpenAPI document describing every endpoint of this API.
Responses
200 OpenAPI 3.1 specs
Schema of the response body
{
"type": "object"
}
Other responses
{
"status": 49,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /openapi.json
OpenAPI 3.1 specs
The OpenAPI document describing every endpoint of this API.
Responses
200 OpenAPI 3.1 specs
Schema of the response body
{
"type": "object"
}
Other responses
{
"status": 290,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /ping
Health check
Returns a small plain-text response to check if the API is reachable.
Responses
200 A short plain-text reply.
"string"
Schema of the response body
{
"type": "string"
}
Other responses
{
"status": 193,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /hello
Health check
Returns a small plain-text response to check if the API is reachable.
Responses
200 A short plain-text reply.
"string"
Schema of the response body
{
"type": "string"
}
Other responses
{
"status": 36,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /about
About this server
All information about the mod, the running game instance and the loaded mod list.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
Responses
200 About this server
{
"minecraft_version": "string",
"mod_id": "string",
"mod_name": "string",
"mod_version": "string",
"mod_homepage": "string",
"mod_sources": "string",
"mod_issue_tracker": "string",
"mod_license": [
"string"
],
"platform": "string",
"api_version": "string",
"dev_env": true,
"environment": "string",
"modlist": [
{
"mod_id": "string",
"mod_name": "string",
"version": "string"
}
]
}
Schema of the response body
{
"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"
}
}
}
}
Other responses
{
"status": 76,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /time
Current game time
The current time on the server. Use this to Compare snapshot timestamps.
Responses
200 Current game time
{
"time": 237
}
Schema of the response body
{
"type": "object",
"title": "Time Now Endpoint Data",
"properties": {
"time": {
"type": "integer",
"format": "int64",
"description": "The current game time in ticks."
}
}
}
Other responses
{
"status": 274,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /backend-stats
Backend status
Whether the train data backend is active and how many trains are being tracked.
Responses
200 Backend status
{
"active": true,
"tracked_trains_count": 168
}
Schema of the response body
{
"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."
}
}
}
Other responses
{
"status": 10,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Routing¶
GET /navigate
Search for routes
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.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
avoid_stations |
query | array | Names of stations the journey must not call at. |
departure_in |
query | integer | Earliest departure, given as a number of ticks from now. |
direct |
query | boolean | Whether to accept only journeys that need no transfer. |
excluding_categories |
query | array | Category ids the journey must avoid. |
excluding_lines |
query | array | Line ids the journey must avoid. |
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
from* |
query | string | The station the journey starts at. |
max_results |
query | integer | The most journeys to return. |
max_transfers |
query | integer | The max number of transfers a journey may have. -1 means unlimited. The server's configured cap still applies on top of this. |
only_categories |
query | array | If set, the only category ids the journey may use. |
only_lines |
query | array | If set, the only line ids the journey may use. |
optimization |
query | string |
How the found journeys are ordered. Available values: FASTEST, FEWEST_TRANSFERS |
to* |
query | string | The station the journey ends at. |
transfer_time |
query | integer | The least time to allow for a transfer, in ticks. |
via |
query | array |
Waypoints the journey must pass through, in order. Repeat the parameter for each waypoint. Every value is a station name, optionally suffixed with ': |
Responses
200 Search for routes
{
"status": "OK",
"journeys": [
{
"legs": [
{
"train_id": "7ac45aea-ee90-45ed-a5d9-225a10604b3b",
"session_id": "7f26ef2f-3841-4241-bac7-adbb06cd9da7",
"train_name": "string",
"icon_id": "minecraft:overworld",
"line": {
"id": "6436abf2-96a5-4295-bd69-5155e2d59a51",
"name": "string",
"color": "#FF3366CC"
},
"category": {
"id": "b3dcf0d2-3307-45b4-ab7a-417d68835b1e",
"name": "string",
"color": "#FF3366CC"
},
"destination_text": "string",
"section_index": 288,
"cancelled": true,
"calls": [
{
"scheduled_station": {
"name": "string",
"tag_name": "string",
"tag_id": "294dbbfc-d6f2-4d8d-8ab1-28eff2463807",
"info": {
"platform": "string"
}
},
"entry_index": 204,
"cycle": 195,
"scheduled": {
"arrival": 138,
"departure": 237,
"min_departure": 217
},
"station": null,
"realtime": null,
"passed": true
}
],
"delays": {
"entries": {},
"frozen": true
}
}
],
"transfers": [
{
"from": null,
"to": null,
"min_transfer_time": 212,
"risk_buffer": 71,
"stays_seated": true
}
]
}
],
"computed_at": 114,
"duration_ms": 175,
"stations_searched": 26,
"trips_scanned": 113
}
Schema of the response body
{
"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"
}
}
}
400 A required parameter is missing or empty, or a parameter could not be parsed.
{
"status": 167,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
404 A station named in the query (origin, destination or a waypoint) does not exist.
{
"status": 292,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 50,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Trains¶
GET /trains
List trains
Every train that is shown publicly.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
cancelled_only |
query | boolean | Keep only trains that are (true) or are not (false) out of service. |
categories |
query | array | Keep only trains running under one of these category ids now. |
delayed_only |
query | boolean | Keep only trains that are (true) or are not (false) running late. |
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
limit |
query | integer | Maximum number of items to return from an array response. |
lines |
query | array | Keep only trains working one of these line ids now. |
live_state |
query | string |
Keep only trains in this live state. Available values: NO_SCHEDULE, SCHEDULE_PAUSED, SCHEDULE_COMPLETED, DERAILED, AT_STATION, EN_ROUTE, WAITING_FOR_SIGNAL, STALLED |
name |
query | string | Keep only trains with exactly this name. |
offset |
query | integer | Amount of items to skip from the start of an array response. |
owners |
query | array | Keep only trains owned by one of these player ids. |
reportable |
query | boolean | Keep only trains that are (true) or are not (false) fit to be shown publicly. |
service_state |
query | string |
Keep only trains in this service state. Available values: IN_SERVICE, DISRUPTED, IDLE |
session_ids |
query | array | Keep only trains with one of these tracking session ids. |
sort |
query | string | Comma-separated list of fields by which the array response should be sorted. Add the prefix '-' for descending order. |
state |
query | string |
Keep only trains in this lifecycle state. Available values: PREPARING, LEARNING, READY, CANCELLED, IDLE |
Responses
200 List trains
[
{
"train_id": "1be235ce-1009-4f2e-989f-54df7d1d3845",
"session_id": "77b1b299-ecc6-4680-8d1a-a370038c83db",
"train_name": "string",
"owner_id": "61d1a34c-ab66-4edd-9821-7e93cec399d1",
"icon_id": "minecraft:overworld",
"map_color_index": 226,
"line": {
"id": "aa88c494-fe77-45e3-88a4-0cbf52cb0bce",
"name": "string",
"color": "#FF3366CC"
},
"category": {
"id": "baed50ac-16ca-435d-a96d-5cac90d0d5e5",
"name": "string",
"color": "#FF3366CC"
},
"lifecycle": "PREPARING",
"live_state": "NO_SCHEDULE",
"service_state": "IN_SERVICE",
"max_deviation": 0,
"delay_offset": 235,
"total_duration": 149,
"current_title": "string",
"destination": {
"name": "string",
"tag_name": "string",
"tag_id": "7b124e24-dca2-4b85-8848-5d33382a2abb",
"info": {
"platform": "string"
}
},
"current_station": null,
"next_station": null,
"section_index": 92,
"stop_count": 126,
"carriage_count": 14,
"position": {
"train_id": "6dbdce3d-3c28-4f70-9a5f-66bef620639c",
"dimension": "minecraft:overworld",
"position": {
"x": 223,
"y": 151,
"z": 300
},
"dimensions": [
"minecraft:overworld"
],
"speed": 10.12,
"target_speed": 10.12,
"max_speed": 10.12,
"throttle": 10.12,
"backwards": true,
"distance_to_next_stop": 10.12,
"exit_side": "UNKNOWN"
},
"delays": [
{
"cause_id": "minecraft:overworld",
"severity": "INFO",
"since": 159,
"estimated_delay_ticks": 22,
"args": [
{
"type": "TEXT",
"value": "string"
}
],
"origin": "DETECTED"
}
]
}
]
Schema of the response body
{
"type": "array",
"items": {
"$ref": "#/components/schemas/TrainSnapshot"
}
}
Response headers
| Name | Description | Schema |
|---|---|---|
X-Total-Count |
Total number of matching items. | integer |
X-Offset |
Index of the first returned item. | integer |
X-Limit |
The limit that was applied (only when a limit was given). | integer |
Other responses
{
"status": 210,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /trains/positions
List train positions
The location of every train publicly visible and its current speed.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
at_station_only |
query | boolean | Keep only trains that are (true) or are not (false) standing at a station. |
dimensions |
query | array | Keep only trains in one of these dimensions, e.g. minecraft:overworld. |
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
limit |
query | integer | Maximum number of items to return from an array response. |
moving_only |
query | boolean | Keep only trains that are (true) or are not (false) moving. |
offset |
query | integer | Amount of items to skip from the start of an array response. |
sort |
query | string | Comma-separated list of fields by which the array response should be sorted. Add the prefix '-' for descending order. |
Responses
200 List train positions
[
{
"train_id": "0e8fdc09-aac7-441e-addb-e3903148d708",
"dimension": "minecraft:overworld",
"position": {
"x": 184,
"y": 114,
"z": 12
},
"dimensions": [
"minecraft:overworld"
],
"speed": 10.12,
"target_speed": 10.12,
"max_speed": 10.12,
"throttle": 10.12,
"backwards": true,
"distance_to_next_stop": 10.12,
"exit_side": "UNKNOWN"
}
]
Schema of the response body
{
"type": "array",
"items": {
"$ref": "#/components/schemas/TrainPositionSnapshot"
}
}
Response headers
| Name | Description | Schema |
|---|---|---|
X-Total-Count |
Total number of matching items. | integer |
X-Offset |
Index of the first returned item. | integer |
X-Limit |
The limit that was applied (only when a limit was given). | integer |
Other responses
{
"status": 173,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /train/{id}
Get a train
A train by its id.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
id* |
path | string |
Responses
200 Get a train
{
"train_id": "ebae99cd-8361-4224-9471-2977c14f221c",
"session_id": "7f757b32-89f5-4220-a3dc-6561ac9f220d",
"train_name": "string",
"owner_id": "5bd98207-4fb0-4041-a440-5a12d46e6e92",
"icon_id": "minecraft:overworld",
"map_color_index": 300,
"line": {
"id": "1235e013-cb07-4f50-afb3-582b3a2caa52",
"name": "string",
"color": "#FF3366CC"
},
"category": {
"id": "e7e2734f-6497-45d2-97d3-99ec3a885b95",
"name": "string",
"color": "#FF3366CC"
},
"lifecycle": "PREPARING",
"live_state": "NO_SCHEDULE",
"service_state": "IN_SERVICE",
"max_deviation": 192,
"delay_offset": 62,
"total_duration": 64,
"current_title": "string",
"destination": {
"name": "string",
"tag_name": "string",
"tag_id": "619ab206-f5ba-4ea2-aa88-a99368e4a08d",
"info": {
"platform": "string"
}
},
"current_station": null,
"next_station": null,
"section_index": 147,
"stop_count": 197,
"carriage_count": 76,
"position": {
"train_id": "c47c4d7c-db1a-4009-9e7e-5bd1426139c0",
"dimension": "minecraft:overworld",
"position": {
"x": 93,
"y": 43,
"z": 65
},
"dimensions": [
"minecraft:overworld"
],
"speed": 10.12,
"target_speed": 10.12,
"max_speed": 10.12,
"throttle": 10.12,
"backwards": true,
"distance_to_next_stop": 10.12,
"exit_side": "UNKNOWN"
},
"delays": [
{
"cause_id": "minecraft:overworld",
"severity": "INFO",
"since": 174,
"estimated_delay_ticks": 275,
"args": [
{
"type": "TEXT",
"value": "string"
}
],
"origin": "DETECTED"
}
]
}
Schema of the response body
{
"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"
]
}
404 No train with that id exists.
{
"status": 194,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 37,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /train/{id}/journey
Get a train's journey
The full run of one train.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
id* |
path | string | |
in_cycles |
query | integer | The number of cycles for which the train should be simulated to the future. |
Responses
200 Get a train's journey
{
"train_id": "6c6232e7-556b-4530-b2d5-a2b51e18e311",
"train_name": "string",
"line": {
"id": "4940aa71-b21d-48e8-96a6-a018cd95e68e",
"name": "string",
"color": "#FF3366CC"
},
"cyclic": true,
"total_duration": 202,
"stops": [
{
"entry_index": 292,
"stop_index": 257,
"section_index": 121,
"station_filter": "string",
"scheduled_station": {
"name": "string",
"tag_name": "string",
"tag_id": "faae1eee-8a13-49f7-adc3-760e2d42f405",
"info": {
"platform": "string"
}
},
"station": null,
"title": "string",
"scheduled": {
"arrival": 256,
"departure": 146,
"min_departure": 173
},
"realtime": null,
"previous_actual": null,
"leg_duration_ticks": 188,
"dwell_duration_ticks": 250,
"completed_visits": 13
}
],
"sections": [
{
"index": 236,
"entry_index": 234,
"line": null,
"category": {
"id": "f28e6da2-f4aa-49d1-8f78-b10b505a23d9",
"name": "string",
"color": "#FF3366CC"
},
"origin": null,
"destination": null,
"stops": null,
"current_stop_index": 48,
"usable": true,
"default_section": true,
"includes_next_section_start": true
}
],
"current_stop_index": 23,
"current_section_index": 230
}
Schema of the response body
{
"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"
]
}
404 No train with that id exists.
{
"status": 31,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 107,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /train/{id}/section
Get a train's current section
The current schedule section of a train.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
id* |
path | string |
Responses
200 Get a train's current section
{
"index": 151,
"entry_index": 214,
"line": {
"id": "8db68a52-8da8-4b71-883b-835fb194bea1",
"name": "string",
"color": "#FF3366CC"
},
"category": {
"id": "0add662f-dff9-450e-a9e4-2fe09dec5635",
"name": "string",
"color": "#FF3366CC"
},
"origin": {
"name": "string",
"tag_name": "string",
"tag_id": "98a29086-924f-4831-a034-a23ca044f21c",
"info": {
"platform": "string"
}
},
"destination": null,
"stops": [
{
"entry_index": 40,
"stop_index": 80,
"section_index": 138,
"station_filter": "string",
"scheduled_station": null,
"station": null,
"title": "string",
"scheduled": {
"arrival": 200,
"departure": 171,
"min_departure": 80
},
"realtime": null,
"previous_actual": null,
"leg_duration_ticks": 185,
"dwell_duration_ticks": 135,
"completed_visits": 155
}
],
"current_stop_index": 151,
"usable": true,
"default_section": true,
"includes_next_section_start": true
}
Schema of the response body
{
"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"
}
}
}
404 No train with that id exists, or it has no active section.
{
"status": 196,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 238,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /train/{id}/position
Get a train's position
The location of one train with its current speed.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
id* |
path | string |
Responses
200 Get a train's position
{
"train_id": "34abd918-1b3a-4637-a3d3-63d584a23bda",
"dimension": "minecraft:overworld",
"position": {
"x": 179,
"y": 13,
"z": 104
},
"dimensions": [
"minecraft:overworld"
],
"speed": 10.12,
"target_speed": 10.12,
"max_speed": 10.12,
"throttle": 10.12,
"backwards": true,
"distance_to_next_stop": 10.12,
"exit_side": "UNKNOWN"
}
Schema of the response body
{
"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"
]
}
404 No train with that id exists.
{
"status": 12,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 221,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /train/{id}/composition
Get a train's composition
Information about all carriages of a train.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
id* |
path | string |
Responses
200 Get a train's composition
{
"train_id": "42c3bb3c-9f4f-4d6b-a3f3-02e1664a9794",
"carriages": [
{
"index": 108,
"length_blocks": 168,
"on_two_bogeys": true,
"dimension": "minecraft:overworld",
"position": {
"x": 46,
"y": 178,
"z": 286
},
"blocked": true,
"stalled": true,
"has_conductor": true,
"has_storage": true,
"in_multiple_dimensions": true
}
],
"total_length_blocks": 78,
"double_ended": true,
"backwards": true
}
Schema of the response body
{
"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"
]
}
404 No train with that id exists.
{
"status": 82,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 161,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /train/{id}/stops
List all train stops
All stops of one train.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
direction |
query | string |
The stops to list (ALL (default), PREVIOUS or NEXT). Available values: ALL, PREVIOUS, NEXT |
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
id* |
path | string | |
limit |
query | integer | Maximum number of items to return from an array response. |
offset |
query | integer | Amount of items to skip from the start of an array response. |
sort |
query | string | Comma-separated list of fields by which the array response should be sorted. Add the prefix '-' for descending order. |
Responses
200 List all train stops
[
{
"entry_index": 92,
"stop_index": 191,
"section_index": 49,
"station_filter": "string",
"scheduled_station": {
"name": "string",
"tag_name": "string",
"tag_id": "27cf1324-98b7-439e-bf91-6e2224bae0e7",
"info": {
"platform": "string"
}
},
"station": null,
"title": "string",
"scheduled": {
"arrival": 159,
"departure": 208,
"min_departure": 181
},
"realtime": null,
"previous_actual": null,
"leg_duration_ticks": 217,
"dwell_duration_ticks": 167,
"completed_visits": 81
}
]
Schema of the response body
{
"type": "array",
"items": {
"$ref": "#/components/schemas/StopSnapshot"
}
}
Response headers
| Name | Description | Schema |
|---|---|---|
X-Total-Count |
Total number of matching items. | integer |
X-Offset |
Index of the first returned item. | integer |
X-Limit |
The limit that was applied (only when a limit was given). | integer |
404 No train with that id exists.
{
"status": 124,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 36,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /train/{id}/stop
Get one train stop
A single stop of a train.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
direction |
query | string |
The stop to return (PREVIOUS, CURRENT (default) or NEXT). Available values: PREVIOUS, CURRENT, NEXT |
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
id* |
path | string | |
station |
query | string | The stop to be searched for in the selected direction, instead of the next one. |
Responses
200 Get one train stop
{
"entry_index": 152,
"stop_index": 41,
"section_index": 185,
"station_filter": "string",
"scheduled_station": {
"name": "string",
"tag_name": "string",
"tag_id": "cb2706a6-9cff-4563-a87b-4b07b32e1cc4",
"info": {
"platform": "string"
}
},
"station": null,
"title": "string",
"scheduled": {
"arrival": 219,
"departure": 150,
"min_departure": 138
},
"realtime": null,
"previous_actual": null,
"leg_duration_ticks": 82,
"dwell_duration_ticks": 157,
"completed_visits": 209
}
Schema of the response body
{
"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"
}
}
}
404 No train with that id exists.
{
"status": 109,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 108,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /train/{id}/delay-report
Get a train's delay report
Information about the delays of a train, like the reasons and the actual delay value.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
id* |
path | string |
Responses
200 Get a train's delay report
{
"train_id": "966ee04f-a973-42e4-a7fa-b2a8c8a4aab4",
"train_name": "string",
"delayed": true,
"cancelled": true,
"max_deviation": 138,
"delay_offset": 19,
"next_stop_arrival_deviation": 44,
"next_stop_departure_deviation": 125,
"signal_wait_ticks": 128,
"stalled_ticks": 279,
"dwell_ticks": 46,
"separation_hold_ticks": 70,
"blocking_trains": [
"string"
],
"causes": [
{
"cause_id": "minecraft:overworld",
"severity": "INFO",
"since": 58,
"estimated_delay_ticks": 262,
"args": [
{
"type": "TEXT",
"value": "string"
}
],
"origin": "DETECTED"
}
]
}
Schema of the response body
{
"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"
]
}
404 No train with that id exists.
{
"status": 227,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 212,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Departures¶
GET /board/{station}
Station board
The calls at a station, ordered by arrival, just like a departure board would show them.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
allow_duplicates |
query | boolean | Keep every call of a train rather than only its earliest. |
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
limit |
query | integer | Maximum number of items to return from an array response. |
no_platform_changes |
query | boolean | Drop trains merely timetabled here but diverted to another station. |
offset |
query | integer | Amount of items to skip from the start of an array response. |
only_category |
query | string | Restrict the board to entries of this category id. |
only_line |
query | string | Restrict the board to entries of this line id. |
show_cancelled |
query | boolean | Also include trains that are out of service. |
sort |
query | string | Comma-separated list of fields by which the array response should be sorted. Add the prefix '-' for descending order. |
station* |
path | string | |
time |
query | integer | Start the board at this time (in ticks) instead of now. |
timespan |
query | integer | How many ticks after the start time to include. Zero or less means no upper bound. |
Responses
200 Station board
[
{
"train_id": "05c4a264-5148-4228-b927-b7c7205513fc",
"session_id": "368825f6-e910-42f4-99de-ac2983ff5b18",
"train_name": "string",
"carriage_count": 128,
"line": {
"id": "934888f2-a97b-465c-a77e-d6b313be78e7",
"name": "string",
"color": "#FF3366CC"
},
"category": {
"id": "d24bc9fa-c320-4b91-9554-a29529557712",
"name": "string",
"color": "#FF3366CC"
},
"arrival_line": null,
"arrival_category": null,
"station": {
"name": "string",
"tag_name": "string",
"tag_id": "41ccb664-9bdb-442c-9367-4161ab89f14d",
"info": {
"platform": "string"
}
},
"scheduled_station": null,
"origin": null,
"title": "string",
"destination": null,
"scheduled": {
"arrival": 265,
"departure": 229,
"min_departure": 61
},
"realtime": null,
"service_state": "IN_SERVICE",
"visit_state": "PASSED",
"entry_index": 256,
"section_index": 22,
"terminus": true,
"originating": true,
"section_change": true,
"stopovers": null,
"delays": [
{
"cause_id": "minecraft:overworld",
"severity": "INFO",
"since": 14,
"estimated_delay_ticks": 30,
"args": [
{
"type": "TEXT",
"value": "string"
}
],
"origin": "DETECTED"
}
]
}
]
Schema of the response body
{
"type": "array",
"items": {
"$ref": "#/components/schemas/BoardEntry"
}
}
Response headers
| Name | Description | Schema |
|---|---|---|
X-Total-Count |
Total number of matching items. | integer |
X-Offset |
Index of the first returned item. | integer |
X-Limit |
The limit that was applied (only when a limit was given). | integer |
Other responses
{
"status": 152,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /departure-stats/{station}
Station departure statistics
Summary about the departures recorded at a specific station (e.g. punctually).
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
station* |
path | string |
Responses
200 Station departure statistics
{
"last_departure": 179,
"departures_by_category": {},
"departures_by_line": {},
"departures_by_name": {}
}
Schema of the response body
{
"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"
}
}
}
}
Other responses
{
"status": 181,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Lines and Categories¶
GET /lines
List lines
Every line with the trains using it.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
limit |
query | integer | Maximum number of items to return from an array response. |
offset |
query | integer | Amount of items to skip from the start of an array response. |
sort |
query | string | Comma-separated list of fields by which the array response should be sorted. Add the prefix '-' for descending order. |
station_tags |
query | array | Keep only lines calling at a station in one of these tag ids. |
stations |
query | string | Keep only lines calling at a station whose name matches this filter (wildcard syntax allowed). |
trains |
query | array | Keep only lines worked by one of these train ids. |
Responses
200 List lines
[
{
"line": {
"id": "6fcc2be9-ff7f-4f01-a095-1d36a124e118",
"name": "string",
"color": "#FF3366CC"
},
"train_ids": [
"879bbda1-7f3d-4531-87d9-e615e1dbe6d2"
],
"stations": [
{
"name": "string",
"tag_name": "string",
"tag_id": "cb762021-1504-449d-b225-70c27b4347e3",
"info": {
"platform": "string"
}
}
],
"delayed_trains": 129
}
]
Schema of the response body
{
"type": "array",
"items": {
"$ref": "#/components/schemas/LineSnapshot"
}
}
Response headers
| Name | Description | Schema |
|---|---|---|
X-Total-Count |
Total number of matching items. | integer |
X-Offset |
Index of the first returned item. | integer |
X-Limit |
The limit that was applied (only when a limit was given). | integer |
Other responses
{
"status": 242,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /line/{id}
Get a line
One line with the trains using it.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
id* |
path | string |
Responses
200 Get a line
{
"line": {
"id": "25688fdb-7d47-4071-962a-5eeb3f720f54",
"name": "string",
"color": "#FF3366CC"
},
"train_ids": [
"6bd1d16c-6c66-4df2-a1f5-c3a6efddd519"
],
"stations": [
{
"name": "string",
"tag_name": "string",
"tag_id": "121aad83-cfbe-42b2-831e-371a5b522be0",
"info": {
"platform": "string"
}
}
],
"delayed_trains": 63
}
Schema of the response body
{
"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"
]
}
404 No line with that id exists.
{
"status": 211,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 124,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /categories
List categories
Every category with the trains using it.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
limit |
query | integer | Maximum number of items to return from an array response. |
lines |
query | array | Keep only categories covering one of these line ids. |
offset |
query | integer | Amount of items to skip from the start of an array response. |
sort |
query | string | Comma-separated list of fields by which the array response should be sorted. Add the prefix '-' for descending order. |
trains |
query | array | Keep only categories run under by one of these train ids. |
Responses
200 List categories
[
{
"category": {
"id": "f5fe3e86-550f-42e1-9ba1-452ed64300ca",
"name": "string",
"color": "#FF3366CC"
},
"train_ids": [
"215cf0a8-44b7-4949-9671-c42020e51194"
],
"lines": [
{
"id": "a48cd87d-1950-401b-80a3-7cdd3c504d63",
"name": "string",
"color": "#FF3366CC"
}
],
"delayed_trains": 161
}
]
Schema of the response body
{
"type": "array",
"items": {
"$ref": "#/components/schemas/CategorySnapshot"
}
}
Response headers
| Name | Description | Schema |
|---|---|---|
X-Total-Count |
Total number of matching items. | integer |
X-Offset |
Index of the first returned item. | integer |
X-Limit |
The limit that was applied (only when a limit was given). | integer |
Other responses
{
"status": 27,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /category/{id}
Get a category
One category with the trains using it.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
id* |
path | string |
Responses
200 Get a category
{
"category": {
"id": "a31eecef-5ca7-4629-9c17-93cb3ebf7092",
"name": "string",
"color": "#FF3366CC"
},
"train_ids": [
"c04952fa-fad0-4ada-902a-baed7be545b8"
],
"lines": [
{
"id": "855a8f55-be05-4b2e-b1f2-fcc4d97fb579",
"name": "string",
"color": "#FF3366CC"
}
],
"delayed_trains": 54
}
Schema of the response body
{
"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"
]
}
404 No category with that id exists.
{
"status": 36,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 116,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Stations¶
GET /stations
List stations
Every station the backend knows about, ordered by name.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
categories |
query | array | Keep only stations served by one of these category ids. |
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
filter |
query | string | Keep only stations whose name matches this filter, which may use the schedule's wildcard syntax. |
hide_blacklisted |
query | boolean | Drop stations hidden from public display when set to true. |
limit |
query | integer | Maximum number of items to return from an array response. |
lines |
query | array | Keep only stations served by one of these line ids. |
offset |
query | integer | Amount of items to skip from the start of an array response. |
sort |
query | string | Comma-separated list of fields by which the array response should be sorted. Add the prefix '-' for descending order. |
station_tags |
query | array | Keep only stations belonging to one of these tag ids. |
trains |
query | array | Keep only stations served by one of these train ids. |
Responses
200 List stations
[
{
"station": {
"name": "string",
"tag_name": "string",
"tag_id": "842f9690-f9f4-4e08-84f9-d5a644fa9087",
"info": {
"platform": "string"
}
},
"tags": [
{
"id": "a5efb4bf-badf-43f2-9690-e2e4dd40357b",
"name": "string"
}
],
"lines": [
{
"id": "c9e3bcac-3a13-480c-a2c7-be4e72e8457b",
"name": "string",
"color": "#FF3366CC"
}
],
"categories": [
{
"id": "7db68ff4-2a4f-4547-8890-9cbc00cf7ba1",
"name": "string",
"color": "#FF3366CC"
}
],
"train_ids": [
"41a69a9c-8916-4430-b113-23c2c8da6b83"
],
"blacklisted": true
}
]
Schema of the response body
{
"type": "array",
"items": {
"$ref": "#/components/schemas/StationSnapshot"
}
}
Response headers
| Name | Description | Schema |
|---|---|---|
X-Total-Count |
Total number of matching items. | integer |
X-Offset |
Index of the first returned item. | integer |
X-Limit |
The limit that was applied (only when a limit was given). | integer |
Other responses
{
"status": 239,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /station/{name}
Get a station
Information about a station, like its tags, the lines and categories calling there, and the trains that serve it.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
name* |
path | string |
Responses
200 Get a station
{
"station": {
"name": "string",
"tag_name": "string",
"tag_id": "ad460d2e-88c8-4e68-89b0-08761d98a47c",
"info": {
"platform": "string"
}
},
"tags": [
{
"id": "89951ad8-ad90-4924-8368-369661a08235",
"name": "string"
}
],
"lines": [
{
"id": "516ac785-bb13-4db4-aaa1-55ab310240a0",
"name": "string",
"color": "#FF3366CC"
}
],
"categories": [
{
"id": "6c63675c-6669-4bab-a8d9-1a9e62a1c023",
"name": "string",
"color": "#FF3366CC"
}
],
"train_ids": [
"4272db5a-bb94-4d60-8e9f-66dc5d4db786"
],
"blacklisted": true
}
Schema of the response body
{
"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"
]
}
404 No station with that name exists.
{
"status": 23,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 241,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Create¶
GET /create/stations
List Create stations
Raw station data from Create.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
assembling |
query | boolean | Keep only stations that are (true) or are not (false) assembling a train. |
dimension |
query | array | Keep only stations in one of these dimensions. |
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
filter |
query | string | Keep only stations whose name matches this filter (wildcard syntax allowed). |
id |
query | array | Keep only stations with one of these ids. |
imminent_train |
query | array | Keep only stations whose imminent train is one of these ids. |
limit |
query | integer | Maximum number of items to return from an array response. |
nearest_train |
query | array | Keep only stations whose nearest train is one of these ids. |
offset |
query | integer | Amount of items to skip from the start of an array response. |
present_train |
query | array | Keep only stations with one of these train ids currently present. |
sort |
query | string | Comma-separated list of fields by which the array response should be sorted. Add the prefix '-' for descending order. |
Responses
200 List Create stations
[
{
"id": "6185b86d-2251-4889-9bbd-ea982fcc83df",
"name": "string",
"position": {
"x": 66,
"y": 22,
"z": 152
},
"dimension": "minecraft:overworld",
"assembling": true,
"nearest_train": "f126e021-bd0a-4d21-9182-6b28a3ba13d5",
"imminent_train": "3d5138ec-220b-4e0b-9295-c47c4d6b86b3",
"present_train": "78ab0128-a7d7-40b6-94ae-815f944519df",
"edge_location": [
{
"x": 114,
"y": 129,
"z": 119,
"y_offset_pixels": 300,
"dimension": "minecraft:overworld"
}
],
"edge_position": 10.12
}
]
Schema of the response body
{
"type": "array",
"items": {
"$ref": "#/components/schemas/CreateStationSnapshot"
}
}
Response headers
| Name | Description | Schema |
|---|---|---|
X-Total-Count |
Total number of matching items. | integer |
X-Offset |
Index of the first returned item. | integer |
X-Limit |
The limit that was applied (only when a limit was given). | integer |
Other responses
{
"status": 129,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /create/station/{id}
Get a Create station
Raw Create station data by its id.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
id* |
path | string |
Responses
200 Get a Create station
{
"id": "126490ba-3ffa-4670-ac4e-b84a0fc92372",
"name": "string",
"position": {
"x": 97,
"y": 78,
"z": 202
},
"dimension": "minecraft:overworld",
"assembling": true,
"nearest_train": "0b14d648-2108-44bb-ab26-64281e7865b5",
"imminent_train": "93fdfe90-ade5-43f3-8fd6-3a5ebc9bab67",
"present_train": "33fe25fc-ea1b-4037-826c-88cd232b5dca",
"edge_location": [
{
"x": 89,
"y": 245,
"z": 86,
"y_offset_pixels": 85,
"dimension": "minecraft:overworld"
}
],
"edge_position": 10.12
}
Schema of the response body
{
"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"
]
}
404 No station with that id exists.
{
"status": 58,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 49,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /create/trains
List Create trains
Raw train data from Create, not processed or modified by CRN's backend.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
derailed |
query | boolean | Keep only trains that are (true) or are not (false) derailed. |
dimension |
query | array | Keep only trains in one of these dimensions. |
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
filter |
query | string | Keep only trains whose name matches this filter (wildcard syntax allowed). |
graph |
query | array | Keep only trains on one of these track graph ids. |
id |
query | array | Keep only trains with one of these ids. |
limit |
query | integer | Maximum number of items to return from an array response. |
offset |
query | integer | Amount of items to skip from the start of an array response. |
sort |
query | string | Comma-separated list of fields by which the array response should be sorted. Add the prefix '-' for descending order. |
Responses
200 List Create trains
[
{
"id": "9d83ead6-ba79-426c-9cf1-4b9bce8c3a02",
"name": "string",
"owner": "92849522-6f7b-4d2a-a2eb-32a2e57797c5",
"graph": "03dcb461-201a-47bb-9b03-90a5570b0944",
"dimension": "minecraft:overworld",
"position": {
"x": 10.12,
"y": 10.12,
"z": 10.12
},
"speed": 10.12,
"backwards": true,
"derailed": true,
"status": {
"navigation_failed": true,
"track_problem": true,
"conductor_missing": true,
"stalled": true,
"has_schedule": true,
"paused": true,
"completed": true,
"schedule_state": "string",
"title": "string",
"destination": "string",
"distance_to_destination": 10.12,
"waiting_for_signal": true
},
"carriages": [
{
"id": 105,
"leading": null,
"trailing": null,
"length": 10.12,
"bogey_spacing": 42
}
],
"current_station": "8b2e7b79-0ec1-44b4-8f08-8f2a95633de5"
}
]
Schema of the response body
{
"type": "array",
"items": {
"$ref": "#/components/schemas/CreateTrainSnapshot"
}
}
Response headers
| Name | Description | Schema |
|---|---|---|
X-Total-Count |
Total number of matching items. | integer |
X-Offset |
Index of the first returned item. | integer |
X-Limit |
The limit that was applied (only when a limit was given). | integer |
Other responses
{
"status": 144,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /create/train/{id}
Get a Create train
Raw Create train data by its id.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
id* |
path | string |
Responses
200 Get a Create train
{
"id": "2b1dd5a6-2e37-434a-9c32-980d1de7594c",
"name": "string",
"owner": "5468a250-5bb9-46c8-8839-61881a16d7bb",
"graph": "2a044136-729d-44b4-916e-34fd2ab44569",
"dimension": "minecraft:overworld",
"position": {
"x": 10.12,
"y": 10.12,
"z": 10.12
},
"speed": 10.12,
"backwards": true,
"derailed": true,
"status": {
"navigation_failed": true,
"track_problem": true,
"conductor_missing": true,
"stalled": true,
"has_schedule": true,
"paused": true,
"completed": true,
"schedule_state": "string",
"title": "string",
"destination": "string",
"distance_to_destination": 10.12,
"waiting_for_signal": true
},
"carriages": [
{
"id": 81,
"leading": null,
"trailing": null,
"length": 10.12,
"bogey_spacing": 164
}
],
"current_station": "5c2cc020-eb03-479a-944e-8a5bd4da93d8"
}
Schema of the response body
{
"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"
]
}
404 No train with that id exists.
{
"status": 218,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 69,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /create/train/{id}/schedule
Get a Create train's schedule
The raw Create schedule assigned to a train.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
id* |
path | string |
Responses
200 Get a Create train's schedule
Schema of the response body
{
"type": "object"
}
404 No train with that id exists.
{
"status": 228,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 284,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /create/signals
List Create signals
Raw signal data from Create.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
dimension |
query | array | Keep only signals in one of these dimensions. |
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
group |
query | array | Keep only signals of one of these signal group ids. |
id |
query | array | Keep only signals with one of these ids. |
limit |
query | integer | Maximum number of items to return from an array response. |
offset |
query | integer | Amount of items to skip from the start of an array response. |
sort |
query | string | Comma-separated list of fields by which the array response should be sorted. Add the prefix '-' for descending order. |
Responses
200 List Create signals
[
{
"id": "590a6a0c-151b-4c28-ac19-f453af03aa63",
"edge_location": [
{
"x": 13,
"y": 68,
"z": 49,
"y_offset_pixels": 93,
"dimension": "minecraft:overworld"
}
],
"position": 10.12,
"dimension": "minecraft:overworld",
"types": [
"string"
],
"groups": [
"43122a7e-8d69-4c13-b561-bcbcae6e493e"
],
"states": [
"string"
],
"block_positions": [
{
"x": 232,
"y": 245,
"z": 132
}
]
}
]
Schema of the response body
{
"type": "array",
"items": {
"$ref": "#/components/schemas/CreateSignalSnapshot"
}
}
Response headers
| Name | Description | Schema |
|---|---|---|
X-Total-Count |
Total number of matching items. | integer |
X-Offset |
Index of the first returned item. | integer |
X-Limit |
The limit that was applied (only when a limit was given). | integer |
Other responses
{
"status": 42,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /create/signal/{id}
Get a Create signal
Raw Create signal data by its id.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
id* |
path | string |
Responses
200 Get a Create signal
{
"id": "0ed19403-671d-4966-8440-ffe177e6cedd",
"edge_location": [
{
"x": 52,
"y": 101,
"z": 263,
"y_offset_pixels": 39,
"dimension": "minecraft:overworld"
}
],
"position": 10.12,
"dimension": "minecraft:overworld",
"types": [
"string"
],
"groups": [
"f662a6a2-9b3d-4642-8de9-f86577bf4a37"
],
"states": [
"string"
],
"block_positions": [
{
"x": 23,
"y": 55,
"z": 118
}
]
}
Schema of the response body
{
"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"
]
}
404 No signal with that id exists.
{
"status": 132,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 22,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /create/tracks
List Create track graphs
The raw track network from Create, grouped by track graphs.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
dimension |
query | array | Restrict each returned graph to the nodes in these dimensions. |
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
id |
query | array | Keep only track graphs with one of these ids. |
limit |
query | integer | Maximum number of items to return from an array response. |
offset |
query | integer | Amount of items to skip from the start of an array response. |
sort |
query | string | Comma-separated list of fields by which the array response should be sorted. Add the prefix '-' for descending order. |
Responses
200 List Create track graphs
[
{
"id": "1004534e-98eb-4048-a5c2-edebe71ca4ad",
"nodes": [
{
"net_id": 242,
"location": {
"x": 88,
"y": 226,
"z": 93,
"y_offset_pixels": 167,
"dimension": "minecraft:overworld"
}
}
],
"edges": [
{
"node1": 214,
"node2": 53,
"length": 10.12,
"turn": true,
"inter_dimensional": true
}
]
}
]
Schema of the response body
{
"type": "array",
"items": {
"$ref": "#/components/schemas/CreateTrackGraphSnapshot"
}
}
Response headers
| Name | Description | Schema |
|---|---|---|
X-Total-Count |
Total number of matching items. | integer |
X-Offset |
Index of the first returned item. | integer |
X-Limit |
The limit that was applied (only when a limit was given). | integer |
Other responses
{
"status": 89,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Global Settings¶
GET /global-settings/blacklist/stations
List blacklisted stations
The names of blacklisted stations.
Responses
200 List blacklisted stations
[
"string"
]
Schema of the response body
{
"type": "array",
"items": {
"type": "string"
}
}
Other responses
{
"status": 258,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /global-settings/blacklist/trains
List blacklisted trains
The names of all blacklisted trains.
Responses
200 List blacklisted trains
[
"string"
]
Schema of the response body
{
"type": "array",
"items": {
"type": "string"
}
}
Other responses
{
"status": 119,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /global-settings/train-categories
List train categories
All train categories matching the given query values.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
by |
query | array | Keep only categories owned by one of these players (by name). |
by_id |
query | array | Keep only categories owned by one of these players (by UUID). |
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
id |
query | array | Keep only categories with one of these ids. |
limit |
query | integer | Maximum number of items to return from an array response. |
name |
query | array | Keep only categories with one of these names. |
offset |
query | integer | Amount of items to skip from the start of an array response. |
sort |
query | string | Comma-separated list of fields by which the array response should be sorted. Add the prefix '-' for descending order. |
trusted |
query | array | Keep only categories that have one of these players as trusted members (by name). |
trusted_id |
query | array | Keep only categories that have one of these players as trusted members (by UUID). |
Responses
200 List train categories
[
{
"id": "d4fad9dc-d292-4538-881c-5a8dac490925",
"name": "string",
"color": "#FF3366CC",
"owner": {
"owner": {
"id": "4de23389-7ce6-4737-8d99-74057807ce34",
"name": "string"
},
"state": "UNLOCKED",
"trusted": null
},
"last_editor": null,
"last_edited_time": 234
}
]
Schema of the response body
{
"type": "array",
"items": {
"$ref": "#/components/schemas/TrainCategory"
}
}
Response headers
| Name | Description | Schema |
|---|---|---|
X-Total-Count |
Total number of matching items. | integer |
X-Offset |
Index of the first returned item. | integer |
X-Limit |
The limit that was applied (only when a limit was given). | integer |
Other responses
{
"status": 188,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /global-settings/train-category/{id}
Get a train category
A train category by its id.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
id* |
path | string |
Responses
200 Get a train category
{
"id": "5624a128-9cd2-4829-b9d0-834f1132080f",
"name": "string",
"color": "#FF3366CC",
"owner": {
"owner": {
"id": "5130c688-c49f-4828-a4ff-1972dece49ea",
"name": "string"
},
"state": "UNLOCKED",
"trusted": null
},
"last_editor": null,
"last_edited_time": 89
}
Schema of the response body
{
"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"
}
}
}
404 No train category with that id exists.
{
"status": 21,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 290,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /global-settings/train-lines
List train lines
All train lines matching the given query values.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
by |
query | array | Keep only lines owned by one of these players (by name). |
by_id |
query | array | Keep only lines owned by one of these players (by id). |
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
id |
query | array | Keep only lines with one of these ids. |
limit |
query | integer | Maximum number of items to return from an array response. |
name |
query | array | Keep only lines with one of these names. |
offset |
query | integer | Amount of items to skip from the start of an array response. |
sort |
query | string | Comma-separated list of fields by which the array response should be sorted. Add the prefix '-' for descending order. |
trusted |
query | array | Keep only lines that have one of these players as trusted members (by name). |
trusted_id |
query | array | Keep only lines that have one of these players as trusted members (by UUID). |
Responses
200 List train lines
[
{
"id": "b96d299f-4473-4025-bf81-4d3afa69a504",
"name": "string",
"line_color": "#FF3366CC",
"owner": {
"owner": {
"id": "da6604c2-0e5d-46cc-98c4-6c76a9ba4c63",
"name": "string"
},
"state": "UNLOCKED",
"trusted": null
},
"last_editor": null,
"last_edited_time": 65
}
]
Schema of the response body
{
"type": "array",
"items": {
"$ref": "#/components/schemas/TrainLine"
}
}
Response headers
| Name | Description | Schema |
|---|---|---|
X-Total-Count |
Total number of matching items. | integer |
X-Offset |
Index of the first returned item. | integer |
X-Limit |
The limit that was applied (only when a limit was given). | integer |
Other responses
{
"status": 26,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /global-settings/train-line/{id}
Get a train line
A train line by its id.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
id* |
path | string |
Responses
200 Get a train line
{
"id": "90aba67a-0a51-4b01-80c2-b4a752b3d003",
"name": "string",
"line_color": "#FF3366CC",
"owner": {
"owner": {
"id": "be3d4c3f-22dd-4875-ae9c-7217d2c905b2",
"name": "string"
},
"state": "UNLOCKED",
"trusted": null
},
"last_editor": null,
"last_edited_time": 64
}
Schema of the response body
{
"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"
}
}
}
404 No train line with that id exists.
{
"status": 98,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 89,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /global-settings/station-tags
List station tags
All station tags matching the given query values.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
by |
query | array | Keep only tags owned by one of these players (by name). |
by_id |
query | array | Keep only tags owned by one of these players (by UUID). |
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
id |
query | array | Keep only tags with one of these ids. |
limit |
query | integer | Maximum number of items to return from an array response. |
name |
query | array | Keep only tags with one of these names. |
offset |
query | integer | Amount of items to skip from the start of an array response. |
sort |
query | string | Comma-separated list of fields by which the array response should be sorted. Add the prefix '-' for descending order. |
station |
query | array | Keep only tags that contain one of these station names. |
trusted |
query | array | Keep only tags that have one of these players as trusted members (by name). |
trusted_id |
query | array | Keep only tags that have one of these players as trusted members (by UUID). |
Responses
200 List station tags
[
{
"id": "e98a8c59-712c-4c36-837b-b72e399d5af5",
"tag_name": {
"name": "string"
},
"stations": {},
"owner": {
"owner": {
"id": "9609ec6f-3915-4fe6-8831-c2cbe0946e91",
"name": "string"
},
"state": "UNLOCKED",
"trusted": null
},
"last_editor": null,
"last_edited_time": 100
}
]
Schema of the response body
{
"type": "array",
"items": {
"$ref": "#/components/schemas/StationTag"
}
}
Response headers
| Name | Description | Schema |
|---|---|---|
X-Total-Count |
Total number of matching items. | integer |
X-Offset |
Index of the first returned item. | integer |
X-Limit |
The limit that was applied (only when a limit was given). | integer |
Other responses
{
"status": 297,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
GET /global-settings/station-tag/{id}
Get a station tag
A station tag by its id.
Input parameters
| Parameter | In | Type | Description |
|---|---|---|---|
fields |
query | string | Comma-separated list of fields that should be included in the response. Omitted fields are dropped. A nested field is written as 'parent.child'. 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. |
id* |
path | string |
Responses
200 Get a station tag
{
"id": "4cb5f64e-615b-4bc2-948d-90da355a663e",
"tag_name": {
"name": "string"
},
"stations": {},
"owner": {
"owner": {
"id": "90b15cd9-5d80-4c47-b130-6d43c9ac1b16",
"name": "string"
},
"state": "UNLOCKED",
"trusted": null
},
"last_editor": null,
"last_edited_time": 82
}
Schema of the response body
{
"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"
}
}
}
404 No station tag with that id exists.
{
"status": 7,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 151,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Schemas¶
AboutEndpointData
| Name | Type | Description |
|---|---|---|
api_version |
string | |
dev_env |
boolean | |
environment |
string | |
minecraft_version |
string | |
mod_homepage |
string | |
mod_id |
string | |
mod_issue_tracker |
string | |
mod_license |
array | |
mod_name |
string | |
mod_sources |
string | |
mod_version |
string | |
modlist |
array | |
platform |
string |
AboutEndpointSimpleModEntry
| Name | Type | Description |
|---|---|---|
mod_id |
string | |
mod_name |
string | |
version |
string |
BoardEntry
| Name | Type | Description |
|---|---|---|
arrival_category |
Schema(TrainCategoryRef) | |
arrival_line |
Schema(LineRef) | |
carriage_count |
integer | |
category |
Schema(TrainCategoryRef) | |
delays |
array | |
destination |
Schema(StationRef) | |
entry_index |
integer | |
line |
Schema(LineRef) | |
origin |
Schema(StationRef) | |
originating |
boolean | |
realtime |
Schema(StopTimes) | |
scheduled |
Schema(StopTimes) | |
scheduled_station |
Schema(StationRef) | |
section_change |
boolean | |
section_index |
integer | |
service_state |
string | |
session_id* |
string | |
station* |
Schema(StationRef) | |
stopovers |
array | |
terminus |
boolean | |
title |
string | |
train_id* |
string | |
train_name |
string | |
visit_state |
string |
CarriageSnapshot
| Name | Type | Description |
|---|---|---|
blocked |
boolean | |
dimension |
string | |
has_conductor |
boolean | |
has_storage |
boolean | |
in_multiple_dimensions |
boolean | |
index |
integer | |
length_blocks |
integer | |
on_two_bogeys |
boolean | |
position |
object | |
stalled |
boolean |
CategorySnapshot
| Name | Type | Description |
|---|---|---|
category* |
Schema(TrainCategoryRef) | |
delayed_trains |
integer | |
lines |
array | |
train_ids |
array |
CreateCarriageSnapshot
| Name | Type | Description |
|---|---|---|
bogey_spacing |
integer | |
id |
integer | |
leading |
Schema(Vec3Snapshot) | |
length |
number | |
trailing |
Schema(Vec3Snapshot) |
CreateSignalSnapshot
| Name | Type | Description |
|---|---|---|
block_positions |
array | |
dimension |
string | |
edge_location |
array | |
groups |
array | |
id* |
string | |
position |
number | |
states |
array | |
types |
array |
CreateStationSnapshot
| Name | Type | Description |
|---|---|---|
assembling |
boolean | |
dimension |
string | |
edge_location |
array | |
edge_position |
number | |
id* |
string | |
imminent_train |
string | |
name |
string | |
nearest_train |
string | |
position |
object | |
present_train |
string |
CreateTrackEdgeSnapshot
| Name | Type | Description |
|---|---|---|
inter_dimensional |
boolean | |
length |
number | |
node1 |
integer | |
node2 |
integer | |
turn |
boolean |
CreateTrackGraphSnapshot
| Name | Type | Description |
|---|---|---|
edges |
array | |
id* |
string | |
nodes |
array |
CreateTrackNodeSnapshot
| Name | Type | Description |
|---|---|---|
location |
Schema(TrackNodeLocationSnapshot) | |
net_id* |
integer |
CreateTrainSnapshot
| Name | Type | Description |
|---|---|---|
backwards |
boolean | |
carriages |
array | |
current_station |
string | |
derailed |
boolean | |
dimension |
string | |
graph |
string | |
id* |
string | |
name |
string | |
owner |
string | |
position |
Schema(Vec3Snapshot) | |
speed |
number | |
status |
Schema(CreateTrainStatusSnapshot) |
CreateTrainStatusSnapshot
| Name | Type | Description |
|---|---|---|
completed |
boolean | |
conductor_missing |
boolean | |
destination |
string | |
distance_to_destination |
number | |
has_schedule |
boolean | |
navigation_failed |
boolean | |
paused |
boolean | |
schedule_state |
string | |
stalled |
boolean | |
title |
string | |
track_problem |
boolean | |
waiting_for_signal |
boolean |
DelayArgument
| Name | Type | Description |
|---|---|---|
type |
string | |
value |
string |
DelayInstance
| Name | Type | Description |
|---|---|---|
args |
array | |
cause_id |
string | |
estimated_delay_ticks |
integer | |
origin |
string | |
severity |
string | |
since |
integer |
DelayLog
| Name | Type | Description |
|---|---|---|
entries |
object | |
frozen |
boolean |
DelayReport
| Name | Type | Description |
|---|---|---|
blocking_trains |
array | |
cancelled |
boolean | |
causes |
array | |
delay_offset |
integer | |
delayed |
boolean | |
dwell_ticks |
integer | |
max_deviation |
integer | |
next_stop_arrival_deviation |
integer | |
next_stop_departure_deviation |
integer | |
separation_hold_ticks |
integer | |
signal_wait_ticks |
integer | |
stalled_ticks |
integer | |
train_id* |
string | |
train_name |
string |
DepartureStats
| Name | Type | Description |
|---|---|---|
departures_by_category |
object | |
departures_by_line |
object | |
departures_by_name |
object | |
last_departure |
integer |
Error
| Name | Type | Description |
|---|---|---|
error |
string | |
status |
integer |
JourneySnapshot
| Name | Type | Description |
|---|---|---|
current_section_index |
integer | |
current_stop_index |
integer | |
cyclic |
boolean | |
line |
Schema(LineRef) | |
sections |
array | |
stops |
array | |
total_duration |
integer | |
train_id* |
string | |
train_name |
string |
LineRef
| Name | Type | Description |
|---|---|---|
color |
string | ARGB color as #AARRGGBB. |
id |
string | |
name |
string |
LineSnapshot
| Name | Type | Description |
|---|---|---|
delayed_trains |
integer | |
line* |
Schema(LineRef) | |
stations |
array | |
train_ids |
array |
Lock
| Name | Type | Description |
|---|---|---|
owner |
Schema(Owner) | |
state |
string | |
trusted |
array |
NavigationResult
| Name | Type | Description |
|---|---|---|
computed_at |
integer | |
duration_ms |
integer | |
journeys |
array | |
stations_searched |
integer | |
status |
string | |
trips_scanned |
integer |
Owner
| Name | Type | Description |
|---|---|---|
id |
string | |
name |
string |
RecordedDelay
| Name | Type | Description |
|---|---|---|
instance |
Schema(DelayInstance) | |
until |
integer |
RouteCall
| Name | Type | Description |
|---|---|---|
cycle |
integer | |
entry_index |
integer | |
passed |
boolean | |
realtime |
Schema(StopTimes) | |
scheduled |
Schema(StopTimes) | |
scheduled_station |
Schema(StationRef) | |
station |
Schema(StationRef) |
RouteJourney
| Name | Type | Description |
|---|---|---|
legs |
array | |
transfers |
array |
RouteLeg
| Name | Type | Description |
|---|---|---|
calls |
array | |
cancelled |
boolean | |
category |
Schema(TrainCategoryRef) | |
delays |
Schema(DelayLog) | |
destination_text |
string | |
icon_id |
string | |
line |
Schema(LineRef) | |
section_index |
integer | |
session_id |
string | |
train_id |
string | |
train_name |
string |
RouteTransfer
| Name | Type | Description |
|---|---|---|
from |
Schema(RouteCall) | |
min_transfer_time |
integer | |
risk_buffer |
integer | |
stays_seated |
boolean | |
to |
Schema(RouteCall) |
SectionSnapshot
| Name | Type | Description |
|---|---|---|
category |
Schema(TrainCategoryRef) | |
current_stop_index |
integer | |
default_section |
boolean | |
destination |
Schema(StationRef) | |
entry_index |
integer | |
includes_next_section_start |
boolean | |
index |
integer | |
line |
Schema(LineRef) | |
origin |
Schema(StationRef) | |
stops |
array | |
usable |
boolean |
StationRef
| Name | Type | Description |
|---|---|---|
info |
Schema(StationTagStationInfo) | |
name |
string | |
tag_id |
string | |
tag_name |
string |
StationSnapshot
| Name | Type | Description |
|---|---|---|
blacklisted |
boolean | |
categories |
array | |
lines |
array | |
station* |
Schema(StationRef) | |
tags |
array | |
train_ids |
array |
StationTag
| Name | Type | Description |
|---|---|---|
id |
string | |
last_edited_time |
integer | |
last_editor |
Schema(Owner) | |
owner |
Schema(Lock) | |
stations |
object | |
tag_name |
Schema(TagName) |
StationTagRef
| Name | Type | Description |
|---|---|---|
id |
string | |
name |
string |
StationTagStationInfo
| Name | Type | Description |
|---|---|---|
platform |
string |
StopSnapshot
| Name | Type | Description |
|---|---|---|
completed_visits |
integer | |
dwell_duration_ticks |
integer | |
entry_index |
integer | |
leg_duration_ticks |
integer | |
previous_actual |
Schema(StopTimes) | |
realtime |
Schema(StopTimes) | |
scheduled |
Schema(StopTimes) | |
scheduled_station |
Schema(StationRef) | |
section_index |
integer | |
station |
Schema(StationRef) | |
station_filter |
string | |
stop_index |
integer | |
title |
string |
StopTimes
| Name | Type | Description |
|---|---|---|
arrival |
integer | |
departure |
integer | |
min_departure |
integer |
TagName
| Name | Type | Description |
|---|---|---|
name |
string |
TimeNowEndpointData
| Name | Type | Description |
|---|---|---|
time |
integer | The current game time in ticks. |
TrackNodeLocationSnapshot
| Name | Type | Description |
|---|---|---|
dimension |
string | |
x |
integer | |
y |
integer | |
y_offset_pixels |
integer | |
z |
integer |
TrainCategory
| Name | Type | Description |
|---|---|---|
color |
string | ARGB color as #AARRGGBB. |
id |
string | |
last_edited_time |
integer | |
last_editor |
Schema(Owner) | |
name |
string | |
owner |
Schema(Lock) |
TrainCategoryRef
| Name | Type | Description |
|---|---|---|
color |
string | ARGB color as #AARRGGBB. |
id |
string | |
name |
string |
TrainCompositionSnapshot
| Name | Type | Description |
|---|---|---|
backwards |
boolean | |
carriages |
array | |
double_ended |
boolean | |
total_length_blocks |
integer | |
train_id* |
string |
TrainLine
| Name | Type | Description |
|---|---|---|
id |
string | |
last_edited_time |
integer | |
last_editor |
Schema(Owner) | |
line_color |
string | ARGB color as #AARRGGBB. |
name |
string | |
owner |
Schema(Lock) |
TrainManagerStatsEndpointData
| Name | Type | Description |
|---|---|---|
active |
boolean | Whether a server is running and the backend is ready. |
tracked_trains_count |
integer | How many trains the backend is tracking, including those hidden from public display. |
TrainPositionSnapshot
| Name | Type | Description |
|---|---|---|
backwards |
boolean | |
dimension |
string | |
dimensions |
array | |
distance_to_next_stop |
number | |
exit_side |
string | |
max_speed |
number | |
position |
object | |
speed |
number | |
target_speed |
number | |
throttle |
number | |
train_id* |
string |
TrainSnapshot
| Name | Type | Description |
|---|---|---|
carriage_count |
integer | |
category |
Schema(TrainCategoryRef) | |
current_station |
Schema(StationRef) | |
current_title |
string | |
delay_offset |
integer | |
delays |
array | |
destination |
Schema(StationRef) | |
icon_id |
string | |
lifecycle |
string | |
line |
Schema(LineRef) | |
live_state |
string | |
map_color_index |
integer | |
max_deviation |
integer | |
next_station |
Schema(StationRef) | |
owner_id |
string | |
position |
Schema(TrainPositionSnapshot) | |
section_index |
integer | |
service_state |
string | |
session_id* |
string | |
stop_count |
integer | |
total_duration |
integer | |
train_id* |
string | |
train_name |
string |
Vec3Snapshot
| Name | Type | Description |
|---|---|---|
x |
number | |
y |
number | |
z |
number |
Common parameters¶
This section describes common parameters that are reused across operations.
Fields
| Name | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
| fields | query | string | None | No |
Sort
| Name | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
| sort | query | string | None | No |
Limit
| Name | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
| limit | query | integer | None | No |
Offset
| Name | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
| offset | query | integer | None | No |
Tags¶
| Name | Description |
|---|---|
| Common | Service data, health checks and the API specification. |
| Trains | Live and scheduled data for individual trains. |
| Stations | Stations known to the backend and what calls at them. |
| Lines and Categories | Train lines and categories with the trains using them. |
| Departures | Station departure boards and departure statistics. |
| Routing | Route search between stations. |
| Create | Raw data from Create, unfiltered by CRN's display rules. |
| Global Settings | All CRN settings, like lines, categories, station tags and blacklists. |
More documentation¶
Project page