← API Testing with Postman learning pathAPI Testing with Postman · Module 6 of 10
Chaining requests and workflows
Build end-to-end API flows.
📖 Key ideas
- Chain requests by passing values: login → token → create order → get order.
- Save IDs from responses into variables.
- Collection Runner runs requests in order.
- pm.execution.setNextRequest controls flow.
- Clean up test data after flows.
💡 Real-life example: Chaining is a relay race: each request passes the baton (token or ID) to the next.
Request chainingUsing one response in the next request
Collection RunnerRuns a collection in sequence
setNextRequestChanges which request runs next
CleanupRemoving data created by tests