DPG Resources

API

The content and structure of DPG resources site can be accessed programmatically through defined API endpoints.

Categories and Resources represent the structure and the content of this platform. The examples on this page represent the most relevant endpoints for accessing these.

For a more comprehensive documentation goto the complete rest API handbook: https://developer.wordpress.org/rest-api/reference/posts/#example-request

Example 1: Endpoint for categories

List all categories: https://resources.digitalpublicgoods.net/wp-json/wp/v2/categories/

Return one specific category by “id”: https://resources.digitalpublicgoods.net/wp-json/wp/v2/categories/3471

Example 2: Endpoint for DPG resources

List all resources: https://resources.digitalpublicgoods.net/wp-json/wp/v2/posts

List resources in one category by “id”: https://resources.digitalpublicgoods.net/wp-json/wp/v2/posts?categories=2185