v51

OpenAPI 3.1.0LGPLraw.githubusercontent.com2026-08-01157452441.5 KB
infra

Import an infra from railjson

post/infra/railjson

Query parameters

namestring required

The name of the infrastructure.

generate_databoolean

Flag indicating whether to generate data.

Request body

versionstring required

The version of the RailJSON format. Defaults to the current version.

Example request

{
  "extended_switch_types": [
    {
      "groups": {
        "LEFT": {
          "dst": "LEFT",
          "src": "BASE"
        },
        "RIGHT": {
          "dst": "RIGHT",
          "src": "BASE"
        }
      },
      "id": "Point",
      "ports": [
        "LEFT",
        "RIGHT",
        "BASE"
      ]
    }
  ]
}

Response

The imported infra id

infrainteger required