Resolve permissions for custom roles
GET
/v1/roles/permissions
const url = 'https://api.varman.io/v1/roles/permissions?roles=example';const options = {method: 'GET', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.varman.io/v1/roles/permissions?roles=example' \ --header 'X-API-Key: <X-API-Key>'Returns the merged permissions for the given custom role names. Used by the frontend to resolve effective permissions for users with custom roles.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”roles
required
string
Responses
Section titled “Responses”Merged permissions for the requested roles
Media typeapplication/json
object
permissions
object
key
additional properties
Array<string>
Example generated
{ "permissions": { "additionalProperty": [ "example" ] }}Unauthorized