POST /api/run-simulation
Starts a new simulation run in the background.
Request Body
The request body should be a JSON object containing the full simulation parameters. See the FullSimulationParameters model in the backend code for the exact structure.
Response
Returns a JSON object with a message indicating that the simulation has started.
{ "message": "Simulation started in background" }
POST /api/save-parameters
Saves the provided simulation parameters to the simulation_parameters.json file.
Request Body
The request body should be a JSON object containing the full simulation parameters. See the FullSimulationParameters model in the backend code for the exact structure.
Response
Returns a JSON object with a message indicating that the parameters were saved successfully.
{ "message": "Simulation parameters saved successfully" }
GET /api/simulations/results/root/{file_name}
Retrieves a simulation configuration file from the results root.
URL Parameters
file_name (string, required): The name of the config file to retrieve (e.g., "simulation_parameters.json").
Response
Returns the content of the requested file as a JSON object.
GET /api/simulations/results/{file_name}
Retrieves a simulation result file (e.g., a Gantt chart image).
URL Parameters
file_name (string, required): The name of the result file to retrieve.
Response
Returns the requested file.
POST /api/machines
Adds a new machine to the simulation parameters.
Request Body
A JSON object representing the machine to add.
{
"name": "M_NEW_MACHINE",
"capacity": 1,
"min_skill_level": "low"
}
Response
Returns a JSON object with a confirmation message.
DELETE /api/machines/{machine_name}
Deletes a machine from the simulation parameters.
URL Parameters
machine_name (string, required): The name of the machine to delete.
Response
Returns a JSON object with a confirmation message.