Debugging API calls
How to interpret responses and troubleshoot DEVS-Fire API requests
Quick checklist
- Call
/connectToServerand save theuserToken. - (optional) Load environment data —
/loadFuel,/loadAspect,/loadSlope,/loadWindFlow. - Configure the simulation —
setCellResolution,setWindCondition,setPointIgnition,setMultiParameters, etc. - Run
/runSimulation(single interval) or step with/continueSimulation(repeated intervals). - Query results only after the simulation has run (some endpoints return 500 before that).
Reading responses
Each API reference endpoint lists Responses tabs (200, 400, 500).
| Status | Typical meaning |
|---|---|
| 200 | Success — plain text or JSON depending on endpoint |
| 400 | Bad request — often empty body; invalid types or empty file upload |
| 500 | Spring Boot error JSON — missing or invalid userToken, missing params, or wrong call order (not HTTP 401) |
Missing or invalid userToken returns 500 with {"error":"Internal Server Error",...}, not 401. The server cannot locate a simulation instance for an unrecognized token.
Common pitfalls
getCellState,getPerimeterCells,computeBurnedArea— may return 500 beforerunSimulationorcontinueSimulationhas been called.runSimulation/continueSimulation— thetimeparameter must be greater than 0. An empty array response means the computed fire perimeter is empty, which usually indicates a backend error or a misconfigured API call.continueSimulation— does not requirerunSimulationto be called first; use it on its own to run in steps.- Load endpoints — require a non-empty
text/plainbody andfileNameheader.loadFuel,loadSlope, andloadAspectalso updatecellResolutionfrom the file'scellsizefield.loadWindFlowuses the SIMSncols/nrowsfile format. setDynamicIgnition— passing an invalidmodevalue returns 400.