manifest / integrations / rest-api-endpoints
REST API ENDPOINTS
:ear_of_rice: WordPress REST API endpoints
by Imran Sayed · github.com/imranhsayed/rest-api-endpoints · website
★ 42stars
14forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/imranhsayed/rest-api-endpoints/archive/refs/heads/master.zipFrom the readme
REST API ENDPOINT
This plugin provides you different endpoints using WordPress REST API.
:bustinsilhouette: Login End Point
:pagewithcurl: Create Post End Point
Login Endpoint Demo :videocamera:
When we access the end point on URI: http://your-domain/wp-json/wp/v2/rae/user/login,
and we pass our username and password in the body using postman, we get the following with a status code:
User Object on success
Error when fields are empty or incorrect credentials
Any other error.
Create a new post Endpoint Demo :videocamera:
When we access the end point on URI: http://your-domain/wp-json/wp/v2/rae/post/create,
and we pass our 'userid', 'title' and 'content' in the body using postman, we get the following with a status code:
New post id if the post is created.
Error when fields are empty or if the user with the given id does not have capability to publish posts.
Any other error.
Getting Started :clipboard:
These instructions will get you a copy of the project up and running on your local machine for development purposes.
Prerequisites :door:
You need to have any WordPress theme activated on your WordPress project, which has REST API enabled.
Installation :wrench:
1.