11+ Year IT Industry Experience, Working as Technical Lead with Capgemini | Consultant | Leadership and Corporate Trainer | Motivational and Technical Speaker | Career Coach | Author | MVP | Founder Of RVS Group | Trained more than 4000+ IT professionals | Azure | DevOps | ASP.NET | C# | MVC | WEB API | ANGULAR | TYPESCRIPT | MEAN | SQL | SSRS | WEB SERVICE | WCF... https://bikeshsrivastava.blogspot.in/ http://bikeshsrivastava.com/

Importing Api List From Swagger And Introduction To Collection In Postman

A. Introduction
Postman is open source, free to install in your system and is used to test API’s. Using Postman, you can test any type of Services, controller, or Web Application after setting your configuration.
B. How to use postman?

According to Image you need to follow given points.
Ø Select request methods e.g. GET, POST, PUT, DELETE...etc.according your endpoint request.
Ø Enter complete Endpoint with query string value (if any)e.g.
Ø Enteraccess token (if any),and set Content -Type =>” application/json”
For details please refer below screenshot.


Ø If request method is POST/PUT/DELETE you have to set BODY panel. In case of GET it will be hide.
Ø Click=>BODY panel=>check raw=>type json payload e.g.

"CustomFieldDonationAnswers": [
    { "CustomFieldGuid": "string",
      "FieldAnswer": {}
}
],


For details please refer below screenshot


Ø Click=>SEND, thereafter you can see response data in bottom panel the form of json data.


C.How to create collection in postman?
Using postman you can categorized request with all details (parameter, access token, endpoint, etc...) in folder. Collection can be import in postman for next time. Follow simple 2-3 steps to create collection.
Step 1:Once the entire configuration for postman is set.Press ctrl+S to get the new window open. In new window we need to set these things as given below
Ø Request Name e.g. “Create Donation
Ø Request description (optional) e.g. “To create new donation with externalID…”
Ø Create collection name e.g. “Application_Integration”, if already created we can select any.
Ø Click on ‘Save’ button, thereafter we can see folder in left panel. For details please refer below screenshot


After click on ‘Save’ button you can see in left panel endpoint is listed, we can save multiple endpoints in a single folder with request details.
If we have already created folder and want add new endpoint, just follow above steps and select “save and existing collection” picklist, wecan see all existing folders and select any.

Step2:To export and save collection on local drive,Please refer below screenshot


Click on “Export” a new popup will be open as per below screenshot


User can choose the option and click on “Export” button. After that select path in your local drive and save. You can see collection has been saved on your local drive in the .json file.


D.How to import collection?
If we want to import collection in postman from local drive just follow some steps.
Open postman=>Click on Import button. Please refer below screenshot

After click on Import button new popup will be open to select source type. Please refer below screenshot

Select “import file” tab and click on “Choose file” from local drive.Thereafter you can see collection in left panel with complete details.


E. How to import endpoint list from swagger?
In this part we will go through withan example and steps to import endpoints list from swagger with details.
As we know swagger contains endpoints list in json format. For example you can verify the URL “***********************”.

Ø  Copy swagger URL and go to postman.Open postman=>click on Importnew popup window will be open. For details please refer below screenshot


Ø Select “Import from link” tab paste swagger URL in textbox
Ø Click on Import button.
Ø Now you are able to see all endpoints from all foldersas available on postman.After that postman will looks like as shown in below screenshot

After importing from swagger all endpoints is available in postman with remarks, endpoints, method(GET,POST….), and header value except payload
Now you need to set payload inside Body tab=>raw, because Microsoft doesn’t allow importing payload from swagger. 
Other referenced link.

You have just read an article that categorized by title WEB API by title Importing Api List From Swagger And Introduction To Collection In Postman. You can bookmark this page with a URL https://bikeshsrivastava.blogspot.com/2017/01/part-42importing-api-list-from-swagger.html. Thank You!
Author: Bikesh Srivastava - Monday, January 9, 2017

There are currently no comments for "Importing Api List From Swagger And Introduction To Collection In Postman"

Post a Comment

Life Is Complicated, But Now programmer Can Keep It Simple.