curl --request PATCH \
--url https://api.scoutworks.app/api/v1/access-policies/{policyId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.scoutworks.app/api/v1/access-policies/{policyId}"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.scoutworks.app/api/v1/access-policies/{policyId}', 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>"
}
]
}
}{
"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"
]
}{
"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"
]
}Change an access policy
Changes only what you send, on one of your group’s own policies. Everyone who holds it has the new access on their next request. A built-in is locked (409): copy it to change it. A policy a group admin holds answers 403 admin_protected. A key never changes a group admin’s access, and never gives access to manage people or settings (settings at any level, or team at manage): both answer 403 admin_protected. An admin does those in Scoutworks. The access history records the change as made by the admin who created the key, via the key. Writes count towards the key’s usual limit and its write limit. A group whose subscription has lapsed answers 402.
Send the ETag you last read for the access policy as If-Match: if the access policy has changed since, the request answers 412 stale_write and changes nothing. Optional, and recommended.
curl --request PATCH \
--url https://api.scoutworks.app/api/v1/access-policies/{policyId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.scoutworks.app/api/v1/access-policies/{policyId}"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.scoutworks.app/api/v1/access-policies/{policyId}', 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>"
}
]
}
}{
"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"
]
}{
"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"
]
}Authorizations
Headers
Path Parameters
Body
A field not listed here is refused with a 400.