v52

latestOpenAPI 3.1.0LGPLraw.githubusercontent.com2026-08-04157452441.5 KB
infra

Edit the content of an infrastructure

Takes a batch of operations. An operation is a JSON patch document that will be applied to the RailJSON description of the appropriate infra object.

The consistency of the patch with the RailJSON schema is checked. If a patch is erroneous, the whole batch is rejected.

After editing the object, the generated cartographic layers are invalidated and regenerated. The edition step fails if the regeneration fails.

post/infra/{infra_id}

Path parameters

infra_idinteger required

An existing infra ID

Request body

Example request

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

Response

The result of the operations

Example response

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