Python
import requests
url = "https://app.langwatch.ai/api/roles"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.langwatch.ai/api/roles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://app.langwatch.ai/api/roles \
--header 'Authorization: Bearer <token>'{
"roles": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"permissions": [
"<string>"
],
"createdAt": "<string>",
"updatedAt": "<string>"
}
]
}Roles
List roles
List the organization’s custom roles with their permission sets.
GET
/
api
/
roles
Python
import requests
url = "https://app.langwatch.ai/api/roles"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.langwatch.ai/api/roles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://app.langwatch.ai/api/roles \
--header 'Authorization: Bearer <token>'{
"roles": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"permissions": [
"<string>"
],
"createdAt": "<string>",
"updatedAt": "<string>"
}
]
}Was this page helpful?
⌘I