curl --request GET \
--url https://api.example.com/api/realtime/permissions \
--header 'Authorization: Bearer <token>'{
"subscribe": {
"policies": [
{
"policyName": "allow_authenticated_subscribe",
"tableName": "realtime_channels",
"command": "SELECT",
"roles": [
"authenticated"
],
"using": "enabled = true",
"withCheck": null
}
]
},
"publish": {
"policies": [
{
"policyName": "allow_authenticated_publish",
"tableName": "realtime_messages",
"command": "INSERT",
"roles": [
"authenticated"
],
"using": null,
"withCheck": "true"
}
]
}
}Retrieve RLS policies for subscribe (channels) and publish (messages) operations
curl --request GET \
--url https://api.example.com/api/realtime/permissions \
--header 'Authorization: Bearer <token>'{
"subscribe": {
"policies": [
{
"policyName": "allow_authenticated_subscribe",
"tableName": "realtime_channels",
"command": "SELECT",
"roles": [
"authenticated"
],
"using": "enabled = true",
"withCheck": null
}
]
},
"publish": {
"policies": [
{
"policyName": "allow_authenticated_publish",
"tableName": "realtime_messages",
"command": "INSERT",
"roles": [
"authenticated"
],
"using": null,
"withCheck": "true"
}
]
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Realtime RLS permissions
Show child attributes
RLS policies for channel subscriptions
Show child attributes
Name of the RLS policy
"allow_authenticated_subscribe"
Table the policy applies to
"realtime_channels"
SQL command the policy applies to (SELECT, INSERT, UPDATE, DELETE)
"SELECT"
Database roles the policy applies to
["authenticated"]USING clause for row-level filtering
"enabled = true"
WITH CHECK clause for row-level validation
null
Show child attributes
RLS policies for message publishing
Show child attributes
Name of the RLS policy
"allow_authenticated_subscribe"
Table the policy applies to
"realtime_channels"
SQL command the policy applies to (SELECT, INSERT, UPDATE, DELETE)
"SELECT"
Database roles the policy applies to
["authenticated"]USING clause for row-level filtering
"enabled = true"
WITH CHECK clause for row-level validation
null