Archived topic — this may be out of date.
Newman has been replaced by the Postman CLI, Postman’s official, signed command-line tool. It runs collections as Newman did, and also lints API specs, runs mocks and monitors, and syncs local files with Postman from your terminal, CI/CD pipeline or coding agent.
Working with an AI coding agent? The Postman plugin lets agents in Claude Code, Cursor, Codex and others design, mock, test and ship APIs with Postman.
For current help, see the Postman docs, try the free Postman tools (no account needed), or join us on Discord.
I want to run multiple APIs in one collection with multiple request data(query parameter/body)
I want to do all this via a single newman command
Can i achieve this usecase?
Or can you suggest a different solution with minimum changes to above setup?
Welcome to the Postman community ! Correct me If I am wrong, are you talking about sending requests with request body to API endpoints(not belonging to a single API) in one collection. If that is accurate, then the answer is Yes, it does not matter how many API endpoints you are using, you can run a single collection using the Newman CLI tool, relevant documentation can be found here: https://learning.getpostman.com/docs/postman/collection_runs/command_line_integration_with_newman/
I would suggest you try to use folders with appropriate names in the collection so you can create a separation between the different API’s for your reference.
Thanks for the material @aamir.ahmed, but can we identify which request data in the array of json input will serve which api request in the collection
Do u imply that we need to execute different/multiple newman cmds like
–> newman run -folder api1 -data inputfile1
–> newman run -folder api2 -data inputfile2
Doing this in an automation fashion requires to maintain a mapping file between api folders and inputfiles
Do we have the ability to make this possible in just one command?
If you wish to use data files in your newman run, you would have to execute the following command for each folder if you wish to organize your folders into requests to different API:
newman run --folder -d
I am not sure what you mean by a mapping file, but you can get the entire list of usage options for newman using the following command:
newman run -h
If by any chance you are using a CI/CD pipeline you could probably create a Makefile and enter the multiple newman run commands for each folder there. Hope that helps.