Base URL:

Status codes

HTTP status codes and resource statuses used by the API.

HTTP status codes

200
OK

Request succeeded. Response body contains the requested data.

201
Created

Resource created successfully. Response body contains the new resource.

204
No Content

Request succeeded with no response body (e.g., DELETE operations).

400
Bad Request

Invalid request body or parameters. Check the error message for details.

404
Not Found

The requested resource does not exist.

422
Unprocessable Entity

Request body failed validation. Response contains field-level errors.

500
Internal Server Error

Unexpected server error. Please report if persistent.

Simulation status

Simulations and reports progress through these statuses:

pending

Queued and waiting for a worker to pick up

running

Currently being processed by a worker

completed

Successfully finished processing

failed

An error occurred during processing

Error response format

Error responses follow a consistent format:

{
  "detail": "Error message describing what went wrong"
}

Validation errors (422) include field-level details:

{
  "detail": [
    {
      "loc": ["body", "dataset_id"],
      "msg": "field required",
      "type": "value_error.missing"
    }
  ]
}

Polling strategy

For async operations like simulations and reports:

  1. Submit the request (POST) and receive the resource with pending status
  2. Poll the GET endpoint every 2-5 seconds
  3. Check the status field in the response
  4. Stop polling when status is completed or failed
  5. If failed, check the error_message field for details

Tip: Use exponential backoff for production systems to avoid overwhelming the API during high load.