v0.2

GET /api/v0.2/attributes/(attribute_name)

Retrieve available values for a given attribute_name separated by semicolons

Parameters:
  • attribute_name – uniqueid of an attribute name

Example requests:

# get all values for attribute "Foor finish material" (uniqueid: floorfinishmaterial)
GET https://shelter-database.org/api/v0.2/attributes/floorfinishmaterial
GET /api/v0.2/attributes/pictures/(language_code)
GET /api/v0.2/attributes/pictures

Retrieve attribute pictures in a given language. If no language code prameter supplied, the default language is English.

Parameters:
  • language_code (string) – language code, in lower case two letter format. Example: ‘fr’ for French

Example requests:

# get attribute pictures in default language (English)
GET https://shelter-database.org/api/v0.2/attributes/pictures

# get attribute pictures in French
GET https://shelter-database.org/api/v0.2/attributes/pictures/fr  
GET /api/v0.2/attributes/pictures/has/(uniqueid)

Retrieve attribute picture for specific attribute

Parameters:
  • uniqueid (string) – uniqueid of the attribute

Example requests:

# get pictures for Foundation Type (uniqueid: foundationtype)
GET https://shelter-database.org/api/v0.2/attributes/pictures/has/foundationtype
GET /api/v0.2/documentation

Serves this documentation page

GET /api/v0.2/glossary

Retrieve the glossary in JSON format, readable by Glossarizer (https://github.com/PebbleRoad/glossarizer)

GET /api/v0.2/shelters/(int: shelter_id)
GET /api/v0.2/shelters

Retrieves shelters with all of their attributes and pictures.

Parameters:
  • shelter_id (int) – a unique shelter ID generated by the server
Query Parameters:
 
  • format – if set to prettytext, attribute names are retrieved as nicely formatted text (Capital letters, special characters and spaces allowed)
  • attribute – attribute name
  • value – attribute value
  • q – Full text search. Works in English language only.

Example requests:

# get all shelters
GET https://shelter-database.org/api/v0.2/shelters

# get shelter whith shelter ID 11
GET https://shelter-database.org/api/v0.2/shelters/11

# get all shelters which have attribute 'storeys' 
GET https://shelter-database.org/api/v0.2/shelters?attribute=storeys

# get all shelters which have 2 storeys
GET https://shelter-database.org/api/v0.2/shelters?attribute=storeys&value=2
GET /api/v0.2/shelters/latest/(int: count)
GET /api/v0.2/shelters/latest

Retrieves latest shelters (updates to existing shelters also count). Only retrieves shelters that have pictures. If no count parameter is supplied, the API retrieves the latest shelter.

Parameters:
  • count (int) – number of latest shelters to return

Example requests:

# get latest shelter
GET https://shelter-database.org/api/v0.2/shelters/latest

# get the 3 latest shelters
GET https://shelter-database.org/api/v0.2/shelters/latest/3