Create Sandbox Project
Changed onCreate a single-click county sandbox project pre-loaded with the county's boundary layer.
Two-phase: this handler runs phase 1 (validate FIPS, insert PENDING project row, return project_id) synchronously and enqueues phase 2 (Neon name resolve, CREATE MATERIALIZED VIEW, register boundary layer, flip status to READY) as a durable DBOS workflow. A durable workflow is used instead of FastAPI BackgroundTasks so a Cloud Run instance restart between response and task completion can't strand the project in PENDING — the workflow store persists the job until a worker completes it.
An Idempotency-Key header makes the creation replayable: a retry carrying the same key returns the project the first request created instead of a second one.
Workspace RBAC: rejects FIPS codes not in the user's available geographies (403). FIPS not loaded into the workspace's workspace_counties table is a 404 before any project row is inserted. Failures inside the background task mark the project status=FAILED (visible on the project page); the task itself retries with exponential backoff before reaching that state.
Request
- Base URLhttps://api.maia-analytics.com (the document declares no server; this is the origin it was published from)
- URLhttps://api.maia-analytics.com/api/v1/project/sandbox
- AuthHTTP bearer
Headers
Request body
Response
Successful Response
Changes
- info
added the new optional
headerrequest parameterIdempotency-Key
- info
- info
added the new optional request property
- info