Making Your First API Call Using Postman | How to Create first API Request in Postman

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so hello and welcome back to the new video of the postman tutorial Series so today in this video uh we will be seeing how we can create our very first API request in Postman okay so since this is the beginner friendly course and this is the third our third video I don't want to create any complex uh API request so in this video we'll be just seeing how we can get started using the postman and how we can create and manage our API request that we are going to send uh we are we are going to send to the server and server in responsible response to our to us okay through a postman okay so let's go and let me just open my Postman okay uh okay it's opening fine uh so I am assuming that you have uh seen our previous videos and you have installed your uh own version of your Postman in your PC uh whether it should be a Windows or Linux or Mac the UI will be same okay right so let me just uh start with the Clean Slate uh I don't want to okay so this is our workspace now uh once you come here uh you want to send or create of your very first API request okay so before that you have to understand the UI and how you can use the oh this UI that is being provided by the postman okay so you come inside your collection collections are nothing but either way to organize your request or the similar kind of request in a particular folder okay so you you create a folder which is a named as a collection in terms of postline and inside which all the similar kind of API requests are grouped together okay and inside apis uh it says no API set because we don't have any added any apis or tested any apis in the postman okay so environments are there and mock servers monitors flows and history here here's the history it will tell you uh which are which are you API request you have given to the postman although the API requests are from inside this History part okay so we are trying to create our first API request before that I will I would highly highly recommend you also suggest you to create your account on Postman don't just get started without creating your account on Postman so do sign up or sign in if you already have an account okay and then watch this video okay so I'm assuming that you have sign ups or sign in in your own personal account let's go and create our own very first API request through Postman okay so for this video tutorial I will be using one uh API which is named as a deck of cards API so you just go ahead and write Tech of cards API in your browser and hit enter and very first uh website you will see deck of cards dot api.com open it okay so what is it it is a API which is of the deck of cards the the game you might have played once in your lifetime okay so we'll use the shuffle the cards for this this one Shuffle the cards uh request to send the there there are many requests to draw a card uh reshuffle the cards so we'll see all these in our upcoming videos forever but now to create our very first own request uh to the through API to postman uh we'll see the how we can do it with the shuffle the cards okay so here you can see uh this is the uh this up till now uh the this is our uh what we can say end points and after that you can see this is our uh resources and after the question mark whatever we write is name as parameters okay so I hope you know all these terms this is uh endpoints resources and then parameters okay and here you can see add a deck count as a get or post parameter to define the number of decks you want to use okay so they are telling telling us that you we can modify the number of tech counts if they are default they have given as one you can modified uh Blackjack typically uses uh six decks uh the default is one okay so they have given us the default you can modify it to six seven one two six uh whatever you want okay and in response this API will give you a response like this this is a Json object uh success is true true or false that means it's a Boolean or deck ID is given to you which is unique and shuffled is stated that true and remaining is 52 because they are 52 52 cards in a deck and we are performing shuffling of cards okay so there should not be any cards that is uh decrease or increase okay okay fine uh we can just hit copy and so to copy this request and we go inside our Postman and you can see there are two ways by which you can create your very first or request of API just to hit enter over here it will create an Untitled request okay so if you don't another way is head on click on new uh then there are a bunch of bunch of options over here you can see uh you can click on HTTP request again you will come at uh that same UI that you are that you are getting by clicking on the plus button and you can see Untitled request is there and you can rename your request by clicking or clicking on okay so here you can see new request duplicate tab you can do all these things okay okay fine we will go ahead and say changes okay okay so these are these many requests I get post request put request patch delete copy head these are the many requests which are provided by the postman we will select the get and uh params is the parameters that we are passing also in our case we are passing the parameters of deck count as one so it will come over here key as a the account and value as one and if you have any description you can provide that as well and authorization uh part is there are some apis which require authorization uh you can't just go ahead and hit uh send the request to the API those apis requires authorization for that uh testing of apis uh this authorization tab comes in picture we will see uh some that apis that type of apis as well okay and these are the settings which is uh there for this request that we are trying to create okay enough talking uh we'll go into the params and the link that is or the request that we have copied from here we'll just go ahead and paste it over here and as soon as I've hit uh Ctrl V command V for Mac you can see uh it automatically populated the deck count and value as one as soon as I change the value of S6 you can see the postman is also a quick query patterns are also changing that one as well I will keep it as one which is default one okay and as soon as I hit enter you can see say send and download also features is there you can send and download your response which is get which you will get from your API okay so I will just simply hit save send okay now we can see uh status is uh 200 okay so I hope you know this status codes of uh web okay so you can see state if you don't know just go ahead and enter search for the status code first thing for link came from developer dot mozilla.org here I have HTTP responses status codes are there you can watch or see every status code that you get so our API has sent us status code AS 200 okay if you hover over here you can see the documentation as well the standard uh you can see standard response for successful HTTP requests so our request is successful and time taken uh is also is there and amount of size uh it a 30-bit i byte it takes okay uh so the here also Postman provisets the various uh tabs pretty means uh although Json response that we get from our API is prettified and this looks in a good manner okay so raw raw means the the response that we get from our API in a raw preview is a preview and visualize a setup so we have to set up the visualizer for this okay we will do in our upcoming videos but now you can see success is true a deck ID is given to us remaining is 52 and shuffled is true uh so if I go here and deck of cards API I'll similarly there is a similar kind of response that they have given to us that response we have given uh uh back to us from our API okay so this is how you can create your own API okay and now if I just save and here you can see uh says you don't have any collections uh let's let me create one collection so that you can understand the collection part as well create collection I will name my collection as deck of cards API okay I'll create my collection okay so see the collection is empty I will click on Save now we can go inside your collections and you can see deck of cards API collection is uh collection is created inside whichever this API call is there and if I again hit hit enter or send this should give me the same kind of response but the decade is different okay so whenever you click on this the ID will be different for every response that you are trying to give to the API okay so if I you will give two you can see remaining is one zero four okay uh so the maximum is six I guess that we can give yeah six we can give and if I try to give seven let's check what it takes okay set it is also seven seven is also good okay so fine uh I hope you got the idea how we can create a API requestion Postman okay so thank you for watching this video and I will see you in the next one
Info
Channel: ProgrammingKnowledge
Views: 40,234
Rating: undefined out of 5
Keywords: postman download, postman install postman download for windows 10, postman download for windows 10 64-bit, how to install postman in ubuntu, postman chrome extension, install postman mac, install postman-linux, how to create api request in postman, postman get request example, get request in postman, api request example, postman post request example, rest api postman example, api get request example, postman post request with parameters
Id: l2MBsq8r4uM
Channel Id: undefined
Length: 11min 40sec (700 seconds)
Published: Wed Apr 26 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.