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": 154,
"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": 284,
"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": 165,
"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": 198,
"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": 60,
"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": 187
}
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": 88,
"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": 32
}
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": 221,
"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": "a7ec4e38-3fed-4472-b2f9-68b69bd20710",
"session_id": "936e3704-4001-4794-a7bd-bd5c838dc8c7",
"train_name": "string",
"icon_id": "minecraft:overworld",
"line": {
"id": "d346eb1a-41b9-4421-aaba-70876cc9cea2",
"name": "string",
"color": "#FF3366CC"
},
"category": {
"id": "ffe88b51-1c63-4c7d-ba69-c9dd2b6ba17e",
"name": "string",
"color": "#FF3366CC"
},
"destination_text": "string",
"section_index": 234,
"cancelled": true,
"calls": [
{
"scheduled_station": {
"name": "string",
"tag_name": "string",
"tag_id": "42e6015b-1537-435c-85ec-6cd35ce69807",
"info": {
"platform": "string"
}
},
"entry_index": 137,
"cycle": 36,
"scheduled": {
"arrival": 83,
"departure": 66,
"min_departure": 259
},
"station": null,
"realtime": null,
"passed": true
}
],
"delays": {
"entries": {},
"frozen": true
}
}
],
"transfers": [
{
"from": null,
"to": null,
"min_transfer_time": 239,
"risk_buffer": 111,
"stays_seated": true
}
]
}
],
"computed_at": 206,
"duration_ms": 93,
"stations_searched": 195,
"trips_scanned": 88
}
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": 8,
"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": 272,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 144,
"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": "55018e9c-9c8b-4f0b-9d1f-144ec47697ff",
"session_id": "90e7fe99-3bed-4fd4-a414-0774db94f1fa",
"train_name": "string",
"owner_id": "bd22f3f1-25aa-4542-8f3c-6f56884726d8",
"icon_id": "minecraft:overworld",
"map_color_index": 142,
"line": {
"id": "7b2a6e69-3dda-41e6-8455-aa96866f770f",
"name": "string",
"color": "#FF3366CC"
},
"category": {
"id": "e7017cb9-4b60-4803-8fa0-bc70dc9a1c51",
"name": "string",
"color": "#FF3366CC"
},
"lifecycle": "PREPARING",
"live_state": "NO_SCHEDULE",
"service_state": "IN_SERVICE",
"max_deviation": 298,
"delay_offset": 265,
"total_duration": 295,
"current_title": "string",
"destination": {
"name": "string",
"tag_name": "string",
"tag_id": "7839cd28-ee04-44ec-8172-043831835746",
"info": {
"platform": "string"
}
},
"current_station": null,
"next_station": null,
"section_index": 168,
"stop_count": 241,
"carriage_count": 109,
"position": {
"train_id": "2ff8c599-be4d-4df0-9f5f-5b1aa17fa571",
"dimension": "minecraft:overworld",
"position": {
"x": 298,
"y": 143,
"z": 40
},
"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": 267,
"estimated_delay_ticks": 278,
"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": 207,
"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": "af1f0275-3105-43b8-8987-958dadf6950e",
"dimension": "minecraft:overworld",
"position": {
"x": 273,
"y": 114,
"z": 149
},
"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": 216,
"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": "1429e758-fb5d-446f-be71-5a29da2343b6",
"session_id": "da5a4e9a-7c84-483d-a509-53a05711f023",
"train_name": "string",
"owner_id": "1d0e9520-c888-4b7a-a284-cc3d9337fcb8",
"icon_id": "minecraft:overworld",
"map_color_index": 119,
"line": {
"id": "7cb27ab6-f13d-43c6-8e2d-237bdba92945",
"name": "string",
"color": "#FF3366CC"
},
"category": {
"id": "acd90815-9011-44c8-b91a-00bd0efa7187",
"name": "string",
"color": "#FF3366CC"
},
"lifecycle": "PREPARING",
"live_state": "NO_SCHEDULE",
"service_state": "IN_SERVICE",
"max_deviation": 240,
"delay_offset": 51,
"total_duration": 153,
"current_title": "string",
"destination": {
"name": "string",
"tag_name": "string",
"tag_id": "f0041a87-4ef7-43ff-9f9a-3b3bfd5b4527",
"info": {
"platform": "string"
}
},
"current_station": null,
"next_station": null,
"section_index": 215,
"stop_count": 86,
"carriage_count": 158,
"position": {
"train_id": "0679032e-0b55-4ddd-a22a-9380f9db7acf",
"dimension": "minecraft:overworld",
"position": {
"x": 129,
"y": 221,
"z": 160
},
"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": 14,
"estimated_delay_ticks": 237,
"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": 104,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"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 /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": "4ff16636-ee6a-402b-962a-0fa978ca8f72",
"train_name": "string",
"line": {
"id": "2787ef13-2d81-4ccd-a1b2-b71fb22810dc",
"name": "string",
"color": "#FF3366CC"
},
"cyclic": true,
"total_duration": 12,
"stops": [
{
"entry_index": 194,
"stop_index": 177,
"section_index": 119,
"station_filter": "string",
"scheduled_station": {
"name": "string",
"tag_name": "string",
"tag_id": "ac2a854d-81c9-49c2-b2dc-ffffee31ffdb",
"info": {
"platform": "string"
}
},
"station": null,
"title": "string",
"scheduled": {
"arrival": 109,
"departure": 167,
"min_departure": 128
},
"realtime": null,
"previous_actual": null,
"leg_duration_ticks": 146,
"dwell_duration_ticks": 39,
"completed_visits": 67
}
],
"sections": [
{
"index": 148,
"entry_index": 3,
"line": null,
"category": {
"id": "606bc777-455e-4589-9c46-5dc1ee6ca8f7",
"name": "string",
"color": "#FF3366CC"
},
"origin": null,
"destination": null,
"stops": null,
"current_stop_index": 112,
"usable": true,
"default_section": true,
"includes_next_section_start": true
}
],
"current_stop_index": 160,
"current_section_index": 74
}
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": 44,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 253,
"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": 3,
"entry_index": 73,
"line": {
"id": "3e50ca85-103c-4c93-91a8-e40eb2ca0de3",
"name": "string",
"color": "#FF3366CC"
},
"category": {
"id": "b9675c25-c641-4621-8374-a7e0717f8e7e",
"name": "string",
"color": "#FF3366CC"
},
"origin": {
"name": "string",
"tag_name": "string",
"tag_id": "0f010827-9783-451b-afd8-f4b56935d162",
"info": {
"platform": "string"
}
},
"destination": null,
"stops": [
{
"entry_index": 83,
"stop_index": 231,
"section_index": 133,
"station_filter": "string",
"scheduled_station": null,
"station": null,
"title": "string",
"scheduled": {
"arrival": 84,
"departure": 278,
"min_departure": 54
},
"realtime": null,
"previous_actual": null,
"leg_duration_ticks": 199,
"dwell_duration_ticks": 262,
"completed_visits": 75
}
],
"current_stop_index": 179,
"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": 2,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 75,
"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": "3d208c51-ea73-4b94-936b-a949dd6a5d33",
"dimension": "minecraft:overworld",
"position": {
"x": 186,
"y": 153,
"z": 242
},
"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": 284,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 35,
"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": "a63f1f29-5f0d-4d42-8cd8-bf7350b38358",
"carriages": [
{
"index": 64,
"length_blocks": 9,
"on_two_bogeys": true,
"dimension": "minecraft:overworld",
"position": {
"x": 199,
"y": 131,
"z": 293
},
"blocked": true,
"stalled": true,
"has_conductor": true,
"has_storage": true,
"in_multiple_dimensions": true
}
],
"total_length_blocks": 69,
"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": 1,
"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"
}
}
}
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": 277,
"stop_index": 1,
"section_index": 209,
"station_filter": "string",
"scheduled_station": {
"name": "string",
"tag_name": "string",
"tag_id": "b5bb77d6-624e-4ba4-9191-00dc370f7149",
"info": {
"platform": "string"
}
},
"station": null,
"title": "string",
"scheduled": {
"arrival": 23,
"departure": 2,
"min_departure": 276
},
"realtime": null,
"previous_actual": null,
"leg_duration_ticks": 178,
"dwell_duration_ticks": 154,
"completed_visits": 82
}
]
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": 15,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 170,
"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": 216,
"stop_index": 205,
"section_index": 230,
"station_filter": "string",
"scheduled_station": {
"name": "string",
"tag_name": "string",
"tag_id": "b725b445-c866-4adb-a13c-54d910c7aee0",
"info": {
"platform": "string"
}
},
"station": null,
"title": "string",
"scheduled": {
"arrival": 135,
"departure": 148,
"min_departure": 83
},
"realtime": null,
"previous_actual": null,
"leg_duration_ticks": 255,
"dwell_duration_ticks": 19,
"completed_visits": 167
}
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": 45,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 113,
"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": "cb731c46-d1a8-48c5-abdf-faa8cbc44df8",
"train_name": "string",
"delayed": true,
"cancelled": true,
"max_deviation": 195,
"delay_offset": 12,
"next_stop_arrival_deviation": 187,
"next_stop_departure_deviation": 152,
"signal_wait_ticks": 164,
"stalled_ticks": 36,
"dwell_ticks": 164,
"separation_hold_ticks": 105,
"blocking_trains": [
"string"
],
"causes": [
{
"cause_id": "minecraft:overworld",
"severity": "INFO",
"since": 64,
"estimated_delay_ticks": 81,
"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": 146,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 229,
"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": "7c36f93e-82ef-4eb8-9fb0-8c5f5505b527",
"session_id": "46db6a86-bba7-4316-b9e1-576b1cfd07cd",
"train_name": "string",
"carriage_count": 117,
"line": {
"id": "abfc5e53-a7af-4a21-ad7f-02ed9375d369",
"name": "string",
"color": "#FF3366CC"
},
"category": {
"id": "0d5fb4a3-010c-4e7c-8e6a-36916ed4fe30",
"name": "string",
"color": "#FF3366CC"
},
"arrival_line": null,
"arrival_category": null,
"station": {
"name": "string",
"tag_name": "string",
"tag_id": "57445531-9bc1-40c9-9ea5-6b79fadbabf4",
"info": {
"platform": "string"
}
},
"scheduled_station": null,
"origin": null,
"title": "string",
"destination": null,
"scheduled": {
"arrival": 14,
"departure": 19,
"min_departure": 212
},
"realtime": null,
"service_state": "IN_SERVICE",
"visit_state": "PASSED",
"entry_index": 1,
"section_index": 293,
"terminus": true,
"originating": true,
"section_change": true,
"stopovers": null,
"delays": [
{
"cause_id": "minecraft:overworld",
"severity": "INFO",
"since": 6,
"estimated_delay_ticks": 173,
"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": 265,
"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": 210,
"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": 138,
"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": "376f1534-7c8c-429a-b0db-b57269b89fad",
"name": "string",
"color": "#FF3366CC"
},
"train_ids": [
"68a28fa3-09a5-4071-8b27-ceb83883d676"
],
"stations": [
{
"name": "string",
"tag_name": "string",
"tag_id": "f1ad0ec0-2ecf-43cf-bbbd-8a984786aced",
"info": {
"platform": "string"
}
}
],
"delayed_trains": 81
}
]
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": 160,
"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": "5322a223-90d1-4ce1-94d0-05ffe6e95cad",
"name": "string",
"color": "#FF3366CC"
},
"train_ids": [
"3c5164b5-3ccf-4fdc-b414-4005e360636e"
],
"stations": [
{
"name": "string",
"tag_name": "string",
"tag_id": "8b809fd3-896a-4a22-8f7a-77f583d9301f",
"info": {
"platform": "string"
}
}
],
"delayed_trains": 236
}
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": 272,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 228,
"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": "df612910-ea5b-4574-8a85-ba84ad38d3aa",
"name": "string",
"color": "#FF3366CC"
},
"train_ids": [
"c6eebb37-73cb-4da0-aad6-38b51f2fb10b"
],
"lines": [
{
"id": "2186b0fb-73d9-4132-8179-500e7f508f61",
"name": "string",
"color": "#FF3366CC"
}
],
"delayed_trains": 203
}
]
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": 36,
"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": "f7e9f465-b73a-4e52-9972-815d123dbcda",
"name": "string",
"color": "#FF3366CC"
},
"train_ids": [
"61840d64-263c-4f1b-a69a-26329e19a933"
],
"lines": [
{
"id": "096b1943-f01f-499b-8170-b218dbc61de6",
"name": "string",
"color": "#FF3366CC"
}
],
"delayed_trains": 265
}
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": 27,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 32,
"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": "4f5ab17f-d805-417b-91fa-fe1d65219e3e",
"info": {
"platform": "string"
}
},
"tags": [
{
"id": "e83a55e2-c69f-4d73-a6fa-6bf58418b7ba",
"name": "string"
}
],
"lines": [
{
"id": "b3742cd4-66f1-4364-a34b-eea580612368",
"name": "string",
"color": "#FF3366CC"
}
],
"categories": [
{
"id": "e4bafab7-b819-4c37-a1c3-402d547b790c",
"name": "string",
"color": "#FF3366CC"
}
],
"train_ids": [
"1b8c1e0c-b9ad-453c-8d41-b64d13db54d1"
],
"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": 133,
"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": "f5f79b80-b8ce-44b0-9f64-03b075e19273",
"info": {
"platform": "string"
}
},
"tags": [
{
"id": "2db480f5-118b-4047-969d-f1a92f6b1461",
"name": "string"
}
],
"lines": [
{
"id": "1cda7be1-452a-481e-a090-8cc7385cbe4c",
"name": "string",
"color": "#FF3366CC"
}
],
"categories": [
{
"id": "b176f499-b2d3-4679-b3de-db7ca9ec2f3f",
"name": "string",
"color": "#FF3366CC"
}
],
"train_ids": [
"e59da5d4-1f74-4bcf-be19-87ae7960de89"
],
"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": 201,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 85,
"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": "5a541184-6fce-4353-b250-ad0f9c90bf2d",
"name": "string",
"position": {
"x": 104,
"y": 54,
"z": 197
},
"dimension": "minecraft:overworld",
"assembling": true,
"nearest_train": "96f3f749-7591-42c8-980b-9e12292303f0",
"imminent_train": "914cec59-8620-408a-b373-d20b7e5a3375",
"present_train": "7e3dafbd-aa25-49fb-99cd-fa08873eb6dc",
"edge_location": [
{
"x": 110,
"y": 125,
"z": 159,
"y_offset_pixels": 112,
"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": 265,
"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": "646dde1f-10c6-4523-b2f7-9d50ac39e5fc",
"name": "string",
"position": {
"x": 214,
"y": 40,
"z": 146
},
"dimension": "minecraft:overworld",
"assembling": true,
"nearest_train": "abc612f0-a55c-42f6-ba70-ad0195d19935",
"imminent_train": "9354101f-9da3-4783-8dfd-d9b2826f9e39",
"present_train": "8d314cb1-cee6-4cdf-844c-9a6a1724ec7f",
"edge_location": [
{
"x": 21,
"y": 50,
"z": 156,
"y_offset_pixels": 143,
"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": 298,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 93,
"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": "f755ca45-a5e9-4565-80ca-f22bad8c695f",
"name": "string",
"owner": "d8b55a3a-9641-4971-9498-539349c50513",
"graph": "5f21d7f4-4c9b-46e3-a082-5296a62b266a",
"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": 87,
"leading": null,
"trailing": null,
"length": 10.12,
"bogey_spacing": 194
}
],
"current_station": "256de436-72ba-4651-8f59-c451592efe92"
}
]
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": 94,
"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": "ae9e1cff-026f-4367-a878-69d32b9ea384",
"name": "string",
"owner": "31040357-ac4a-408c-ac65-2978e1697452",
"graph": "97d1eca7-9d47-47f1-865c-1e5dda4aa4ef",
"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": 1,
"leading": null,
"trailing": null,
"length": 10.12,
"bogey_spacing": 247
}
],
"current_station": "4d8d45f5-2b6a-43b8-8491-7e4294212cc8"
}
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": 34,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 19,
"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": 262,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 111,
"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": "5c29ef7c-60bf-4084-822d-d1326e5e97e6",
"edge_location": [
{
"x": 29,
"y": 110,
"z": 4,
"y_offset_pixels": 180,
"dimension": "minecraft:overworld"
}
],
"position": 10.12,
"dimension": "minecraft:overworld",
"types": [
"string"
],
"groups": [
"4b651fb5-7595-437b-8056-4ebbee559c3c"
],
"states": [
"string"
],
"block_positions": [
{
"x": 275,
"y": 148,
"z": 93
}
]
}
]
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": 262,
"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": "20e55108-2e52-48c8-b942-59f34fb9fd40",
"edge_location": [
{
"x": 81,
"y": 22,
"z": 202,
"y_offset_pixels": 245,
"dimension": "minecraft:overworld"
}
],
"position": 10.12,
"dimension": "minecraft:overworld",
"types": [
"string"
],
"groups": [
"889fb65b-586e-43be-a0b3-44d49dd4e20f"
],
"states": [
"string"
],
"block_positions": [
{
"x": 45,
"y": 256,
"z": 74
}
]
}
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": 62,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 288,
"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": "94b68893-4bae-42a0-a5d5-fa067a1145dd",
"nodes": [
{
"net_id": 219,
"location": {
"x": 66,
"y": 55,
"z": 38,
"y_offset_pixels": 117,
"dimension": "minecraft:overworld"
}
}
],
"edges": [
{
"node1": 215,
"node2": 195,
"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": 77,
"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": 144,
"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": 230,
"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": "840b9bcf-88b4-472b-8f32-e74a6ee43d74",
"name": "string",
"color": "#FF3366CC",
"owner": {
"owner": {
"id": "f2bc9485-53c8-45d5-9488-eaaaa6f35c49",
"name": "string"
},
"state": "UNLOCKED",
"trusted": null
},
"last_editor": null,
"last_edited_time": 183
}
]
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": 274,
"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": "53b7a576-b0f2-47c6-84f8-ddb393b4ca7d",
"name": "string",
"color": "#FF3366CC",
"owner": {
"owner": {
"id": "717fcfea-8f83-4569-9f4e-73a1dc63c736",
"name": "string"
},
"state": "UNLOCKED",
"trusted": null
},
"last_editor": null,
"last_edited_time": 200
}
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": 17,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 96,
"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": "f7a7997b-5834-4aa5-9c0f-51fd80c1841f",
"name": "string",
"line_color": "#FF3366CC",
"owner": {
"owner": {
"id": "9e035045-c3ce-4ebd-ae6a-fc228e2acc3b",
"name": "string"
},
"state": "UNLOCKED",
"trusted": null
},
"last_editor": null,
"last_edited_time": 43
}
]
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": 241,
"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": "1b3f823c-ae10-4f89-8668-c95613418486",
"name": "string",
"line_color": "#FF3366CC",
"owner": {
"owner": {
"id": "b4f98367-4713-48ae-8707-16026c8c0dc7",
"name": "string"
},
"state": "UNLOCKED",
"trusted": null
},
"last_editor": null,
"last_edited_time": 172
}
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": 116,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 57,
"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": "6d624a61-487c-48e1-b34f-5b296fc74a4c",
"tag_name": {
"name": "string"
},
"stations": {},
"owner": {
"owner": {
"id": "12eea69a-b1e2-47fe-9368-b6ae5be966aa",
"name": "string"
},
"state": "UNLOCKED",
"trusted": null
},
"last_editor": null,
"last_edited_time": 197
}
]
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": 124,
"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": "812efe32-e6ab-42ef-b198-404659f7a8a4",
"tag_name": {
"name": "string"
},
"stations": {},
"owner": {
"owner": {
"id": "2444266a-d540-44f0-a2f3-611164a450e1",
"name": "string"
},
"state": "UNLOCKED",
"trusted": null
},
"last_editor": null,
"last_edited_time": 300
}
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": 247,
"error": "string"
}
Schema of the response body
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"error": {
"type": "string"
}
}
}
Other responses
{
"status": 232,
"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