KIBI.ONE PRESENTS…

Postman API Tutorial For Beginners (2024)

In this tutorial you’ll learn how to use postman, a platform dedicated to helping developers build, test and debug their APIs. 

blackship one logo good

Kibi.One is a no-code SaaS incubation program focused on helping non-technical founders build software companies. Visit our homepage to learn more about our program.

Learn How to Use Postman in About 5 minutes

In this postman tutorial for beginners, I’m going to teach you how to get and post data within postman using very simple, beginner friendly examples.

So after logging into postman you’ll likely be on a page that looks like this. From here we’ll want to click on “workspaces”. From here, we can either add a new workspace or click on an existing workspace.

Now, click on this button to create a new collection. Select “blank collection”. You can rename your collection here.

Add an API Call in Postman

Now, to add an API call, we first need to add a request, so click on these three little dots here and then click on ‘add request”. Again, we can name this request over here.

Next, we’ll need to select the CRUD operation we’re looking to perform. In today’s tutorial we’re just going to cover two. Get (which will allow us to read data) and POST (which will allow us to post data into a database.

So first, we need an API. I’ve put together a list of my 10 favorite APIs that don’t require authentication over on Kibi.One. This will allow you to post in an API endpoint here and start interacting with the data right away. Simply click on the link in the description below to access this resource. For this tutorial, I’m going to use this spacedevs API

https://ll.thespacedevs.com/2.2.0/agencies/

Simpy begin by adding the URL into this field here. Now, click on send. Notice that the API response shows up down here. Notice that we can see each result down here between curly braces. Each response has an Id, url, name, description and so on.

Filtering Using Query Parameters

We could filter these results further by using query parameters. For instance, if you head over to this API’s endpoint you’ll see various filters that you could use in your search. As an example let’s use country_code. We’ll simply add “country_code” to the key under query parameters and under value we’ll type in “USA”. Now we’ll hit search again. Notice now, that the results are only showing results where the country code is USA. We can also add more than one query parameter. For example, we could add this boolean which is featured = true. Now we can run our search again. Now we’re only seeing featured space agencies which have their country code set to “USA”.

So this is how you GET data from an API using postman, but how do you POST data using an API within postman?

How to Post Data Within Postman?

In order to post data, the first thing we need to do is change the operation to POST rather than GET.

Now at Kibi one, we run a startup studio of no-code SaaS products. We also teach people how to build and monetize no-code SaaS applications. Now, I’m currently building a noCode SaaS application and I actually launched a V1 within three days. I’ll link to a video below that will walk you through how I did that, but what I’ll do now, is I’ll just use that project’s database to post data.

Within my project, I’ve created a new data type and I’ve added two fields – name and age. I’ve even added two sample entries to the database so we can test the endpoint within postman to see the results. Aso as long as this is set to GET, I can post in my URL here and then click on ‘send”. Notice that I have a result for a 20 year old jack and a 30 year old jill. Now, let’s imagine that I want to add a 40 year old humpty.

Postman Authentication

In most cases to post something into a database, you’ll need to be authenticated. So let’s first set this to “post” and then authenticate ourselves. Let’s click on “authorization” and then we’ll click on “API Key”. Under “key” I’m going to type in “authorization” and under “value” I’ll type in “bearer” and then space, and then I’ll copy and paste my API key here. Within Postman, you’ll have to follow similar authentication steps based on specific requirements of the API you’re using.

Now, when we click on “send you’ll see we have a “success” message. If I jumped back into my database, you’ll now see that I have a new empty entry added.This shows that the POST request is working. It injected something into my database. But now we want the user, interacting with this API endpoint, to be able to add their name and age.

Submitting Form Data

There are various ways to do this, but I’ll show you two of the most common ways within Postman. First, click on “body” and then click on “form data”. Now here, under the key value pairs, simply ensure that your keys match your database’s keys. The keys in my database are Name and Age, so I’ll add those here. For values I’ll add “Humpty form data”, and for age, I’ll add 40. With these details added, I can now click on “send”. When I head back to my database now, you’ll see this new entry added!

Submitting Data Using JSON Files

Another way to do this is through the use of a JSON file. Simply click on “raw” and then select “JSON” from teh drop down list.

Now I’ll add the following JSON. I’ll add his name as “Humpty JSON” an his age as 41. Again. Let’s click “send”. Now, let’s jump back into the database, and here you’ll see that the entry is added.

Conclusion

So that’s the basics of using postman to Get and POST data using API endpoints. I hope that this postman tutorial has helped you get started using their API testing features.

And remember, if you’re looking to upskill in the area of development, I encourage you to check us out over on Kibi.one. We have a no-code SaaS development course where we will teach you how to build and monetize pretty much whatever you can dream up. A link to Kibi.one and a coupon code for $100 off can be found below.

blackship one logo good

Kibi.One is a no-code SaaS incubation program focused on helping non-technical founders build software companies. Visit our homepage to learn more about our program.

Build SaaS Platforms Without Code

Kibi.One is a platform development incubator that helps non-technical founders and entrepreneurs build software companies without having to know how to code. 

We're so sure of our program, that if it's doesn't generate a positive ROI for you, we'll buy your platform from you. Watch the video to the right to learn more.