---
title: "List Workspace Counties"
method: GET
path: "/api/v1/internal/workspaces/{workspace_id}/counties"
tags: ["internal", "workspaces"]
---

# List Workspace Counties

`GET /api/v1/internal/workspaces/{workspace_id}/counties`

Return per-county sandbox load state for the workspace.

## Path parameters

- `workspace_id` string, uuid, required

## Response `200`

Successful Response

- WorkspaceCountyResponse[]
  - `id` string, uuid, required
  - `workspace_id` string, uuid, required
  - `state` string, required
  - `county_fips` string, required
  - `county_name` string, required
  - `load_status` 'provisioning' | 'pending' | 'loading' | 'succeeded' | 'failed' | 'canceled' | 'inherited', 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. ``inherited`` sits outside that lifecycle: the county's data arrived with the workspace's Neon branch and no load ever ran for this workspace. A self-serve workspace is a copy-on-write fork of a prepared parent, so its counties are queryable the moment the branch exists. The distinction from ``succeeded`` is what a future refresh needs — re-forking from a refreshed parent carries inherited counties for free and drops separately loaded ones, and without the distinction a refresh either reloads everything or silently loses the one-offs. A producer writing this status should stamp ``data_loaded_at`` with the fork time in the same statement. Access does not depend on it — the reload seam backstops a missing value with ``now()``, so an unstamped inherited row keeps its access through a refresh — but the backstop records when someone first refreshed the county rather than when its data actually arrived, and that column is what a later refresh reads to tell inherited data from data loaded afterwards.
  - `dagster_run_id` string, nullable, required
  - `requested_at` string, date-time, required
  - `completed_at` string, date-time, nullable, required
  - `suspended_at` string, date-time, nullable, required
  - `error_message` string, nullable, required

## Other responses

- `422` — Validation Error

## Changes

- **2026-08-22** `136e4af4d514` — 1 warning
  - added the new `inherited` enum value to the `items/load_status` response property for the response status `200`

[Change history](https://skmtc.dev/maia-analytics/apis/maia-api/changes/api/v1/internal/workspaces/:workspace_id/counties/get.md)

---

[API](https://skmtc.dev/maia-analytics/apis/maia-api.md) · [All operations](https://skmtc.dev/maia-analytics/apis/maia-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/maia-analytics/maia-api/revisions/0c94a4b5a00e/schema)
