Steps to create and use a Collection
Step 1: Click on the + Icon present in the Postman application in the Collections tab.
The Collections tab on the left sidebar shows all the collections that have been created.
- An Authorization method can be specified for all the requests in the collection in the Authorization tab.
- Pre-request scripts can be added to run a script before executing each request.
- Tests can be included which executes after every request.
- Variables necessary for the collection can be specified in the Variables tab.
Step 2: When you hover, on the name of your collection, 3 dots will appear. Click on those 3 dots, and then click on “Add new request”
Step 3: Now You can simply paste the API in the space provided and select the API type you are requesting from the dropdown like GET,POST, PUT, DELETE etc. Output will be shown in the body with the status code.
API Used:
https://jsonplaceholder.typicode.com/posts/?userId=1
Output:
What are collections in Postman, and how to use them?
Postman is an Application Programming Interface (API) tool that streamlines the lifecycle of API development and testing efficiently. It can be used to develop, design, document, and test APIs.