Authentication & Authorization
Get user permissions
Changed onThis API returns a list of permissions for the user that is currently logged in.
Example: Assume the following RBAC policy, and users alice and bob:
p, role:dev, namespaces, read, *
p, role:dev, database-engines, *, */*
p, role:dev, database-clusters, *, */*
p, bob, database-clusters, *, */*
g, alice, role:dev
The API will return the following permissions for alice:
{
"permissions": [
[
"alice",
"namespaces",
"read",
"*"
],
[
"alice",
"database-engines",
"*",
"*/*"
],
[
"alice",
"database-clusters",
"*",
"*/*"
]
]
}
And the following permissions for bob:
{
"permissions": [
[
"bob",
"database-clusters",
"*",
"*/*"
]
]
}
get/permissions
Request
- Base URL/v1 (relative, and the document was published on a file host, not at the API’s origin)
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Response
Successful operation
Changes
- info
the response property
became required for the status
- info
- info
added the optional property
to the response with the status
- info