Privileges
Centia.io has a simple privilege system that enables the super-user to grant sub-users read or write privileges on tables. Sub-users can grant privileges on tables in their own schemas.
Set privileges for a user on a table
By default, a sub-user has none privilege on tables outside their own schema. Privileges can be set explicitly to none, read, or write.
none: The sub-user cannot run statements on the table.read: The sub-user can runselectstatements on the table.write: The sub-user can runselect,insert,update, anddeletestatements on the table.
- Web App
- HTTP
- CLI
Setting a single privilege
PATCH https://api.centia.io/api/v4/schemas/rockhall/inductees/privileges HTTP/1.1
Content-Type: application/json
Authorization: Bearer abc123
{
"subuser": "alx",
"privilege": "write"
}
Setting multiple privileges
PATCH https://api.centia.io/api/v4/schemas/rockhall/inductees/privileges HTTP/1.1
Content-Type: application/json
Authorization: Bearer abc123
[
{
"subuser": "alx",
"privilege": "write"
},
{
"subuser": "slash",
"privilege": "write"
}
]
centia privilege set
Get privileges
- Web App
- HTTP
- CLI
Request
GET https://api.centia.io/api/v4/schemas/rockhall/inductees/privileges HTTP/1.1
Accept: application/json; charset=utf-8
Authorization: Bearer abc123
Response
[
{
"subuser": "alx",
"privilege": "write"
},
{
"subuser": "slash",
"privilege": "write"
}
]
centia privilege get