:ear_of_rice: WordPress REST API endpoints
This plugin provides you different endpoints using WordPress REST API.
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:
When we access the end point on URI: http://your-domain/wp-json/wp/v2/rae/post/create
,
and we pass our 'user_id', 'title' and 'content' in the body using postman, we get the following with a status code:
These instructions will get you a copy of the project up and running on your local machine for development purposes.
You need to have any WordPress theme activated on your WordPress project, which has REST API enabled.
/wp-content/plugins/
directory, or install a zipped directory of this plugin through the WordPress plugins screen directly.There are different end points that are available. Some are public while others are protected.
http://your-domain/wp-json/wp/v2/rae/user/login
Params to be sent in the body
username(String)
andpassword(String)
Return Value:User Object or Error (Object)
http://your-domain/wp-json/wp/v2/rae/post/create
Params to be sent in the body
user_id(Int)
,title(String)
andcontent(String)
Return Value:Object with post ID and status or Error (Object)
http://example.com/wp-json/rae/v1/post?post_id=1
http://example.com/wp-json/rae/v1/posts?page_no=1
http://example.com/wp-json/rae/v1/header-footer?header_location_id=primary&footer_location_id=secondary
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
I use Git for versioning.