List all roles
curl --request GET \
--url https://api.trycomp.ai/v1/roles \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trycomp.ai/v1/roles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/roles"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"builtInRoles": [
{
"name": "<string>",
"isBuiltIn": true,
"description": "<string>"
}
],
"customRoles": [
{
"id": "<string>",
"name": "<string>",
"permissions": {},
"isBuiltIn": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}Roles
List all roles | Comp AI API
List all roles in Comp AI. Create custom roles and resolve permission sets for organization-level access control.
GET
/
v1
/
roles
List all roles
curl --request GET \
--url https://api.trycomp.ai/v1/roles \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trycomp.ai/v1/roles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/roles"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"builtInRoles": [
{
"name": "<string>",
"isBuiltIn": true,
"description": "<string>"
}
],
"customRoles": [
{
"id": "<string>",
"name": "<string>",
"permissions": {},
"isBuiltIn": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}Was this page helpful?

