Sayantan Mitra Sayantan Mitra - 8 months ago 109
reST (reStructuredText) Question

How to create API for wordpress?

I want to create APIs for a project in Wordpress. I am new to wordpress and doesn't have much idea how things work in wordpress. I figured out that most of the things are done in wordpress using plugins. Hence there might be a way to use REST APIs using some plugin in wordpress.

I installed Wordpress REST API (Version 2) plugin and activated it.

Now I am not able to understand how this plugin works. It asks users to use some url which looks something like this

localhost/woocommerce/wp-json/wp/v2/users (This shows only one user which was created by wordpress. The default admin user. Even if I add more users, this API doesn't show the rest of the users.)

I am actually confused how this plugin works and I need to create custom APIs.

I tried creating API key and secret as I found in some answers. But what I really want to know is how this particular plugin works so that I can create my custom APIs.

If anyone is familiar with this plugin and how this works, any help will be much appreciated. Thanks in advance

Answer Source

Here the document on how to create API. In which they have explained how to create API, what the method you can set for the API call.

Hope this will help you.

Thanks!

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download