Get a user’s access policies
curl --request GET \
--url https://api.scoutworks.app/api/v1/users/{userId}/policies \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.scoutworks.app/api/v1/users/{userId}/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/users/{userId}/policies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"personType": "<string>",
"policies": [
{
"id": "<string>",
"name": "<string>",
"kind": "builtin",
"source": "derived"
}
]
}
}{
"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"
]
}Users
Get a user’s access policies
The policies a user holds, by id. A policy’s id is a built-in’s key (role.leader, addon.treasurer) or a custom policy’s UUID. A suspended person and an invitation not yet accepted hold none until they are active. Another group’s user answers 404.
GET
/
users
/
{userId}
/
policies
Get a user’s access policies
curl --request GET \
--url https://api.scoutworks.app/api/v1/users/{userId}/policies \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.scoutworks.app/api/v1/users/{userId}/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/users/{userId}/policies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"personType": "<string>",
"policies": [
{
"id": "<string>",
"name": "<string>",
"kind": "builtin",
"source": "derived"
}
]
}
}{
"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"
]
}