What and the beginning of self. The API (Application Programming Interface) is just a set of documented guidelines for programmatically interacting with application data. This is a good way for one software to communicate with another. A rest API is an API type that follows specific rules related to importing data from within and outside an application. The
The following video outlines the meaning of these two concepts. Todd Fredrich’s rest API tutorial series is another excellent resource if you want to learn more. The way to interact with the API is through HTTP web requests. Send requests to the server and receive structured responses. Typically, your request requires action and can perform four standard actions: The abbreviation crud is usually used to describe this series of tasks, involving most of the tasks to be performed in general sites or applications. These operations are for a certain type of resource, that is, the thing or object that we want to happen. The
For WordPress, the rest API (at creation time) allows you to interact with 11 types of WordPress objects. After modifying the post, the page media post type post status comment category label users will only focus on this series of posts, but according to the document itself, \
The postman Chrome extension helps you quickly test rest APIs. I know that the default search function works, but I will call a single post and confirm again. The Post search section in the reference document shows that you can do this using the get request and post id:get\/wp\/v2\/post\/ male. Post ID 4 is my favorite on the local website, so it is perforated on postman. Male Presto movement! The rest API has inspired wisdom beyond the times. Different parts of the data are brilliantly classified in the postman interface. The
Now, let’s look at how to create a post. I want to add this simple number. \
On the postman side, the situation looks good, but go to the back end to confirm the following: Long live! It worked! The status is set to draft because you forgot to specify it through the API call. As an exercise, the reader can learn how to change it through the API itself.
I will stay. The combination of postman, related rest API post documents and basic authentication plug-ins allows you to browse the solution! Conclusion we introduced several practical methods. These methods involve a lot of content in a short time, and users who are not familiar with the technology can directly and quickly interact with the rest API. Let’s review what we’ve experienced so far: setting up a simple local installation and populating it with content. We have confirmed that we can run the rest API plug-in and actually connect. In general, we discussed the basic concepts of the rest API and its usability in WordPress. The rest API confirms that data can be imported into and out of word press. It’s a good start. There will be more in the future. Read the following articles to learn about the front-end solutions that can be used to interact with data. As usual, if you have any questions or ideas, please contact me through the message below!