This is a living document and will be updated regularly.
Note that the parameter value delimiter in the Swagger documentation is a comma ”,”, this
is incorrect and the correct delimiter is a semicolon ”;”. The request parameters should
thus be written as my_parameter_1=value_1;value_2.
Magnifying glass
Accessing the API
dropdown-chevron

Get a User

Email the Resource Centre Team (resourcecentre@savethechildren.org) with your preferred email address and you will be sent credentials.

dropdown-chevron

Obtain JWT bearer token for access

Make a REST API POST request to the endpoint: https://resource-centre-production-wordpress.swacedigital.com/wp-json/jwt-auth/v1/token with request body of type form-data containing username ”my-resource-centre-username” password ”my-resource-centre-password” On success this returns a token under [’data’][’token’] that is to be used as the bearer token when doing a request.

dropdown-chevron

Query data

Set authorization method in your GET request to Bearer token and use the previously obtained token. Make a REST API GET request to the endpoint: https://resource-centre-production-wordpress.swacedigital.com/wp-json/api/v1/documents?my_parameter_1=value_1;value_2&my_parameter_2=value_3;value_4

Examples
dropdown-chevron

Example 1 - Search documents

I am looking for resources concerning the countries Jordan and Uganda with the keywords Children affected by armed conflict and Education: https://resource-centre-production-wordpress.swacedigital.com/wp-json/api/v1/documents?countries=Jordan;Uganda&keywords=Children affected by armed conflict;Education

dropdown-chevron

Example 2 - Search documents

I am looking for resources concerning the topic Protection of Children from Violence, but I want to paginate the results with 10 resources at a time: First request https://resource-centre-production-wordpress.swacedigital.com/wp-json/api/v1/documents?topics=Protection of Children from Violence&limit=10&offset=0 Second request https://resource-centre-production-wordpress.swacedigital.com/wp-json/api/v1/documents?topics=Protection of Children from Violence&limit=10&offset=10

dropdown-chevron

Example 3 - Search documents

I am looking for resources with the content type Report and want to sort the results by title in ascending order: https://resource-centre-production-wordpress.swacedigital.com/wp-json/api/v1/documents?content_types=report&order_by=title&order=asc Currently, resources can only be ordered by title or publication year.

dropdown-chevron

Example 4 - Query taxonomies

Retrieve a list of available taxonomies: https://resource-centre-production-wordpress.swacedigital.com/wp-json/wp/v2/taxonomies

dropdown-chevron

Example 5 - Query terms for a taxonomy

Retrieve a list of all terms for a taxonomy: https://resource-centre-production-wordpress.swacedigital.com/wp-json/wp/v2/document_keywords

dropdown-chevron

Example 6 - Get single document

Retrieve a single document by ID: https://resource-centre-production-wordpress.swacedigital.com/wp-json/wp/v2/document/{ID}

By browsing the Resource Centre you are agreeing to our use of cookies. Read our cookie policy.