Count shifts
curl --request GET \
--url https://{organization}.rescueconsole.com/api/shifts/windows/facets \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{organization}.rescueconsole.com/api/shifts/windows/facets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/shifts/windows/facets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"total": 123,
"unfilled": 123,
"facets": {
"status": [
{
"value": "<string>",
"label": "<string>",
"count": 123
}
],
"location_unit_id": [
{
"value": "<string>",
"label": "<string>",
"count": 123
}
],
"role_id": [
{
"value": "<string>",
"label": "<string>",
"count": 123
}
]
}
}{
"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 windows
Count shifts
How many shifts match, counted by status, location and role, and how many are unfilled. A shift is unfilled when any of its roles has fewer sign-ups holding time than places. Takes the filters of List shifts. Each group is counted with its own filter left out. Locations and roles are given by ID. Needs read on Shifts.
GET
/
api
/
shifts
/
windows
/
facets
Count shifts
curl --request GET \
--url https://{organization}.rescueconsole.com/api/shifts/windows/facets \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{organization}.rescueconsole.com/api/shifts/windows/facets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/shifts/windows/facets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"total": 123,
"unfilled": 123,
"facets": {
"status": [
{
"value": "<string>",
"label": "<string>",
"count": 123
}
],
"location_unit_id": [
{
"value": "<string>",
"label": "<string>",
"count": 123
}
],
"role_id": [
{
"value": "<string>",
"label": "<string>",
"count": 123
}
]
}
}{
"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)"
}Authorizations
An API key from Settings, API keys. It starts with rc_live_.
Query Parameters
Shifts at one location.
The shifts of one schedule.
Available options:
open, closed, cancelled Shifts that end on or after this date, or date and time.
Shifts that start on or before this date, or date and time.
Shifts that offer this role.