Amit Jotwani

Amit Jotwani

Playing with APIs in Postman: Getting Code Samples and Curl Commands Quickly

Tinkering

Now that I am playing around a bit more frequently with APIs, especially Twitter’s v2 API, and Airtable’s API, I have found myself playing around a lot more with Postman. It’s my new favorite app/service.

I have obviously been living under a huge rock all this while, cause I didn’t realize the power Postman. Not only can you explore APIs, but they also support things like generating docs automatically for your APIs (which I did for greetingsapi.com). They’re also working closely with popular APIs like Twitter, so publicly available endpoints are included by default inside Postman. No need to shuttle back and forth between the docs and where your code is.

Another new thing I am discovering is that they automatically generate code samples for popular languages for each endpoint. So you can essentially just copy/paste these to see them in action. This is pretty huge.

Here’s an example for Python. You can also choose Curl, and several other languages.