Skip to main content

Run a sandbox test

POST /api/test
Executes an artifact’s code in an isolated E2B sandbox. Use this to verify your code works before deploying. Body:
{
  "artifactId": "art_abc123",
  "inputs": { "name": "test" },
  "automationId": "auto_xyz789",
  "wait": 10
}
FieldRequiredDescription
artifactIdYesID from POST /api/artifacts
inputsYesDict of test input values
automationIdNoLink to existing automation (ensures secrets are available during test)
waitNoSeconds to wait for result inline (default 10, max 10)
curl -s -X POST "https://dashboard.floom.dev/api/test" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"artifactId": "art_abc123", "inputs": {"name": "test"}}'
Response (completed within wait):
{
  "testRunId": "tr_xyz789",
  "status": "success",
  "result": {
    "status": "success",
    "outputs": { "greeting": "Hello, test!" },
    "logs": "Installing dependencies...\nRunning main.py..."
  }
}
Response (still running):
{
  "testRunId": "tr_xyz789",
  "status": "pending"
}

Poll test run status

GET /api/test-runs/:id
Poll until status is success, error, or timeout.
curl -s "https://dashboard.floom.dev/api/test-runs/$TEST_RUN_ID" \
  -H "Authorization: Bearer $API_KEY"
Terminal statuses:
StatusMeaning
successTest passed, outputs available
errorTest failed, check error and logs fields
timeoutSandbox timed out