This library is an isomorphic client for the WordPress REST API, designed to work with WordPress 5.0 or later. If you are using the older WP REST API plugin or WordPress 4.9, some commands will not work.
REST API Handbook
What are REST API routes & Endpoints in WordPress?
In WordPress, REST API routes and endpoints refer to the URLs that allow you to access and manipulate the data of a WordPress website using the REST API.
WordPress provides several built-in routes and endpoints, such as:
- /wp/v2/posts – to retrieve and manage posts
- /wp/v2/pages – to retrieve and manage pages
- /wp/v2/media – to retrieve and manage media files
- /wp/v2/users – to retrieve and manage users
- /wp/v2/comments – to retrieve and manage comments
These endpoints can be used to retrieve, create, update or delete data from a WordPress website, and developers can also create custom routes and endpoints to extend the functionality of the REST API. The URL structure of the REST API routes is based on the standard REST conventions and allows you to perform various actions by adding or modifying parameters in the URL.