Introduction
Postman supports a number of different variable “scopes”:- Global
- Collection
- Environment
- Data
- Local
Environment Variables
The Example Quai Postman Environment includes a small number of pre-defined environment variables that you can use in your requests. These variables include:chain
myAddress
txHash
blockNumber
This guide assumes you have already installed Postman and imported the Example Quai Postman
Environment. If you have not done so, please refer to the Setting Up
Postman guide.
Environment
tab in the top left of the Postman application:

Add new variable
field at the bottom of the list and fill it in with the desired value.
Chain Specific Variables
Quai Network has many distinct chains, each with their own sharded address space, state, and unique data. To send a request to a specific chain, you must define thechain
environment variable with the chain name you want to interact with and ensure that all of the arguments you pass to the request are valid for that chain.
For example, to request balance data for my address on Cyprus 1, I need to:
- set the
chain
environment variable tocyprus1
to route to the Cyprus 1 RPC endpoint - ensure that the
myAddress
parameter in the request is a valid Cyprus 1 address
Usage
Environment variables can be used in any request by wrapping the variable name in double curly braces ({{}}
).
For example, all Quai Postman Collection requests use a {{chain}}
variable to specify the chain to request data from in the RPC endpoint URL:
The
{{ chain }}
variable is the only environment variable used by default in all requests. All other variables are optional and can be
used as needed.{{txHash}}
variable with your own transaction hash, you can use it in a request like this:
{{chain}}
with the value of the chain
environment variable. You can hover over the {{}}
to see the resolved value:
