curl --request GET \
--url https://api.pineyard.ai/api-keys/scopes \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pineyard.ai/api-keys/scopes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/api-keys/scopes"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"features": [
{
"key": "<string>",
"label": "<string>",
"group": "<string>",
"actions": [
{
"key": "<string>",
"kind": "<string>",
"label": "<string>",
"grantable": true,
"implies": [
"<string>"
],
"billed": true,
"hint": "<string>"
}
],
"description": "<string>"
}
]
}Scopes a key can be given, with whether the caller may grant each one.
Every scope an API key can hold, grouped by feature (features[].actions[]). Scopes a key can never have (api_keys.edit, api_keys.delete, team.manage, workspace.edit, billing.recharge, result_webhooks.edit, workflows.edit, functions.edit) are omitted entirely, and so is any feature that would be left with no actions. For each action, key is the scope name. grantable is true when the caller’s own effective permissions include the scope; for a key, that is the key’s own permissions (its scopes intersected with its owner’s role), and a key can never create or edit keys anyway. implies lists the other scopes automatically included with this one: edit and delete imply the feature’s view, plus the special cases listed on Scopes & permissions (for example calls.test ⇒ calls.view, agents.view). billed is true for the scopes whose use spends credits: calls.test, speech.upload and whatsapp.send. kind (view, edit, delete or special), label and hint (present only on some special scopes) are display text, as are the feature’s label, group and optional description.
curl --request GET \
--url https://api.pineyard.ai/api-keys/scopes \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pineyard.ai/api-keys/scopes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/api-keys/scopes"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"features": [
{
"key": "<string>",
"label": "<string>",
"group": "<string>",
"actions": [
{
"key": "<string>",
"kind": "<string>",
"label": "<string>",
"grantable": true,
"implies": [
"<string>"
],
"billed": true,
"hint": "<string>"
}
],
"description": "<string>"
}
]
}
