Skip to main content
GET
/
v1
/
roles
/
{roleId}
Get a role by ID
curl --request GET \
  --url https://api.trycomp.ai/v1/roles/{roleId} \
  --header 'X-API-Key: <api-key>'
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};

fetch('https://api.trycomp.ai/v1/roles/{roleId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
import requests

url = "https://api.trycomp.ai/v1/roles/{roleId}"

headers = {"X-API-Key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
{
  "id": "<string>",
  "name": "<string>",
  "permissions": {},
  "isBuiltIn": true,
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

X-API-Key
string
header
required

API key for authentication

Path Parameters

roleId
string
required

Role ID

Example:

"rol_abc123"

Response

Role details

id
string
name
string
permissions
object
isBuiltIn
boolean
createdAt
string<date-time>
updatedAt
string<date-time>