5 endpoints at https://api.vaif.studio, generated from the API's OpenAPI document. The REST API page covers authentication, and All endpoints lists every group.
GET /rls/policies/{projectId}
| Parameter | In | Type | Required |
|---|
projectId | path | string | Yes |
Response 200 (application/json)
{
policies: {
id: string;
projectId: string;
tableName: string;
name: string;
operation: string;
field: string;
matchClaim: string;
access: string;
enabled: boolean;
createdAt: string (date-time);
updatedAt: string (date-time);
}[];
}
POST /rls/policies/{projectId}
| Parameter | In | Type | Required |
|---|
projectId | path | string | Yes |
Request body (application/json)
{
tableName: string;
name: string;
operation: "ALL" | "DELETE" | "INSERT" | "SELECT" | "UPDATE";
access?: "claim" | "public";
field?: string;
matchClaim?: string;
enabled?: boolean;
}
Response 200
No body.
Response 201 (application/json)
{
policy: {
access: string;
createdAt: string (date-time);
enabled: boolean;
field: string;
id: string;
matchClaim: string;
name: string;
operation: string;
projectId: string;
tableName: string;
updatedAt: string (date-time);
};
}
PATCH /rls/policies/{policyId}
| Parameter | In | Type | Required |
|---|
policyId | path | string | Yes |
Request body (application/json)
{
tableName?: string;
name?: string;
operation?: "ALL" | "DELETE" | "INSERT" | "SELECT" | "UPDATE";
access?: "claim" | "public";
field?: string;
matchClaim?: string;
enabled?: boolean;
}
Response 200 (application/json)
{
policy: {
id: string;
projectId: string;
tableName: string;
name: string;
operation: string;
field: string;
matchClaim: string;
access: string;
enabled: boolean;
createdAt: string (date-time);
updatedAt: string (date-time);
};
}
DELETE /rls/policies/{policyId}
| Parameter | In | Type | Required |
|---|
policyId | path | string | Yes |
Response 200 (application/json)
{
success: boolean;
}
POST /rls/policies/{policyId}/toggle
| Parameter | In | Type | Required |
|---|
policyId | path | string | Yes |
Response 200 (application/json)
{
policy: {
id: string;
projectId: string;
tableName: string;
name: string;
operation: string;
field: string;
matchClaim: string;
access: string;
enabled: boolean;
createdAt: string (date-time);
updatedAt: string (date-time);
};
}