Count housing units by type
curl --request GET \
--url https://{organization}.rescueconsole.com/api/animals/locations/facets \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{organization}.rescueconsole.com/api/animals/locations/facets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/animals/locations/facets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"total": 123,
"facets": {
"unit_type": [
{
"value": "campus",
"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)"
}Locations and housing
Count housing units by type
How many units of each type there are, for a filter beside the list. Every type is listed, at 0 when there are none. Needs read on Animals.
GET
/
api
/
animals
/
locations
/
facets
Count housing units by type
curl --request GET \
--url https://{organization}.rescueconsole.com/api/animals/locations/facets \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{organization}.rescueconsole.com/api/animals/locations/facets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{organization}.rescueconsole.com/api/animals/locations/facets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"total": 123,
"facets": {
"unit_type": [
{
"value": "campus",
"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
Count only the units directly inside this one.
The type picked in the list. It does not change the per-type counts, only total.
Available options:
campus, building, room, cage, foster_home, virtual