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- For HTTP requests, this is eitherprerequestortest, depending on where the script is executing within the request. For gRPC, it’s eitherbeforeInvoke,onIncomingMessage, orafterResponse, depending whether script is running a Before invoke, On message, or After response hook, respectively. -
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.