Welcome to BP2022-AP1’s documentation!#
default#
- GET /schedule#
Get ids of schedules connected to a user.
- Query Parameters:
simulationId (string) – Specify id of simulation if you only want to get all schedules of a single simulation
Example request:
GET /schedule HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful operation
Example response:
HTTP/1.1 200 OK Content-Type: application/json [ "string" ]
401 Unauthorized – API token missing
404 Not Found – Simulation not found
- POST /schedule#
Insert a new schedule. Returns the id of the configuration object.
Example request:
POST /schedule HTTP/1.1 Host: example.com Content-Type: application/json {}
- Status Codes:
Successfully created new schedule object
Example response:
HTTP/1.1 201 Created Content-Type: application/json { "id": "string" }
401 Unauthorized – API token missing
- DELETE /schedule/{id}#
Delete a schedule
- Parameters:
id (string) –
- Status Codes:
204 No Content – Deleted schedule
401 Unauthorized – API token missing
404 Not Found – Id not found
- GET /schedule/{id}#
Get all information about a schedule.
- Parameters:
id (string) –
Example request:
GET /schedule/{id} HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful operation
Example response:
HTTP/1.1 200 OK Content-Type: application/json {}
401 Unauthorized – API token missing
404 Not Found – Id not found
- GET /component/fault-injection/schedule-blocked-fault#
Get ids of schedule-blocked-faul configurations connected to a user.
- Query Parameters:
simulationId (string) – Specify id of simulation if you only want to get the schedule-blocked-faul configuration of a single simulation
Example request:
GET /component/fault-injection/schedule-blocked-fault HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful operation
Example response:
HTTP/1.1 200 OK Content-Type: application/json [ "string" ]
401 Unauthorized – API token missing
404 Not Found – Simulation not found
- POST /component/fault-injection/schedule-blocked-fault#
Insert a new schedule-blocked-faul component. Returns the id of the configuration object.
Example request:
POST /component/fault-injection/schedule-blocked-fault HTTP/1.1 Host: example.com Content-Type: application/json {}
- Status Codes:
Successfully created new schedule-blocked-faul configuration object
Example response:
HTTP/1.1 201 Created Content-Type: application/json { "id": "string" }
401 Unauthorized – API token missing
- DELETE /component/fault-injection/schedule-blocked-fault/{id}#
Delete a schedule-blocked-fault configuration.
- Parameters:
id (string) –
- Status Codes:
204 No Content – Deleted schedule-blocked-fault configuration
401 Unauthorized – API token missing
404 Not Found – Id not found
- GET /component/fault-injection/schedule-blocked-fault/{id}#
Get all information about a schedule-blocked-fault configuration.
- Parameters:
id (string) –
Example request:
GET /component/fault-injection/schedule-blocked-fault/{id} HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful operation
Example response:
HTTP/1.1 200 OK Content-Type: application/json {}
401 Unauthorized – API token missing
404 Not Found – Id not found
- GET /component/fault-injection/track-blocked-fault#
Get ids of track-blocked-fault configurations connected to a user.
- Query Parameters:
simulationId (string) – Specify id of simulation if you only want to get the track-blocked-fault configuration of a single simulation
Example request:
GET /component/fault-injection/track-blocked-fault HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful operation
Example response:
HTTP/1.1 200 OK Content-Type: application/json [ "string" ]
401 Unauthorized – API token missing
404 Not Found – Simulation not found
- POST /component/fault-injection/track-blocked-fault#
Insert a new track-blocked-fault component. Returns the id of the configuration object.
Example request:
POST /component/fault-injection/track-blocked-fault HTTP/1.1 Host: example.com Content-Type: application/json {}
- Status Codes:
Successfully created new track-blocked-fault configuration object
Example response:
HTTP/1.1 201 Created Content-Type: application/json { "id": "string" }
401 Unauthorized – API token missing
- DELETE /component/fault-injection/track-blocked-fault/{id}#
Delete a track-blocked-fault configuration.
- Parameters:
id (string) –
- Status Codes:
204 No Content – Deleted track-blocked-fault configuration
401 Unauthorized – API token missing
404 Not Found – Id not found
- GET /component/fault-injection/track-blocked-fault/{id}#
Get all information about a track-blocked-fault configuration.
- Parameters:
id (string) –
Example request:
GET /component/fault-injection/track-blocked-fault/{id} HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful operation
Example response:
HTTP/1.1 200 OK Content-Type: application/json {}
401 Unauthorized – API token missing
404 Not Found – Id not found
- GET /component/fault-injection/track-speed-limit-fault#
Get ids of track-speed-limit-fault configurations connected to a user.
- Query Parameters:
simulationId (string) – Specify id of simulation if you only want to get the track-speed-limit-fault configuration of a single simulation
Example request:
GET /component/fault-injection/track-speed-limit-fault HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful operation
Example response:
HTTP/1.1 200 OK Content-Type: application/json [ "string" ]
401 Unauthorized – API token missing
404 Not Found – Simulation not found
- POST /component/fault-injection/track-speed-limit-fault#
Insert a new track-speed-limit-fault component. Returns the id of the configuration object.
Example request:
POST /component/fault-injection/track-speed-limit-fault HTTP/1.1 Host: example.com Content-Type: application/json {}
- Status Codes:
Successfully created new track-speed-limit-fault configuration object
Example response:
HTTP/1.1 201 Created Content-Type: application/json { "id": "string" }
401 Unauthorized – API token missing
- DELETE /component/fault-injection/track-speed-limit-fault/{id}#
Delete a track-speed-limit-fault configuration.
- Parameters:
id (string) –
- Status Codes:
204 No Content – Deleted track-speed-limit-fault configuration
401 Unauthorized – API token missing
404 Not Found – Id not found
- GET /component/fault-injection/track-speed-limit-fault/{id}#
Get all information about a track-speed-limit-fault configuration.
- Parameters:
id (string) –
Example request:
GET /component/fault-injection/track-speed-limit-fault/{id} HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful operation
Example response:
HTTP/1.1 200 OK Content-Type: application/json {}
401 Unauthorized – API token missing
404 Not Found – Id not found
- GET /component/fault-injection/train-prio-fault#
Get ids of train-prio-fault configurations connected to a user.
- Query Parameters:
simulationId (string) – Specify id of simulation if you only want to get the train-prio-fault configuration of a single simulation
Example request:
GET /component/fault-injection/train-prio-fault HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful operation
Example response:
HTTP/1.1 200 OK Content-Type: application/json [ "string" ]
401 Unauthorized – API token missing
404 Not Found – Simulation not found
- POST /component/fault-injection/train-prio-fault#
Insert a new train-prio-fault component. Returns the id of the configuration object.
Example request:
POST /component/fault-injection/train-prio-fault HTTP/1.1 Host: example.com Content-Type: application/json {}
- Status Codes:
Successfully created new train-prio-fault configuration object
Example response:
HTTP/1.1 201 Created Content-Type: application/json { "id": "string" }
401 Unauthorized – API token missing
- DELETE /component/fault-injection/train-prio-fault/{id}#
Delete a train-prio-fault configuration.
- Parameters:
id (string) –
- Status Codes:
204 No Content – Deleted train-prio-fault configuration
401 Unauthorized – API token missing
404 Not Found – Id not found
- GET /component/fault-injection/train-prio-fault/{id}#
Get all information about a train-prio-fault configuration.
- Parameters:
id (string) –
Example request:
GET /component/fault-injection/train-prio-fault/{id} HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful operation
Example response:
HTTP/1.1 200 OK Content-Type: application/json {}
401 Unauthorized – API token missing
404 Not Found – Id not found
- GET /component/fault-injection/train-speed-fault#
Get ids of train-speed-fault configurations connected to a user.
- Query Parameters:
simulationId (string) – Specify id of simulation if you only want to get the train-speed-fault configuration of a single simulation
Example request:
GET /component/fault-injection/train-speed-fault HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful operation
Example response:
HTTP/1.1 200 OK Content-Type: application/json [ "string" ]
401 Unauthorized – API token missing
404 Not Found – Simulation not found
- POST /component/fault-injection/train-speed-fault#
Insert a new train-speed-fault component. Returns the id of the configuration object.
Example request:
POST /component/fault-injection/train-speed-fault HTTP/1.1 Host: example.com Content-Type: application/json {}
- Status Codes:
Successfully created new train-speed-fault configuration object
Example response:
HTTP/1.1 201 Created Content-Type: application/json { "id": "string" }
401 Unauthorized – API token missing
- DELETE /component/fault-injection/train-speed-fault/{id}#
Delete a train-speed-fault configuration.
- Parameters:
id (string) –
- Status Codes:
204 No Content – Deleted train-speed-fault configuration
401 Unauthorized – API token missing
404 Not Found – Id not found
- GET /component/fault-injection/train-speed-fault/{id}#
Get all information about a train-speed-fault configuration.
- Parameters:
id (string) –
Example request:
GET /component/fault-injection/train-speed-fault/{id} HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful operation
Example response:
HTTP/1.1 200 OK Content-Type: application/json {}
401 Unauthorized – API token missing
404 Not Found – Id not found
- GET /component/fault-injection/platform-blocked-fault#
Get ids of platform-blocked-fault configurations connected to a user.
- Query Parameters:
simulationId (string) – Specify id of simulation if you only want to get the platform-blocked-fault configuration of a single simulation
Example request:
GET /component/fault-injection/platform-blocked-fault HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful operation
Example response:
HTTP/1.1 200 OK Content-Type: application/json [ "string" ]
401 Unauthorized – API token missing
404 Not Found – Simulation not found
- POST /component/fault-injection/platform-blocked-fault#
Insert a new platform-blocked-fault component. Returns the id of the configuration object.
Example request:
POST /component/fault-injection/platform-blocked-fault HTTP/1.1 Host: example.com Content-Type: application/json {}
- Status Codes:
Successfully created new platform-blocked-fault configuration object
Example response:
HTTP/1.1 201 Created Content-Type: application/json { "id": "string" }
401 Unauthorized – API token missing
- DELETE /component/fault-injection/platform-blocked-fault/{id}#
Delete a platform-blocked-fault configuration.
- Parameters:
id (string) –
- Status Codes:
204 No Content – Deleted platform-blocked-fault configuration
401 Unauthorized – API token missing
404 Not Found – Id not found
- GET /component/fault-injection/platform-blocked-fault/{id}#
Get all information about a platform-blocked-fault configuration.
- Parameters:
id (string) –
Example request:
GET /component/fault-injection/platform-blocked-fault/{id} HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful operation
Example response:
HTTP/1.1 200 OK Content-Type: application/json {}
401 Unauthorized – API token missing
404 Not Found – Id not found
- GET /component/interlocking#
Get ids of interlocking configurations connected to a user.
- Query Parameters:
simulationId (string) – Specify id of simulation if you only want to get the interlocking configuration of a single simulation
Example request:
GET /component/interlocking HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful operation
Example response:
HTTP/1.1 200 OK Content-Type: application/json [ "string" ]
401 Unauthorized – API token missing
404 Not Found – Simulation not found
- POST /component/interlocking#
Insert a new interlocking component. Returns the id of the configuration object.
Example request:
POST /component/interlocking HTTP/1.1 Host: example.com Content-Type: application/json {}
- Status Codes:
Successfully created new interlocking configuration object
Example response:
HTTP/1.1 201 Created Content-Type: application/json { "id": "string" }
400 Bad Request – An interlocking configuration exists for this simulation already
401 Unauthorized – API token missing
- DELETE /component/interlocking/{id}#
Delete an interlocking configuration.
- Parameters:
id (string) –
- Status Codes:
204 No Content – Deleted interlocking configuration
401 Unauthorized – API token missing
404 Not Found – Id not found
- GET /component/interlocking/{id}#
Get all information about a interlocking configuration.
- Parameters:
id (string) –
Example request:
GET /component/interlocking/{id} HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful operation
Example response:
HTTP/1.1 200 OK Content-Type: application/json {}
401 Unauthorized – API token missing
404 Not Found – Id not found
- GET /component/spawner#
Get ids of spawner configurations connected to a user.
- Query Parameters:
simulationId (string) – Specify id of simulation if you only want to get the spawner configuration of a single simulation
Example request:
GET /component/spawner HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful operation
Example response:
HTTP/1.1 200 OK Content-Type: application/json [ "string" ]
401 Unauthorized – API token missing
404 Not Found – Simulation not found
- POST /component/spawner#
Insert a new spawner component. Returns the id of the configuration object.
Example request:
POST /component/spawner HTTP/1.1 Host: example.com Content-Type: application/json {}
- Status Codes:
Successfully created new spawner configuration object
Example response:
HTTP/1.1 201 Created Content-Type: application/json { "id": "string" }
400 Bad Request – An spawner configuration exists for this simulation already
401 Unauthorized – API token missing
- DELETE /component/spawner/{id}#
Delete a spawner configuration.
- Parameters:
id (string) –
- Status Codes:
204 No Content – Deleted spawner configuration
401 Unauthorized – API token missing
404 Not Found – Id not found
- GET /component/spawner/{id}#
Get all information about a spawner configuration.
- Parameters:
id (string) –
Example request:
GET /component/spawner/{id} HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful operation
Example response:
HTTP/1.1 200 OK Content-Type: application/json {}
401 Unauthorized – API token missing
404 Not Found – Id not found
- GET /run#
Get all ids of runs connected to a user and a simulation.
- Query Parameters:
simulationId (string) –
Example request:
GET /run HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful operation
Example response:
HTTP/1.1 200 OK Content-Type: application/json [ "string" ]
401 Unauthorized – API token missing
404 Not Found – Simulation id not found
- POST /run#
Create a new run. Returns id connected to the run to get the results and status from.
Example request:
POST /run HTTP/1.1 Host: example.com Content-Type: application/json {}
- Status Codes:
Successfully created and started a new run
Example response:
HTTP/1.1 201 Created Content-Type: application/json { "id": "string" }
401 Unauthorized – API token missing
404 Not Found – Simulation id not found
409 Conflict – Run already exists with this id
- DELETE /run/{id}#
Delete a run and the connected results. If the simulation is still running, cancel it.
- Parameters:
id (string) –
- Status Codes:
204 No Content – Deleted simulation configuration
401 Unauthorized – API token missing
404 Not Found – Id not found
- GET /run/{id}#
Get all information about a run, including the progress.
- Parameters:
id (string) –
Example request:
GET /run/{id} HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful operation
Example response:
HTTP/1.1 200 OK Content-Type: application/json {}
401 Unauthorized – API token missing
404 Not Found – Id not found
- GET /simulation#
Get all ids of simulation configurations connected to a user.
Example request:
GET /simulation HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful operation
Example response:
HTTP/1.1 200 OK Content-Type: application/json [ "string" ]
401 Unauthorized – API token missing
- POST /simulation#
Create a new simulation. Returns id connected to the simulation to connect components or runs to it.
Example request:
POST /simulation HTTP/1.1 Host: example.com Content-Type: application/json {}
- Status Codes:
Successfully created new simulation configuration
Example response:
HTTP/1.1 201 Created Content-Type: application/json { "id": "string" }
401 Unauthorized – API token missing
- DELETE /simulation/{id}#
Delete a simulation configuration and every connected component and run.
- Parameters:
id (string) –
- Status Codes:
204 No Content – Deleted simulation configuration
401 Unauthorized – API token missing
404 Not Found – Id not found
- GET /simulation/{id}#
Get all information about a simulation, including the ids of connected components and runs.
- Parameters:
id (string) –
Example request:
GET /simulation/{id} HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Successful operation
Example response:
HTTP/1.1 200 OK Content-Type: application/json {}
401 Unauthorized – API token missing
404 Not Found – Id not found
- PUT /simulation/{id}#
Edit the component configurations connected to the simulation configuration.
- Parameters:
id (string) –
Example request:
PUT /simulation/{id} HTTP/1.1 Host: example.com Content-Type: application/json {}
- Status Codes:
200 OK – Updated simulation configuration
401 Unauthorized – API token missing
404 Not Found – Id not found
405 Method Not Allowed – It’s forbidden to edit an already ran simulation
- POST /token#
Create new token with specified permission specified in body if current user is admin
Example request:
POST /token HTTP/1.1 Host: example.com Content-Type: application/json { "permission": "string" }
- Status Codes:
Successfully created new token
Example response:
HTTP/1.1 201 Created Content-Type: application/json {}
401 Unauthorized – API token missing
403 Forbidden – No rights to execute this action