How to send bulk API requests using Postman

Still need help?

The Atlassian Community is here for you.

Ask the community


Platform Notice: Cloud, Server, and Data Center - This article applies equally to all platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

  

Summary

Sometimes, we need to send a large number of REST API requests to an application.

As an example, if we need to archive many issues in Jira, we can use the script in Is there an easy way to archive a lot of issues?, but we don't always have scripts built for the requests we need.

Here we'll detail how to use a CSV file as input to Postman and use that to make the REST API requests.

Environment

Any computer with Postman installed, sending requests to any application.

Solution

  1. Create a CSV with a header line to use as input.
    In our example, we'll call a PUT request to the /rest/api/2/user method to update a user email in Jira DC
  2. Our CSV looks like this:

    lower_user_name,lower_email_address
    agrant-sd-demo,agrant-sd-demo@example2.com
    jevans-sd-demo,jevans-sd-demo@example2.com
    mdavis-sd-demo,mdavis-sd-demo@example2.com
  3. Download and install Postman - https://www.postman.com/downloads/
  4. Build the request, but replace the parameters by the CSV header with two curly brackets, like {{lower_user_name}}
    Going back to our example, our request looks like this:

    (info) Remember to set the Authorization and the Headers as needed. Usually, we can use our login and password for Basic Auth in the authorization. For POST/PUT methods, usually we need to add the Content-Type header as application/json
  5. Save the request - that will create a collection
  6. Click the "Runner" button on the lower right:
  7. Drag the collection to the "Run Order" panel
  8. In the right portion of the screen, click "Select file" and select the CSV file.
  9. Click the "Preview" button to validate that the parameters are parsed as expected.
  10. Finally, click the run collection button.
  11. Postman will show the result for each of the requests on the screen.


Last modified on Jun 9, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.