`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`.
const url = 'https://example.com/api/resources/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/rls_refresh';const options = {method: 'POST'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/resources/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/rls_refreshParameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”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
The rls_provisioning_log row id; null when unprovisioned.
When the provisioning state was last checked; null when unprovisioned.
The last provisioning error, if the status is failed; null otherwise.
The number of RLS policies provisioned; null when unprovisioned.
When provisioning first ran; null when unprovisioned.
The resource this log belongs to; null when unprovisioned.
pending / active / failed when provisioned; unprovisioned otherwise.
The target database the RLS policies were provisioned into; null when unprovisioned.
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"}