How to quickly test API calls using Postman

in #technology6 months ago

This is another post in the spirit of the STEMGeek's Hackathon.

The prize pool for the Hackathon is over 12,000 Hive right now.


Postman is a very handy tool that allows you to test APIs. This is very handy early in development when working with third-party resources.

Here is a quick example connecting to hive.blog and pulling the json for a Hive post. Did you know you can append .json to a user or a post to get all the details in json form? Pretty handy feature.

Here is another example.

Here I am using the Steem Engine API endpoint to query the account history for @themarkymark for the token PAL.

A new thing you will notice here is how it breaks down the parameters. Instead of messing with the URL, you can just use the parameters form to fill in the fields you want to modify. This makes it a lot easier to change your parameters as you continue testing.

You can also create environments to store commonly used parameters or to hide API Keys.

From there you can use variables now to represent these values from the environment.

As you can see, when running this query I get the same results as if I filled them in.

Postman appears to be a simple tool but when you start it up you will quickly notice it is loaded with features and actually can take some time to get a good grasp of it.

I highly recommend going through this five-part introduction series on YouTube if you want to learn the basics quickly.


Securely chat with me on Keybase

Why you should vote me as witness

Sort:  

Awesome Tool! i'm already using it!

Cool tool. Bookmarked. Will be useful.

Hi, and thanks for sharing this. There are similar tools like this out there, but this seems simple and straight to use and would be useful to share for more people to see. This post will be included in our community GitPlait-elite publication today. Thanks for your work!

Happy Mother's Day :)