infra

Edit the content of an infrastructure

Changed on

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}

Request

  • Base URL: https://demo.osrd.fr/api
  • URL: https://demo.osrd.fr/api/infra/{infra_id}
  • Auth: none declared

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"
      ]
    }
  }
]

Changes

    • breaking

      added subschema #2 to the / request property allOf list

    • breaking

      the / request property type changed from object to no type

    • warning

      removed the request property //

    • warning

      removed the request property //

    • breaking

      added the new required request property //

    • breaking

      added the new required request property //

    • breaking

      the / request property type changed from no type to object

    • warning

      removed subschema #2 from the / request property allOf list