Edit the content of an infrastructure
Changed onTakes 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.
Request
- Base URL: https://demo.osrd.fr/api
- URL: https://demo.osrd.fr/api/infra/{infra_id}
- Auth: none declared
Path parameters
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 #2to the/request propertyallOflist - breaking
the
/request property type changed fromobjectto no type - warning
removed the request property
// - warning
removed the request property
//
- breaking
- breaking
added the new required request property
// - breaking
added the new required request property
// - breaking
the
/request property type changed from no type toobject - warning
removed
subschema #2from the/request propertyallOflist
- breaking