Skip to main content
POST
Fix RLS recommendations

Authorizations

Authorization
string
header
required

Personal access token, sent as Authorization: Bearer <token>. Each operation lists the permission it needs: read_only or full_access. A full-access token can call every operation. A read-only token can call only the operations that list read_only; anything else returns 403 read_only_credential_route_not_allowed.

Path Parameters

app_id
string
required

ID of the app.

Body

application/json

Which entities to apply the recommended row-level security rules to.

entity_names
string[]
required

Entities to fix, as returned in rls_recommendations by Get security scan. Name at least one and at most 100. A name listed twice is applied once.

Required array length: 1 - 100 elements
Example:
record_security_fix_chat
boolean
default:true

Whether to add the fix to the app's AI chat and save a checkpoint of the app first. Set true to do both and false to apply the fix with neither. Defaults to true.

Example:

true

security_fix_total_count
integer | null

When you split one fix across several calls, the total number of entities across all of them. It's used only in the chat message, and ignored unless it's larger than the number of names in entity_names.

Required range: x >= 1
Example:

150

Response

Which entities got their recommended rules, and which didn't.

fixed
string[]
required

Entities whose rls now holds the recommended rules. An entity can also appear in failed as no_recommendation when a newer scan replaced its recommendation while the rules were being applied.

Example:
failed
RlsFixFailure · object[]
required

Entities that weren't fixed, each with the reason.

Example: