v4

latestOpenAPI 3.1.02026-08-08278476614.0 KB
internal
workspaces

Append Workspace County

Insert a single pending workspace_counties row.

The env-matched workspace_county_pickup_{staging,prod} Dagster sensor picks the row up on its next tick (≤30s typical), registers the partition, launches sandbox_load, and the run-status callbacks stamp completion back. workspace_counties is the single source of truth for workspace RBAC — WorkspaceCountyRepository.get_loaded_fips reads it directly.

post/api/v1/internal/workspaces/{workspace_id}/counties

Path parameters

workspace_idstring uuid required

Request body

state_fipsstring required
county_fipsstring required

Response

Successful Response

idstring uuid required
workspace_idstring uuid required
statestring required
county_fipsstring required
county_namestring required
load_status'provisioning' | 'pending' | 'loading' | 'succeeded' | 'failed' | 'canceled' required

Load status for a workspace-county pair.

Lifecycle: provisioning (initial — set by workspace standup before the Neon project is ready) → pending (set by provision_workspace_op after schema apply succeeds; the pickup sensor's gate value) → loading (set by sandbox_load when it starts writing for one county) → succeeded | failed (terminal, set by the asset's try/finally). provisioning and the mid-load loading were previously the same value; MAIA-2309 split them so the lifecycle reads literally instead of overloading loading across two phases.

canceled is the admin-initiated terminal state: an in-flight (pending/loading) row canceled before the load finished. The Dagster stamps are status-guarded so a canceled row is never resurrected by a run that was already queued; retry via the reload seam re-queues it.

dagster_run_idstring nullable required
requested_atstring date-time required
completed_atstring date-time nullable required
suspended_atstring date-time nullable required
error_messagestring nullable required