List of all default Rest API endpoints in WordPress website

Advertisement

In WordPress there are lot of default rest API endpoints which may help you while development.

How to access rest API endpoints? How to access rest API endpoints?

You can access rest API endpoints though URLs. E.g. http://wpdigits.com/wp-json/wp/v2/posts

Above URL show the list of all posts in the form of JSON.

In this example endpoint, Domain name is http://wpdigits.com/ and the /wp-json/ shows all the default endpoints.


Below is the list of all default rest API endpoints from any WordPress fresh setup.

/wp/v2/posts,
/wp/v2/posts/(?P<id>[\d]+),
/wp/v2/posts/(?P<parent>[\d]+)/revisions,
/wp/v2/posts/(?P<parent>[\d]+)/revisions/(?P<id>[\d]+),
/wp/v2/posts/(?P<id>[\d]+)/autosaves,
/wp/v2/posts/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+),
/wp/v2/pages,
/wp/v2/pages/(?P<id>[\d]+),
/wp/v2/pages/(?P<parent>[\d]+)/revisions,
/wp/v2/pages/(?P<parent>[\d]+)/revisions/(?P<id>[\d]+),
/wp/v2/pages/(?P<id>[\d]+)/autosaves,
/wp/v2/pages/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+),
/wp/v2/media,
/wp/v2/media/(?P<id>[\d]+),
/wp/v2/blocks,
/wp/v2/blocks/(?P<id>[\d]+),
/wp/v2/blocks/(?P<id>[\d]+)/autosaves,
/wp/v2/blocks/(?P<parent>[\d]+)/autosaves/(?P<id>[\d]+),
/wp/v2/types,
/wp/v2/types/(?P<type>[\w-]+),
/wp/v2/statuses,
/wp/v2/statuses/(?P<status>[\w-]+),
/wp/v2/taxonomies,
/wp/v2/taxonomies/(?P<taxonomy>[\w-]+),
/wp/v2/categories,
/wp/v2/categories/(?P<id>[\d]+),
/wp/v2/tags,
/wp/v2/tags/(?P<id>[\d]+),
/wp/v2/users,
/wp/v2/users/(?P<id>[\d]+),
/wp/v2/users/me,
/wp/v2/comments,
/wp/v2/comments/(?P<id>[\d]+),
/wp/v2/search,
/wp/v2/block-renderer/(?P<name>core/block),
/wp/v2/block-renderer/(?P<name>core/latest-comments),
/wp/v2/block-renderer/(?P<name>core/archives),
/wp/v2/block-renderer/(?P<name>core/categories),
/wp/v2/block-renderer/(?P<name>core/latest-posts),
/wp/v2/block-renderer/(?P<name>core/shortcode),
/wp/v2/settings,
/wp/v2/theme

One thought on “List of all default Rest API endpoints in WordPress website

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: