curl -X GET 'https://api.example.com/scopes/scope_123/roles' \
-H 'Authorization: Bearer YOUR_TOKEN'
const axios = require('axios');
const { data } = await axios.get('https://api.example.com/scopes/scope_123/roles', {
headers: { 'Authorization': 'Bearer YOUR_TOKEN' },
});
[
{
"id": "role_admin",
"name": "Admin",
"description": "Full administrative access"
},
{
"id": "role_member",
"name": "Member",
"description": "Standard member access"
}
]
Scopes
Get Scope Roles
Retrieve all roles defined within a scope
GET
/
scopes
/
{id}
/
roles
curl -X GET 'https://api.example.com/scopes/scope_123/roles' \
-H 'Authorization: Bearer YOUR_TOKEN'
const axios = require('axios');
const { data } = await axios.get('https://api.example.com/scopes/scope_123/roles', {
headers: { 'Authorization': 'Bearer YOUR_TOKEN' },
});
[
{
"id": "role_admin",
"name": "Admin",
"description": "Full administrative access"
},
{
"id": "role_member",
"name": "Member",
"description": "Standard member access"
}
]
Path Parameters
string
required
The scope ID
Response
Returns an array of role objects belonging to the scope.array
curl -X GET 'https://api.example.com/scopes/scope_123/roles' \
-H 'Authorization: Bearer YOUR_TOKEN'
const axios = require('axios');
const { data } = await axios.get('https://api.example.com/scopes/scope_123/roles', {
headers: { 'Authorization': 'Bearer YOUR_TOKEN' },
});
[
{
"id": "role_admin",
"name": "Admin",
"description": "Full administrative access"
},
{
"id": "role_member",
"name": "Member",
"description": "Standard member access"
}
]
Was this page helpful?
⌘I