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 either prerequest or test, depending on where the script is executing within the request. For gRPC, it’s either beforeInvoke, onIncomingMessage, or afterResponse, 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.

Last modified: 2025/11/04


Postmanaut illustration for Tests and scripts section.