List access policies
curl --request GET \
--url https://api.scoutworks.app/api/v1/access-policies \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.scoutworks.app/api/v1/access-policies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.scoutworks.app/api/v1/access-policies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"id": "<string>",
"kind": "builtin",
"builtinKind": "person",
"name": "<string>",
"description": "<string>",
"basedOn": "<string>",
"builtinUpdated": true,
"grants": [
{
"area": "members",
"level": "view",
"scope": "group",
"note": "records",
"onlyFor": [
"group_admin"
]
}
],
"allowedPersonTypes": [
"<string>"
],
"version": 0,
"archivedAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"holderCount": 0,
"holders": [
{
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"personType": "<string>"
}
]
}
],
"nextCursor": "<string>"
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}Access policies
List access policies
The locked built-ins your group can give and your group’s own policies, each with how many people hold it. A policy’s id is a built-in’s key (role.leader, addon.treasurer) or a custom policy’s UUID. One page holds them all: nextCursor is always null.
GET
/
access-policies
List access policies
curl --request GET \
--url https://api.scoutworks.app/api/v1/access-policies \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.scoutworks.app/api/v1/access-policies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.scoutworks.app/api/v1/access-policies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"id": "<string>",
"kind": "builtin",
"builtinKind": "person",
"name": "<string>",
"description": "<string>",
"basedOn": "<string>",
"builtinUpdated": true,
"grants": [
{
"area": "members",
"level": "view",
"scope": "group",
"note": "records",
"onlyFor": [
"group_admin"
]
}
],
"allowedPersonTypes": [
"<string>"
],
"version": 0,
"archivedAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"holderCount": 0,
"holders": [
{
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"personType": "<string>"
}
]
}
],
"nextCursor": "<string>"
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": {
"code": "invalid_api_key",
"message": "<string>"
},
"errorRef": "<string>",
"retryAfter": 0,
"matchingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}