Reference request metadata in scripts
The pm.info object provides meta information related to the request and the script itself.
pm.info properties
The pm.info object contains the following properties:
-
pm.info.eventName:String- The script that’s running. The value depends on the request type:- For HTTP requests, it’s
prerequestin a Pre-request script ortestin a Post-response script. - For gRPC requests, it’s
beforeInvokein a Before invoke script,onIncomingMessagein an On message script, orafterResponsein an After response script. - For GraphQL requests, it’s
beforeQueryin a Before query script orafterResponsein an After response script.
- For HTTP requests, it’s
-
pm.info.iteration:Number- The value of the current iteration. -
pm.info.iterationCount:Number- The total number of iterations that are scheduled to run. -
pm.info.requestName:String- The saved name of the request running. -
pm.info.requestId:String- A unique GUID that identifies the running request.
