Read the access history
curl --request GET \
--url https://api.scoutworks.app/api/v1/access-history \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.scoutworks.app/api/v1/access-history"
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-history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"action": "<string>",
"targetType": "policy",
"targetId": "<string>",
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"actorUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"apiKeyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"before": "<unknown>",
"after": "<unknown>"
}
],
"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
Read the access history
Every change to who can do what, newest first: policies made, changed and archived, and each person’s policies, sections and overrides. A change made through the API carries the key’s `apiKeyId`; Scoutworks shows it as “via API key <name>”.
GET
/
access-history
Read the access history
curl --request GET \
--url https://api.scoutworks.app/api/v1/access-history \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.scoutworks.app/api/v1/access-history"
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-history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"action": "<string>",
"targetType": "policy",
"targetId": "<string>",
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"actorUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"apiKeyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"before": "<unknown>",
"after": "<unknown>"
}
],
"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"
]
}