Preview policies in force
curl --request GET \
--url https://{organization}.rescueconsole.com/api/shifts/policies/resolve \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{organization}.rescueconsole.com/api/shifts/policies/resolve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/shifts/policies/resolve"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"results": [
{
"id": "<string>",
"scope": "tenant",
"rule_key": "max_centihours_per_day",
"value": 1,
"is_enabled": true,
"describes": "<string>",
"applied_from": "tenant",
"role_id": "<string>",
"location_unit_id": "<string>",
"notes": "<string>"
}
]
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}Shift policies
Preview policies in force
The rules that apply to a role at a location: the most specific switched-on rule of each kind. applied_from says which scope each came from. Needs read on Shifts.
GET
/
api
/
shifts
/
policies
/
resolve
Preview policies in force
curl --request GET \
--url https://{organization}.rescueconsole.com/api/shifts/policies/resolve \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{organization}.rescueconsole.com/api/shifts/policies/resolve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/shifts/policies/resolve"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"results": [
{
"id": "<string>",
"scope": "tenant",
"rule_key": "max_centihours_per_day",
"value": 1,
"is_enabled": true,
"describes": "<string>",
"applied_from": "tenant",
"role_id": "<string>",
"location_unit_id": "<string>",
"notes": "<string>"
}
]
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}{
"error": "house_trained must be 1, 0 or null (not assessed)"
}