curl -X GET 'https://api.example.com/permissions/by-scope/scope_123' \
-H 'Authorization: Bearer YOUR_TOKEN'
const axios = require('axios');
const { data } = await axios.get('https://api.example.com/permissions/by-scope/scope_123', {
headers: { 'Authorization': 'Bearer YOUR_TOKEN' },
});
[
{
"id": "perm_1",
"name": "read:documents",
"description": "Can read documents",
"scopeId": "scope_123"
},
{
"id": "perm_2",
"name": "write:documents",
"description": "Can write documents",
"scopeId": "scope_123"
}
]
Permissions
Get Permissions by Scope
Retrieve all permissions defined within a specific scope
GET
/
permissions
/
by-scope
/
{scopeId}
curl -X GET 'https://api.example.com/permissions/by-scope/scope_123' \
-H 'Authorization: Bearer YOUR_TOKEN'
const axios = require('axios');
const { data } = await axios.get('https://api.example.com/permissions/by-scope/scope_123', {
headers: { 'Authorization': 'Bearer YOUR_TOKEN' },
});
[
{
"id": "perm_1",
"name": "read:documents",
"description": "Can read documents",
"scopeId": "scope_123"
},
{
"id": "perm_2",
"name": "write:documents",
"description": "Can write documents",
"scopeId": "scope_123"
}
]
Path Parameters
string
required
The scope ID to get permissions for
Response
Returns an array of permission objects belonging to the specified scope.array
curl -X GET 'https://api.example.com/permissions/by-scope/scope_123' \
-H 'Authorization: Bearer YOUR_TOKEN'
const axios = require('axios');
const { data } = await axios.get('https://api.example.com/permissions/by-scope/scope_123', {
headers: { 'Authorization': 'Bearer YOUR_TOKEN' },
});
[
{
"id": "perm_1",
"name": "read:documents",
"description": "Can read documents",
"scopeId": "scope_123"
},
{
"id": "perm_2",
"name": "write:documents",
"description": "Can write documents",
"scopeId": "scope_123"
}
]
Was this page helpful?
⌘I