Skip to content
This repository was archived by the owner on Jan 26, 2021. It is now read-only.

List of REST API plugins

Luis Herranz edited this page Feb 4, 2019 · 1 revision

We can contribute to WordPress with several useful REST API plugins. This is a list of the current ideas, expected to grow with time:

WP REST API: Expose Custom Fields – by Frontity

This plugin has an admin page with a list of custom post types, including posts, pages and attachments. Each custom post type contains a list of custom fields. There is a checkbox to show/hide each custom field in the REST API. There is also a text field to rename the custom field.

WP REST API: URL Discovery – by Frontity

This plugin exposes a new endpoint, maybe /wp-json/url-discovery/v1/discover where you can send a WordPress URL, for example:

https://example.com/wp-json/url-discovery/v1/discover/example.com/my-post
https://example.com/wp-json/url-discovery/v1/discover/example.com/category/my-category
// or maybe...
https://example.com/wp-json/url-discovery/v1/discover?url=https://example.com/my-post
https://example.com/wp-json/url-discovery/v1/discover?url=https://example.com/category/my-category

This endpoint should return the proper content for that url, for example:

  • https://example.com/wp-json/url-discovery/v1/discover?url=https://example.com/my-post returns the same than https://example.com/wp-json/wp/v2/posts/123 (`my-post' ID is 123).
  • https://example.com/wp-json/url-discovery/v1/discover?url=https://example.com/category/my-category returns the same than https://example.com/wp-json/wp/v2/posts?categories=456 (`my-category' ID is 456).

WP REST API: HTML Purifier - by Frontity

This plugin sanitizes the content field with our HTML Purifier.

WP REST API: Content Image IDs - by Frontity

This plugin adds data-attachment-ids to images in content. It also adds the proper _links attribute to get images when _embed is used. Best if we match it to the WP.com REST API.

WP REST API: Exclude/Include Fields - by Frontity

This plugin excludes (blacklist) or includes (whitelist) fields from the REST API response. It may work with both query parameters like fields=title,content and excludeFields=_links and with an admin interface. Best if we match it to the WP.com REST API.