Skip to content
Select themeSelect language

`POST /api/resources/{id}/rls_refresh` — ADR 0023 v4 / S2c. Re-runs the RLS provisioning sync against the target database and returns the resulting `RlsStatusView` (the refreshed `rls_provisioning_log` row, or the `unprovisioned` sentinel with null log fields if no row was written) so the UI can re-render the badge without a follow-up GET. 400 when the resource is not `postgresql`/`rls_managed`.

POST
/api/resources/{id}/rls_refresh
curl --request POST \
--url https://example.com/api/resources/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/rls_refresh
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"
}