Chris Mendez in Wordpress, APIs, SaaS, IaaS, PaaS

WordPress API development with Postman or PAW

The Wordpress API was released a few years ago and it works really well. The only challenge –for new and experienced developers alike– is figuring out how so sent REST requests. After a few weeks working with the API, here are a few tips that streamlined my development process.

Tips

Tip 1: Pick an API tool

It's tempting to open up terminal and start using curl but I highly suggest using an API tool such as Postman or Mac PAW.

For the remainder of this article, I am going to use PAW.

Tip 2: Import this Wordpress API Collection into Postman or PAW

I've attached a file that allows you to see all the possible API requests you can make from a basic Wordpress API installation. This document is really all you need to get started.

https://spaces.hightail.com/space/IGiQ0ktyFD


Installing Wordpress API Collection for PAW

Step 1 - Open up PAW

paw-01

Step 2 - Import Collection

paw-02

paw-03

Step 3 - Choose POSTman Collection

paw-04

paw-05

Step 4 - Done!

paw-06

Step 5 - Set Up Env Variables

Both Postman and PAW allow you to create environmental variables that will work across all of your requests. What I normally do is adjust the variable named base_url to my WordPress site.

Click "Manage" on the upper left corner.

paw-08

Change the value.
paw-07


Resources