TABLE OF CONTENTS
2. How to Use Scripts in API Project
1. Overview
This article provides detailed information on using Scripts in the Request section tabs of an API project.
2. How to Use Scripts in API Project
Currently, under the Request Section Tabs>>Scripts section, we only support Pre-request scripts.
When you click the Send button, the pre-request script executes before the actual API request URL is called. This allows you to run JavaScript code for example, using pm.environment.set() to assign a random value or dynamically update environment variables.
Once you click on Send, the data will be stored in the Env. You can view this data under the Env tab.
At present, we support adding dynamic environment data through Pre-request scripts.

Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article