Skip to main content
POST
Fix RLS recommendations

Authorizations

Authorization
string
header
required

Personal access token, sent as Authorization: Bearer <token>.

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 (true) or apply it with neither (false). 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.

Which entities got their recommended row-level security rules.

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: