Skip to content
Select themeSelect language

`GET /api/resources/{id}/rls_status` — ADR 0023 v4 / S2c. Returns the `rls_provisioning_log` row for a resource as the typed `RlsStatusView` (status `unprovisioned` with every log field `null` when no row exists yet — the fields are present-but-nullable). Workspace-scoped via `get_resource` upstream.

GET
/api/resources/{id}/rls_status
curl --request GET \
--url https://example.com/api/resources/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/rls_status
id
required
string format: uuid
Media typeapplication/json

GET /api/resources/{id}/rls_status + POST .../rls_refresh body — the rls_provisioning_log row for a resource, or the unprovisioned sentinel when no log row exists yet (ADR 0023 v4 / S2c).

status is the only field always present: it is the row’s status (pending / active / failed) when provisioned, or the literal "unprovisioned" when there is no log row. Every other field mirrors the RlsProvisioningLog row and is null in the unprovisioned case (the fields are present-but-nullable, hence #[schema(required)]).

object
id
required

The rls_provisioning_log row id; null when unprovisioned.

string | null format: uuid
last_check_at
required

When the provisioning state was last checked; null when unprovisioned.

string | null format: date-time
last_error
required

The last provisioning error, if the status is failed; null otherwise.

string | null
policy_count
required

The number of RLS policies provisioned; null when unprovisioned.

integer | null format: int32
provisioned_at
required

When provisioning first ran; null when unprovisioned.

string | null format: date-time
resource_id
required

The resource this log belongs to; null when unprovisioned.

string | null format: uuid
status
required

pending / active / failed when provisioned; unprovisioned otherwise.

string
target_database
required

The target database the RLS policies were provisioned into; null when unprovisioned.

string | null
Examplegenerated
{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"last_check_at": "2026-04-15T12:00:00Z",
"last_error": "example",
"policy_count": 1,
"provisioned_at": "2026-04-15T12:00:00Z",
"resource_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"status": "example",
"target_database": "example"
}