You're viewing **Apigee Edge** documentation.  
[Go to the
**Apigee X** documentation](http://cloud.google.com/apigee/docs/api-platform/reference/variables-reference). info

This section provides reference information about the flow variables.

Apigee Edge defines the following flow variables:

```
`apigee`              `loadbalancing`        `route`
`apiproxy`            `message`              `router`
`application`         `messageid`            `servicecallout`
`client`              `organization`         `system`
`current`             `proxy`                `target`
`environment`         `ratelimit`            `variable`
`error`               `request`              `virtualhost`
`is`                  `response`
                               
```

Each of these variables is described in the sections that follow.

### Flow variable terminology

A *flow variable* refers to a value within a context. The value of a flow variable can be
either a primitive type (such as a string, boolean, or integer) or a reference to a specific
object, such as an object instantiated by Edge during request/response processing.

Whether a flow variable refers to a primitive type or an object depends on the
context---the time at which you refer to it. The *context* for a flow variable is the flow
segment in which an API proxy processes a request/response. For example, in any segment of the
response flow context, the `response` flow variable
refers to the [`response`](https://docs.apigee.com/api-platform/reference/variables-reference#response) object.

In most cases, you can think of flow variables as referencing an object. To refer to properties
of that object, you use dot notation. For example, to access the `content` property
of `response`, use `response.content`.

### Working with flow variables

For information on using flow variables, see
[Flow variables
overview](https://docs.apigee.com/api-platform/fundamentals/introduction-flow-variables).

Keep the following in mind when working with flow variables:

- Each flow variable, such as `request`, has properties that you access using dot-notation syntax. For example:

  ```
  request.headers.count
  ```
- Not all flow variables are accessible from all policies or tools (such as the [Trace tool](https://docs.apigee.com/api-platform/debug/using-trace-tool-0)). For example, in the request PreFlow, you won't be able to access the [`response`](https://docs.apigee.com/api-platform/reference/variables-reference#response).
- Most properties are read only. Where some are read/write, they might be read only, too, depending on where in the flow you access them.
- Some policies define *policy-specific* flow variables. For example, the [ResponseCache policy](https://docs.apigee.com/api-platform/reference/policies/response-cache-policy) defines a `responsecache` variable. For more information, see the [policies reference](https://docs.apigee.com/api-platform/reference/policies/reference-overview-policy).
- Do not rely on undocumented variables in your API proxies and apps. For example, do not rely on the values in the undocumented X-Apigee.\* headers in your API proxies as these headers are not intended for customer use and can be removed or changed by Apigee at any time.

> [!NOTE]
> For more information, see:
>
> - **Get started:**
>   - [What are flow variables?](https://docs.apigee.com/api-platform/fundamentals/introduction-flow-variables#whatareflowvariables)
>   - [Understanding flow variable scope](https://docs.apigee.com/api-platform/fundamentals/introduction-flow-variables#understandingflowvariablescope)
>   - [Configuring
>     flows](https://docs.apigee.com/api-platform/fundamentals/flow-configurations)
> - **Tools and policies:**
>   - The [Trace tool](https://docs.apigee.com/api-platform/debug/using-trace-tool-0) lets you see the values of flow variables as you step through the API proxy flow.
>   - The [AssignMessage policy](https://docs.apigee.com/api-platform/reference/policies/assign-message-policy) lets you modify the variables in your API proxy flow.

## `apigee`

A helper variable that provides information about execution time of the policy.

The following table describes the properties of the `apigee` variable:

| Property | Type | Read/Write | Description | [Scope begins](https://docs.apigee.com/api-platform/fundamentals/introduction-flow-variables#understandingflowvariablescope) |
|---|---|---|---|---|
| `apigee.metrics.policy.policy_name.timeTaken` | Integer | Read only | The time, in nanoseconds, that the policy took to execute. | Policy |

## `apiproxy`

Describes the API proxy.

The following table describes the properties of the `apiproxy` variable:

| Property | Type | Read/Write | Description | [Scope begins](https://docs.apigee.com/api-platform/fundamentals/introduction-flow-variables#understandingflowvariablescope) |
|---|---|---|---|---|
| `apiproxy.name` | String | Read only | Name of the API proxy. For example, "My Proxy". | Proxy request |
| `apiproxy.revision` | String | Read only | The revision number of an API proxy. For example, "6". | Proxy request |

For more information on working with API proxies, see
[Understanding APIs and
API proxies](https://docs.apigee.com/api-platform/fundamentals/understanding-apis-and-api-proxies).

## `application`

A container for the `application.basepath` property.

The following table describes the properties of the `application` variable:

| Property | Type | Read/Write | Description | [Scope begins](https://docs.apigee.com/api-platform/fundamentals/introduction-flow-variables#understandingflowvariablescope) |
|---|---|---|---|---|
| `application.basepath` | String | Read only | The deployment base path (specified during API deployment). | Proxy request |

## `client`

The application or system that sent a request to the Edge router.

The following table describes the properties of the `client` variable:

| Property | Type | Read/Write | Description | [Scope begins](https://docs.apigee.com/api-platform/fundamentals/introduction-flow-variables#understandingflowvariablescope) |
|---|---|---|---|---|
| `client.cn` | String | Read only | The common name specified in the TLS/SSL certificate presented by the client app. | Proxy request |
| `client.country` | String | Read only | The country in the TLS/SSL certificate presented by the client app. | Proxy request |
| `client.email.address` | String | Read only | The email address in the TLS/SSL certificate presented by the client app. | Proxy request |
| `client.host` | String | Read only | The HTTP host IP associated with the request received by the ProxyEndpoint. | Proxy request |
| `client.ip` | String | Read only | The IP address of the client or system sending the message to the Edge router. For example, this could be the original client IP or a load balancer IP. | Proxy request |
| `client.locality` | String | Read only | The locality (City) in the TLS/SSL certificate presented by the client. | Proxy request |
| `client.organization` | String | Read only | The organization in the TLS/SSL certificate presented by the client. (Not necessarily equivalent to the organization on Apigee Edge.) | Proxy request |
| `client.organization.unit` | String | Read only | The organizational unit in the TLS/SSL certificate presented by the client. | Proxy request |
| `client.port` | Integer | Read only | The HTTP port associated with the originating client request to the ProxyEndpoint. | Proxy request |
| `client.received.end.time` | String | Read only | The time, expressed in string form, at which the proxy finished receiving the request from the originating client at the ProxyEndpoint. For example: Wed, 21 Aug 2013 19:16:47 UTC. This time value is the string representation of the corresponding 32-bit timestamp quantity. For example, 'Wed, 21 Aug 2013 19:16:47 UTC' corresponds to the timestamp value of 1377112607413. | Proxy request |
| `client.received.end.timestamp` | Long | Read only | The timestamp value specifying when the proxy finished receiving the request from the originating client at the ProxyEndpoint. This value is a 64-bit (long) integer containing the number of milliseconds elapsed since midnight, on January 1, 1970 UTC. | Proxy request |
| `client.received.start.time` | String | Read only | The time, expressed in string form, at which the proxy began receiving the request from the originating client at the ProxyEndpoint. For example: Wed, 21 Aug 2013 19:16:47 UTC This time value is the string representation of the corresponding 32-bit timestamp quantity. For example, 'Wed, 21 Aug 2013 19:16:47 UTC' corresponds to the timestamp value of 1377112607413. | Proxy request |
| `client.received.start.timestamp` | Long | Read only | The timestamp value specifying when the proxy began receiving the request from the originating client at the ProxyEndpoint. This value is a 64-bit (long) integer containing the number of milliseconds elapsed since midnight, on January 1, 1970 UTC. > [!NOTE] > **Note**: This time value is used to calculate traffic metrics for API proxies in the analytics dashboards. | Proxy request |
| `client.scheme` | String | Read only | Returns http or https depending on the transport used by client app to send the request message. | Proxy request |
| `client.sent.end.time` | String | Read only | The time, expressed in string form, at which the proxy finished sending the response from the ProxyEndpoint to the client. For example: "Wed, 21 Aug 2013 19:16:47 UTC". This value is a string representation of the corresponding 32-bit `client.sent.end.timestamp`. For example, "Wed, 21 Aug 2013 19:16:47 UTC" corresponds to the timestamp value of 1377112607413. > [!NOTE] > **Note** : This property is only available in the ProxyEndpoint response's PostClientFlow. In all other flows, the value of this property is the empty string. > For information about accessing this property, see [MessageLogging policy](https://docs.apigee.com/api-platform/reference/policies/message-logging-policy). | PostClientFlow |
| `client.sent.end.timestamp` | Long | Read only | The timestamp value specifying when the ProxyEndpoint finished returning the response to the originating client app. This value is a 64-bit (long) integer containing the number of milliseconds elapsed since midnight, on January 1, 1970 UTC. > [!NOTE] > **Note** : This property is only available in the ProxyEndpoint response's PostClientFlow. In all other flows, the value of this property is -1. > For information about accessing this property, see [MessageLogging policy](https://docs.apigee.com/api-platform/reference/policies/message-logging-policy). | PostClientFlow |
| `client.sent.start.time` | String | Read only | The time, expressed in string form, when the ProxyEndpoint started returning the response to the originating client app. For example, "Wed, 21 Aug 2013 19:16:47 UTC". This value is a string representation of the corresponding 32-bit `client.sent.start.timestamp`. For example, "Wed, 21 Aug 2013 19:16:47 UTC" corresponds to the timestamp value of 1377112607413. > [!NOTE] > **Note** : This property is only available in the ProxyEndpoint response's PostClientFlow. In all other flows, the value of this property is the empty string. > For information about accessing this property, see [MessageLogging policy](https://docs.apigee.com/api-platform/reference/policies/message-logging-policy). | PostClientFlow |
| `client.sent.start.timestamp` | Long | Read only | When the proxy began sending the response to the client from the ProxyEndpoint. This value is expressed as a 64-bit (long) integer containing the number of milliseconds elapsed since midnight, on January 1, 1970 UTC. > [!NOTE] > **Note** : This property is only available in the ProxyEndpoint response's PostClientFlow. In all other flows, the value of this property is -1. > For information about accessing this property, see [MessageLogging policy](https://docs.apigee.com/api-platform/reference/policies/message-logging-policy). | PostClientFlow |
| `client.ssl.enabled` | String | Read only | "true" if the ProxyEndpoint is configured for TLS/SSL; otherwise "false". | Proxy request |
| `client.state` | String | Read only | The state in the TLS/SSL certificate presented by the client. | Proxy request |

## `current`

Contains information about the current API proxy flow.

The following table describes the properties of the `current` variable:

| Property | Type | Read/Write | Description | [Scope begins](https://docs.apigee.com/api-platform/fundamentals/introduction-flow-variables#understandingflowvariablescope) |
|---|---|---|---|---|
| `current.flow.name` | String | Read only | The name of the flow that is currently executing (such as "PreFlow", "PostFlow", or the name of a conditional flow). | Proxy request |
| `current.flow.description` | String | Read only | The description of the currently executing flow. This is the same as the value of the `<Description>` element in the flow's XML configuration. | Proxy request |

You can view these properties in the Edge UI's Trace view. However, these properties are not
visible by default in the Classic UI's Trace view.
**To see the properties in the Classic UI:**

1. Log in to the [Edge UI](https://apigee.com/edge).
2. Select **APIs \> API Proxies**. The API Proxies list view is displayed.
3. Select your API Proxy to see the proxy's summary view. If you don't see your proxy in the list, be sure that you selected the right organization, as described in [A word about organizations](https://docs.apigee.com/api-platform/reference/create-account#orgs).
4. Click the **Trace** tab. The Trace view is displayed.
5. Under **View Options** , enable the **Show All FlowInfos** checkbox, as the following example shows:

   ![Select View Options to display a list of checkboxes that you use to enable
   or disable various settings. Enable the third option underneath
   Transaction Map, 'Show All FlowInfos', by checking the box next to it.](https://docs.apigee.com/static/api-platform/images/showallfavorites-enable.png)

## `environment`

A container for the `environment.name` property.

The following table describes the properties of the `environment` variable:

| Property | Type | Read/Write | Description | [Scope begins](https://docs.apigee.com/api-platform/fundamentals/introduction-flow-variables#understandingflowvariablescope) |
|---|---|---|---|---|
| `environment.name` | String | Read only | Name of the environment in which the transaction ran. | Proxy request |

## `error`

A contextual object that represents an error message in the
[error flow](https://docs.apigee.com/api-platform/fundamentals/fault-handling).

> [!NOTE]
>
> ### NOTE
>
> Error variables are only available in the error flow.

The following table describes the properties of the `error` variable:

| Property | Type | Read/Write | Description | [Scope begins](https://docs.apigee.com/api-platform/fundamentals/introduction-flow-variables#understandingflowvariablescope) |
|---|---|---|---|---|
| `error` | [`message`](https://docs.apigee.com/api-platform/reference/variables-reference#message) | Read/Write | Error of type [`message`](https://docs.apigee.com/api-platform/reference/variables-reference#message), which is a contextual object in the error flow. | Error |
| `error.content` | String | Read/Write | Content of the error. | Error |
| `error.message` | String | Read only | Message associated with an error, whose value is available only before the error Flow is executed. | Error |
| `error.status.code` | Integer | Read only | The HTTP status code associated with the error. For example, "400". | Error |
| `error.reason.phrase` | String | Read only | The reason phrase associated with the error. For example: "Bad Request". | Error |
| `error.transport.message` | TransportMessage | Read only | Any error of type TransportMessage. | Error |
| `error.state` | Integer | Read only | State in the Flow where an error occurred. | Error |
| `error.header.header_name` | String | Read/Write | Get or set the response header. | Error |

## `fault`

A flow variable that is set to a runtime error code when a policy throws an error.
Error code values are specific to each policy.

| Property | Type | Read/Write | Description | [Scope begins](https://docs.apigee.com/api-platform/fundamentals/introduction-flow-variables#understandingflowvariablescope) |
|---|---|---|---|---|
| `fault.fault_name` | String | Read only | <var translate="no">fault_name</var> is the name of the fault, as described in the **Runtime errors** table included in each [policy reference](https://docs.apigee.com/api-platform/reference/policies/reference-overview-policy) topic. | Error |

## `is`

A container for the `is.error` property.

The following table describes the properties of the `is` variable:

| Property | Type | Read/Write | Description | [Scope begins](https://docs.apigee.com/api-platform/fundamentals/introduction-flow-variables#understandingflowvariablescope) |
|---|---|---|---|---|
| `is.error` | Boolean | Read only | Error flag. | Proxy request |

## `loadbalancing`

Provides information about the TargetEndpoint's load balancing status.

The following table describes the properties of the `loadbalancing` variable:

| Property | Type | Read/Write | Description | [Scope begins](https://docs.apigee.com/api-platform/fundamentals/introduction-flow-variables#understandingflowvariablescope) |
|---|---|---|---|---|
| `loadbalancing.failedservers` | Array of Strings | Read only | List of failed TargetServers during load balancing at TargetEndpoint. | Target response |
| `loadbalancing.isfallback` | Boolean | Read only | "true" if fallback is enabled for the TargetServer invoked during load balancing at TargetEndpoint. | Target response |
| `loadbalancing.targetserver` | String | Read only | TargetServer invoked during load balancing at TargetEndpoint. Set only if the `<Path>` element is set while defining the load balancer element. | Target response |

## `message`

A contextual object, with the same value as [`request`](https://docs.apigee.com/api-platform/reference/variables-reference#request) in the request flow
or as [`response`](https://docs.apigee.com/api-platform/reference/variables-reference#response) in the response flow or as [`error`](https://docs.apigee.com/api-platform/reference/variables-reference#error) in the error
flow.

The following table describes the properties of the `message` variable:

| Property | Type | Read/Write | Description | [Scope begins](https://docs.apigee.com/api-platform/fundamentals/introduction-flow-variables#understandingflowvariablescope) |
|---|---|---|---|---|
| `message` | [`message`](https://docs.apigee.com/api-platform/reference/variables-reference#message) | Read/Write | A contextual object, with the same value as `request` in the request Flow or as `response` in the response Flow or as `error` in the Error flow. | Proxy request |
| `message.content` | String | Read/Write | Content of the request, response, or error message. | Proxy request |
| `message.formparam.param_name` | String | Read/Write | Value of the specified form parameter. | Proxy request |
| `message.formparam.param_name. values` | Collection | Read only | All values of the specified form parameter in the message. | Proxy request |
| `message.formparam.param_name. values.count` | Integer | Read only | Count of the values of the specified form parameters in the message./p\> | Proxy request |
| `message.formparams.count` | Integer | Read only | Count of all form parameters in the message. | Proxy request |
| `message.formparams.names` | Collection | Read only | Value of all form parameters in the message. | Proxy request |
| `message.formstring` | String | Read only | Value of form string in the message. | Proxy request |
| `message.header.header_name` | String | Read/Write | Gets or sets the value of the specified HTTP header in the message. If the header contains a comma, upon read you will receive only the segment of the text up to the first comma. If you want the entire header, use the form `request.header.header_name. values` | Proxy request |
| `message.header.header_name.N` | String | Read/Write | The value of the *Nth* particular header value in the message, either request or response, depending on the state of the flow. Apigee Edge splits header text values by commas. Note that the index whose value is used for N is 1-based, not 0-based. For example: if the `Cache-control` header is "public,maxage=16544", then the return value of `message.header.cache-control.1` is "maxage=16544". | Proxy request |
| `message.header.header_name. values` | Collection | Read only | All values of the specified HTTP header name in the message. | Proxy request |
| `message.header.header_name. values.count` | Integer | Read only | Count of the values of the specified HTTP header name in the message. | Proxy request |
| `message.headers.count` | Integer | Read only | Count of all HTTP headers in the message. | Proxy request |
| `message.headers.names` | Collection | Read only | Value of all HTTP headers in the message | Proxy request |
| `message.path` | String | Read/Write | The complete request message path in URL excluding any query parameters. | Proxy request |
| `message.queryparam.param_name` | String | Read only | Returns the specified message query parameter. | Proxy request |
| `message.queryparam.param_name.N` | String | Read/Write | The value of the *Nth* query parameter in the message. For example, if the `request.querystring` is "a=hello\&a=world", then the return value of `message.queryparam.a.1` is "hello". As an example of writing multiple values for a single query parameter name, such as "type=siteid:1\&type=language:us-en\&type=currency:USD", set the following: - `message.queryparam.type.1` to "siteid:1" - `message.queryparam.type.2` to "language:en-us" - `message.queryparam.type.3` to "currency:USD" | Proxy request |
| `message.queryparam.param_name. values` | Collection | Read only | All the values of a particular query parameter in the message, formatted as a comma-separated list. For example, if the query string is `a=hello&a=world`, then the value of `message.queryparam.a.values` is "\['hello', 'world'\]". | Proxy request |
| `message.queryparam.param_name. values.count` | Integer | Read only | The total count of a specified query parameter associated with the request sent to the ProxyEndpoint from the client app. | Proxy request |
| `message.queryparams.count` | Integer | Read only | The total count of all query parameters associated with the request sent to the ProxyEndpoint from the client app. | Proxy request |
| `message.queryparams.names` | Collection | Read only | A list of all query parameter names associated with the request sent to the ProxyEndpoint from the client app. To iterate over the query parameter names using JavaScript, see the following Apigee Community post: [How do you iterate Collection from "request.queryparams.names" in JS?](https://discuss.google.dev/t/how-do-you-iterate-collection-from-request-queryparams-names-in-js/12968) in the [Apigee Community](https://discuss.google.dev/c/google-cloud/cloud-apigee/104). | Proxy request |
| `message.querystring` | String | Read only | A string containing all query parameter names and values associated with the request sent to the ProxyEndpoint from the client app. For example, for the request "http://api.apifactory.com/inventors?name=nick\&surname=danger", the value of `message.querystring` is "name=nick\&surname=danger". | Proxy request |
| `message.reason.phrase` | String | Read only | ReasonPhrase of the response message from target. | Target response |
| `message.status.code` | Integer | Read only | HTTP status code of the response message from target. | Target response |
| `message.transport.message` | TransportMessage | Read only | Message of type TransportMessage which is a contextual object. | Proxy request |
| `message.uri` | String | Read only | The complete URI path (following the domain URL) including query parameters. For example, for the request "http://api.apifactory.com/inventors?name=nikola\&surname=tesla", this variable returns "inventors?name=nikola\&surname=tesla". | Proxy request |
| `message.verb` | String | Read only | The HTTP verb (`GET`, `PUT`, `POST`, `DELETE`, etc.) associated with the request. | Proxy request |
| `message.version` | String | Read/Write | The HTTP version associated with the request sent to the ProxyEndpoint from the client application. | Proxy request |

For more information on messages, see
[Message template function reference](https://docs.apigee.com/api-platform/reference/message-template-intro).

## `messageid`

A container for the globally unique ID for the request.

The following table describes the properties of the `messageid` variable:

| Property | Type | Read/Write | Description | [Scope begins](https://docs.apigee.com/api-platform/fundamentals/introduction-flow-variables#understandingflowvariablescope) |
|---|---|---|---|---|
| `messageid` | String | Read only | Holds the globally unique ID for the request, which includes the router host name. This ID allows requests received at the router to be tracked after they are sent to the message processor. This ID is logged in Edge error logs to correlate the `messageid` with the errors. | Proxy request |

## `organization`

A container for the `organization.name` property.

The following table describes the properties of the `organization` variable:

| Property | Type | Read/Write | Description | [Scope begins](https://docs.apigee.com/api-platform/fundamentals/introduction-flow-variables#understandingflowvariablescope) |
|---|---|---|---|---|
| `organization.name` | String | Read only | Name of the organization. | Proxy request |

For more information on organizations, see
[Understanding
organizations](https://docs.apigee.com/api-platform/fundamentals/apigee-edge-organization-structure).

## `proxy`

The API proxy configuration.

The following table describes the properties of the `proxy` variable:

| Property | Type | Read/Write | Description | [Scope begins](https://docs.apigee.com/api-platform/fundamentals/introduction-flow-variables#understandingflowvariablescope) |
|---|---|---|---|---|
| `proxy.basepath` | String | Read only | The value of the Base Path in your API proxy configuration. The base path is the URI fragment that follows the host in the URL. Conditional flow URIs follow the base path. In the URL "http://myorg-test.apigee.net**/v2/weatherapi**/forecastrss?w=12797282": - Host is "myorg-test.apigee.net" (which includes the organization name and environment) - Base path is "/v2/weatherapi" The only way you'd know this is by looking at the API proxy definition or checking the value of the proxy.basepath variable. The proxy path suffix follows the base path ("/forecastrss"), along with any query parameters. If you define a dynamic Base Path in your API proxy configuration, such as "/v2/\*/weatherapi", then this variable is set to the dynamic path ("/v2/\*/weatherapi"), even though the base path resolves to a static value, such as "/v2/foo/weatherapi". | Proxy request |
| `proxy.client.ip` | String | Read only | The `X-Forwarded-For` address of the inbound call, which is the IP address Edge received from the last external TCP handshake. This could be the calling client or a load balancer. | Proxy request |
| `proxy.name` | String | Read only | The name attribute configured for the ProxyEndpoint. | Proxy request |
| `proxy.pathsuffix` | String | Read only | The value of API proxy basepath suffix that is sent from the client and received at the ProxyEndpoint. The basepath is defined as the path component that uniquely identifies the API proxy. The public-facing URL of an API proxy is comprised of your organization name, the environment where the proxy is deployed, the basepath, the basepath suffix, and any query parameters. For example, in a request to `http://myorg-test.apigee.net/v2/weatherapi/forecastrss?w=12797282`, the basepath suffix is "/forecastrss". | Proxy request |
| `proxy.url` | String | Read only | Gets the complete URL associated with the proxy request received by the ProxyEndpoint, including any query parameters present. The host of the URL will always be `localhost` if the proxy is invoked with `<LocalTargetConnection>` to perform [proxy chaining](https://docs.apigee.com/api-platform/fundamentals/connecting-proxies-other-proxies). For an example that constructs a [`request`](https://docs.apigee.com/api-platform/reference/variables-reference#request) URL using the original host, see [Access request messages](https://docs.apigee.com/api-platform/fundamentals/understanding-handling-request-response-data#access-request-messages). | Proxy request |

For more information on working with API proxies, see
[Understanding APIs and
API proxies](https://docs.apigee.com/api-platform/fundamentals/understanding-apis-and-api-proxies).

## `ratelimit`

Populated when a Quota or SpikeArrest policy executes.

> [!NOTE]
> **Note:** The `ratelimit.policy_name.failed` property is the only property applicable to the Spike Arrest policy.

The following table describes the properties of the `ratelimit` variable:

| Property | Type | Read/Write | Description | [Scope begins](https://docs.apigee.com/api-platform/fundamentals/introduction-flow-variables#understandingflowvariablescope) |
|---|---|---|---|---|
| ratelimit.<var translate="no">policy_name</var>.allowed.count | Long | Read only | Returns the allowed quota count. | PostClientFlow |
| ratelimit.<var translate="no">policy_name</var>.used.count | Long | Read only | Returns the current quota used within a quota interval. | PostClientFlow |
| ratelimit.<var translate="no">policy_name</var>.available.count | Long | Read only | Returns the available quota count in the quota interval. | PostClientFlow |
| ratelimit.<var translate="no">policy_name</var>.exceed.count | Long | Read only | Returns 1 after the quota is exceeded. | PostClientFlow |
| ratelimit.<var translate="no">policy_name</var>.total.exceed.count | Long | Read only | Returns 1 after the quota is exceeded. | PostClientFlow |
| ratelimit.<var translate="no">policy_name</var>.expiry.time | Long | Read only | Returns the UTC time (in milliseconds), which determines when the quota expires and when the new quota interval starts. When the Quota policy's type is `rollingwindow`, this value is not valid because the quota interval never expires. | PostClientFlow |
| ratelimit.<var translate="no">policy_name</var>.identifier | String | Read only | Returns the (client) identifier reference attached to the policy | PostClientFlow |
| ratelimit.<var translate="no">policy_name</var>.class.allowed.count | Long | Read only | Returns the allowed quota count defined in the class | PostClientFlow |
| ratelimit.<var translate="no">policy_name</var>.class.used.count | Long | Read only | Returns the used quota within a class | PostClientFlow |
| ratelimit.<var translate="no">policy_name</var>.class.available.count | Long | Read only | Returns the available quota count in the class | PostClientFlow |
| ratelimit.<var translate="no">policy_name</var>.class.exceed.count | Long | Read only | Returns the count of requests that exceeds the limit in the class in the current quota interval | PostClientFlow |
| ratelimit.<var translate="no">policy_name</var>.class.total.exceed.count | Long | Read only | Returns the total count of requests that exceeds the limit in the class across all quota intervals, so it is the sum of `class.exceed.count` for all quota intervals. | PostClientFlow |
| ratelimit.<var translate="no">policy_name</var>.failed | Boolean | Read only | Indicates whether or not the policy failed (true or false). | PostClientFlow |

For more information, see the following:

- [Rate limiting](https://docs.apigee.com/api-platform/develop/rate-limiting)
- [Comparing Quota and SpikeArrest policies](https://docs.apigee.com/api-platform/develop/comparing-quota-spike-arrest-and-concurrent-rate-limit-policies)
- [Quota policy](https://docs.apigee.com/api-platform/reference/policies/quota-policy)
- [SpikeArrest policy](https://docs.apigee.com/api-platform/reference/policies/spike-arrest-policy)

## `request`

The complete request, including any payload present.

For more information about request data, see
[How is request data passed to the backend server?](https://docs.apigee.com/api-platform/fundamentals/understanding-handling-request-response-data#howrequestdatapassedtothebackendserver)

The following table describes the properties of the `request` variable:

| Property | Type | Read/Write | Description | [Scope begins](https://docs.apigee.com/api-platform/fundamentals/introduction-flow-variables#understandingflowvariablescope) |
|---|---|---|---|---|
| `request` | [`message`](https://docs.apigee.com/api-platform/reference/variables-reference#message) | Read only | The complete request, including any payload present. | Proxy request |
| `request.content` | String | Read/Write | Gets or sets the payload of the request message. | Proxy request |
| `request.formparam.param_name` | String | Read/Write | Gets or sets the value of the specified form parameter in the request sent from the client application. | Proxy request |
| `request.formparam.param_name. values` | Collection | Read only | All the values of a particular form parameter in the request, formatted as a comma-separated list. For example, if the payload is "a=hello\&x=greeting\&a=world", then the value of `request.formparam.a.values` is "\['hello', 'world'\]". | Proxy request |
| `request.formparam.param_name. values.count` | Integer | Read only | Count of all values for the specified form parameter associated with the request. | Proxy request |
| `request.formparam.param_name.N` | String | Read/Write | The value of the *Nth* particular form parameter in the message. For example, if the form string is "a=hello\&a=world", then the return value of `request.formparam.a.1` is "hello". | Proxy request |
| `request.formparams.count` | Integer | Read only | Count of all form parameters associated with the request sent from the client application. | Proxy request |
| `request.formparams.names` | Collection | Read only | A list of all form parameter names associated with the request. | Proxy request |
| `request.formstring` | String | Read only | The complete `formparam` in the request sent from the client app. For example, "name=test\&type=first\&group=A". | Proxy request |
| `request.header.header_name` | String | Read/Write | Gets or sets the value of a particular header found in the request. If the header contains a comma, upon read you will receive only the segment of the text up to the first comma. If you want the entire header, use the form `request.header.header_name.values`. | Proxy request |
| `request.header.header_name.N` | String | Read/Write | The value of the *Nth* particular header value in the request. Apigee Edge splits header text values by commas. Note that the index whose value is used for N is 1-based, not 0-based. For example, if the `Cache-control` header is "public, maxage=16544", then the return value of `request.header.cache-control.1` is "maxage=16544". | Proxy request |
| `request.header.header_name. values` | Collection | Read only | All the values of a particular header in the request. | Proxy request |
| `request.header.header_name. values.count` | Integer | Read only | Count of all the values of a particular header in the request. | Proxy request |
| `request.headers.count` | Integer | Read only | Count of all the headers in the request. | Proxy request |
| `request.headers.names` | Collection | Read only | Names of all the headers in the request. | Proxy request |
| `request.path` | String | Read only | The un-proxied resource path (not including the host) to the backend service, excluding query parameters. For example, of the URI to the backend service is "https://example.com/rest/api/latest", then the value of `request.path` is "/rest/api/latest". | Proxy request |
| `request.queryparam.param_name` | String | Read/Write | The value of a particular query parameter found in the request. | Proxy request |
| `request.queryparam.param_name.N` | String | Read/Write | The value of the *Nth* query parameter in the request. For example, if the `request.querystring` is "a=hello\&a=world", then the return value of is `request.queryparam.a.1` is "hello". As an example of writing multiple values for a single query parameter name, such as "type=siteid:1\&type=language:us-en\&type=currency:USD", set the following: - `request.queryparam.type.1` to "siteid:1" - `request.queryparam.type.2` to "language:en-us" - `request.queryparam.type.3` to "currency:USD" | Proxy request |
| `request.queryparam.param_name. values` | Collection | Read only | All the values of a particular query parameter in the request, formatted as a comma-separated list. For example, if `request.querystring` is "a=hello\&b=lovely\&a=world", then the value of `request.queryparam.a.values` is "\['hello', 'world'\]". | Proxy request |
| `request.queryparam.param_name. values.count` | Integer | Read only | The count of all the values of a particular query parameter in the request. | Proxy request |
| `request.queryparams.count` | Integer | Read only | The count of all the query parameters in the request. | Proxy request |
| `request.queryparams.names` | Collection | Read only | The names of all the query parameters in the request. To iterate over the query parameter names using JavaScript, see [How do you iterate Collection from "request.queryparams.names" in JS?](https://discuss.google.dev/t/how-do-you-iterate-collection-from-request-queryparams-names-in-js/12968) in the [Apigee Community](https://discuss.google.dev/c/google-cloud/cloud-apigee/104). | Proxy request |
| `request.querystring` | String | Read only | The complete list of query parameters in the request sent from the client app. For example, if the request is "http://host.com/123?name=first\&surname=second\&place=address", then this variable returns "name=first\&surname=second\&place=address". | Proxy request |
| `request.transportid` | String | Read only | ID of the request as type TransportMessage which is a contextual object. | Proxy request |
| `request.transport.message` | Transport-Message | Read only | Request of type TransportMessage which is a contexual object. | Proxy request |
| `request.uri` | String | Read only | In an API proxy, the proxy `<BasePath>` in the ProxyEndpoint (in addition to the proxy's base URL) maps to the target service URL in the TargetEndpoint. For example: `<ProxyEndpoint> ... <BasePath>/my-mock-proxy</BasePath>` Points to `<TargetEndpoint> ... <HTTPTargetConnection> http://mocktarget.apigee.net </HTTPTargetConnection>` In the **request** , `request.uri` is the proxy base path + the remainder of the address, including query parameters. In the **response** , `request.uri` is the remainder of the address, including query parameters, after the HTTPTargetConnection. The difference is because the original request came into the proxy, but then the proxy makes another request to the target service. Let's say the following call is made to our sample proxy, which has a base path of "/my-mock-proxy": `http://my_org-test.apigee.net/my-mock-proxy/user?user=Dude` And the proxy calls: `http://mocktarget.apigee.net` Which appends "/user?user=Dude" to that URL. - Request: `request.uri` = "/my-mock-proxy/user?user=Dude" - Response: `request.uri` = "/user?user=Dude" | Proxy request (differs in the response) |
| `request.url` | String | Read only | The complete URL of the request made to the target endpoint, including the query string parameters, but not including the port number (if specified). For example, if you make a call to a sample proxy "http://my_org-test.apigee.net/my-mock-proxy/user?user=Dude", and the target endpoint is "http://example.com:8080", then the value is: - Request: n/a - Response: "http://example.com/user?user=Dude" | Target response |
| `request.verb` | String | Read only | The HTTP verb used for the request. For example, "GET", "PUT", and "DELETE". | Proxy request |
| `request.version` | String | Read only | The HTTP version of the request. For example, "1.1". | Proxy request |

## `response`

The complete response, including any payload present.

The following table describes the properties of the `response` variable:

| Property | Type | Read/Write | Description | [Scope begins](https://docs.apigee.com/api-platform/fundamentals/introduction-flow-variables#understandingflowvariablescope) |
|---|---|---|---|---|
| `response` | [`message`](https://docs.apigee.com/api-platform/reference/variables-reference#message) | Read/Write | Complete response message returned by target. | Target response |
| `response.content` | String | Read/Write | Payload content of the response message returned by the target. | Target response |
| `response.formparam.param_name` | String | Read/Write | The value of a form parameter in the response. | Target response |
| `response.formparam.param_name. values.count` | Integer | Read only | Count of all the values of the specified form parameter in response. | Target response |
| `response.formparams.count` | Integer | Read only | Count of all form prameters in the response. | Target response |
| `response.formparams.names` | Collection | Read only | The names of all the form parameters in the response. | Target response |
| `response.header.header_name` | String | Read/Write | Gets or sets the value of a specified HTTP header in the response. If the header text includes a comma, Apigee Edge infers multiple values. In this case, `response.header.header_name` returns the first value only. To read the entire header, use the form `response.header.header_name.values`. | Target response |
| `response.header.header_name. values` | Collection | Read only | All the values of a specified HTTP header in response. | Target response |
| `response.header.header_name. values.count` | Integer | Read only | Count of all the values of the specified HTTP header in response. | Target response |
| `response.header.header_name.N` | String | Read/Write | The value of the *Nth* particular header value in the response. Apigee Edge splits header text values by commas. Note that the index whose value is used for N is 1-based, not 0-based. For example, if the `Cache-control` header is "public, maxage=16544", then `response.header.cache-control.1` returns "maxage=16544". | Target response |
| `response.headers.count` | Integer | Read only | Count of all the headers in the response. | Target response |
| `response.headers.names` | Collection | Read only | The names of all the headers in the response. | Target response |
| `response.reason.phrase` | String | Read/Write | The response reason phrase for a particular request. | Target response |
| `response.status.code` | Integer | Read/Write | The response code returned for a request. You can use this variable to override the response status code, which is stored in `message.status.code`. For more, see [`message`](https://docs.apigee.com/api-platform/reference/variables-reference#message). | Target response |
| `response.transport.message` | String | Read only | Response of type TransportMessage which is a contexual object. | Target response |

## `route`

Specifies the names of the `<RouteRule>` and TargetEndpoint.

The following table describes the properties of the `route` variable:

| Property | Type | Read/Write | Description | [Scope begins](https://docs.apigee.com/api-platform/fundamentals/introduction-flow-variables#understandingflowvariablescope) |
|---|---|---|---|---|
| `route.name` | String | Read only | The name of the `<RouteRule>` that was executed in the ProxyEndpoint. For example, "default". A RouteRule references an API proxy TargetEndpoint to execute. | Target request |
| `route.target` | String | Read only | The name of the TargetEndpoint that was executed. For example, "default". | Target request |

## `router`

A container for the `router.uuid` property, which is deprecated.

The following table describes the properties of the `router` variable:

| Property | Type | Read/Write | Description | [Scope begins](https://docs.apigee.com/api-platform/fundamentals/introduction-flow-variables#understandingflowvariablescope) |
|---|---|---|---|---|
| `router.uuid` | String | Read only | Deprecated and returns null. (Formerly the UUID of the router handling the proxy.) | Proxy request |

## `servicecallout`

Describes the TargetEndpoint for a [ServiceCallout policy](https://docs.apigee.com/api-platform/reference/policies/service-callout-policy).

The following table describes the properties of the `servicecallout` variable:

| Property | Type | Read/Write | Description | [Scope begins](https://docs.apigee.com/api-platform/fundamentals/introduction-flow-variables#understandingflowvariablescope) |
|---|---|---|---|---|
| `servicecallout.policy_name.expectedcn` | String | Read/Write | The expected Common Name of the TargetEndpoint as referred to in a [ServiceCallout policy](https://docs.apigee.com/api-platform/reference/policies/service-callout-policy) policy. This is meaningful only when the TargetEndpoint refers to a TLS/SSL endpoint. | Proxy request |
| `servicecallout.policy_name.target.url` | String | Read/Write | The TargetEndpoint URL for a particular [ServiceCallout policy](https://docs.apigee.com/api-platform/reference/policies/service-callout-policy). | Proxy request |
| `servicecallout.requesturi` | String | Read/Write | The TargetEndpoint URI for a [ServiceCallout policy](https://docs.apigee.com/api-platform/reference/policies/service-callout-policy) policy. The URI is the TargetEndpoint URL without the protocol and domain specification. | Proxy request |

## `system`

Specifies the IP address of the system, as well as details about the proxy.

The following table describes the properties of the `system` variable:

| Property | Type | Read/Write | Description | [Scope begins](https://docs.apigee.com/api-platform/fundamentals/introduction-flow-variables#understandingflowvariablescope) |
|---|---|---|---|---|
| `system.interface.interface_name` | String | Read only | IP address of the system. | Proxy request |
| `system.pod.name` | String | Read only | The name of the pod where the proxy is running. | Proxy request |
| `system.region.name` | String | Read only | The name of the data center [region](https://cloud.google.com/compute/docs/regions-zones/viewing-regions-zones) where the proxy is running. | Proxy request |
| `system.time` | String | Read only | The time when this variable was read. For example, "Wed, 21 Aug 2013 19:16:47 UTC". This value is the string representation of the corresponding value of `system.timestamp`. For example, "Wed, 21 Aug 2013 19:16:47 UTC" corresponds to the timestamp value of "1377112607413". | Proxy request |
| `system.time.year` | Integer | Read only | The year portion of `system.time`. | Proxy request |
| `system.time.month` | Integer | Read only | The month portion of `system.time`. | Proxy request |
| `system.time.day` | Integer | Read only | The day of month portion of `system.time`. | Proxy request |
| `system.time.dayofweek` | Integer | Read only | The day of the week portion of `system.time`. | Proxy request |
| `system.time.hour` | Integer | Read only | The hour portion of `system.time`. | Proxy request |
| `system.time.minute` | Integer | Read only | The minute portion of `system.time`. | Proxy request |
| `system.time.second` | Integer | Read only | The second portion of `system.time`. | Proxy request |
| `system.time.millisecond` | Integer | Read only | The millisecond portion of `system.time`. | Proxy request |
| `system.time.zone` | String | Read only | Timezone of the system. | Proxy request |
| `system.timestamp` | Long | Read only | The 64-bit (long) integer representing the time that this variable was read. The value is the number of milliseconds elapsed since midnight, on January 1, 1970 UTC. For example, "1534783015000". | Proxy request |
| `system.uuid` | String | Read only | The UUID of the message processor handling the proxy. | Proxy request |

## `target`

Describes the target of the request.

The following table describes the properties of the `target` variable:

| Property | Type | Read/Write | Description | [Scope begins](https://docs.apigee.com/api-platform/fundamentals/introduction-flow-variables#understandingflowvariablescope) |
|---|---|---|---|---|
| `target.basepath` | String | Read only | The resource path (not including the domain) to the target service, excluding query parameters, that is defined in the proxy's TargetEndpoint. For example, say an API proxy calls the following target: `<TargetEndpoint name="default"> ... <HTTPTargetConnection> <URL>http://mocktarget.apigee.net/user?user=Dude</URL> </HTTPTargetConnection>` In this example, the `target.basepath` is "/user". If the target were this: `<TargetEndpoint name="default"> ... <HTTPTargetConnection> <URL>http://mocktarget.apigee.net</URL> </HTTPTargetConnection>` The `target.basepath` would be null. | Target request |
| `target.copy.pathsuffix` | Boolean | Read/Write | When "true", the request forwarded from ProxyEndpoint to TargetEndpoint retains the path suffix (the URI path fragment following the URI defined in the ProxyEndpoint base path). | Target request |
| `target.copy.queryparams` | Boolean | Read/Write | When "true", request forwarded from ProxyEndpoint to TargetEndpoint retains query parameters. | Target request |
| `target.country` | String | Read only | Country of the TLS/SSL certificate presented by the target server | Target response |
| `target.cn` | String | Read only | The Common Name of the TargetEndpoint. This is meaningful only when the TargetEndpoint refers to a TLS/SSL endpoint. | Target request |
| `target.email.address` | String | Read only | Email address of the TLS/SSL certificate presented by the target server | Target response |
| `target.expectedcn` | String | Read/Write | The expected Common Name of the TargetEndpoint. This is meaningful only when the TargetEndpoint refers to a TLS/SSL endpoint. | Proxy request |
| `target.host` | String | Read only | The domain name of the target service returning the response to the API proxy. | Target response |
| `target.ip` | String | Read only | The IP address of the target service returning the response to the API proxy. | Target response |
| `target.locality` | String | Read only | Locality (city) of the TLS/SSL certificate presented by the target server | Target response |
| `target.name` | String | Read only | Target to which message is reaching from targetendpoint. | Target request |
| `target.organization` | String | Read only | Organization of the TLS/SSL certificate presented by the target server. | Target response |
| `target.organization.unit` | String | Read only | Organization unit of the TLS/SSL certificate presented by the target server. | Target response |
| `target.port` | Integer | Read only | The port number of the target service returning the response to the API proxy. | Target response |
| `target.received.end.time` | String | Read only | The time, expressed in string form, at which the TargetEndpoint finished receiving the response from the target. For example, "Wed, 21 Aug 2013 19:16:47 UTC". This time value is the string representation of the corresponding 32-bit timestamp quantity. For example, "Wed, 21 Aug 2013 19:16:47 UTC" corresponds to the timestamp value of "1377112607413".. | Target response |
| `target.received.end. timestamp` | Long | Read only | The timestamp value specifying when the TargetEndpoint finished receiving the response from the target. For example, "1534783015000". This value is a 64-bit (long) integer specifying the number of milliseconds elapsed since midnight, on January 1, 1970 UTC. | Target response |
| `target.received.start.time` | String | Read only | The time, expressed in string form, at which the TargetEndpoint started receiving the response from the target. For example, "Wed, 21 Aug 2013 19:16:47 UTC". This time value is the string representation of the corresponding 32-bit timestamp quantity. For example, "Wed, 21 Aug 2013 19:16:47 UTC" corresponds to the timestamp value of "1377112607413". | Target response |
| `target.received.start. timestamp` | Long | Read only | The timestamp value specifying when the TargetEndpoint started receiving the response from the target. For example, "1534783015000". This value is a 64-bit (long) integer specifying the number of milliseconds elapsed since midnight, on January 1, 1970 UTC. | Target response |
| `target.scheme` | String | Read only | **Scope begins** : Target response **Type** : String **Permission**: Read/Write Returns http or https depending on the request message. | Target request |
| `target.sent.end.time` | String | Read only | The time, expressed in string form, at which the proxy stopped sending the request to the URL specified in the TargetEndpoint. For example, "Wed, 21 Aug 2013 19:16:47 UTC". This time value is the string representation of the corresponding 32-bit timestamp quantity. For example, "Wed, 21 Aug 2013 19:16:47 UTC" corresponds to the timestamp value of "1377112607413". | Target request |
| `target.sent.end.timestamp` | Long | Read only | The timestamp value specifying when the proxy finished sending the request to the URL specified in the TargetEndpoint. For example, "1377112607413". This value is a 64-bit (long) integer containing the number of milliseconds elapsed since midnight, on January 1, 1970 UTC. | Target request |
| `target.sent.start.time` | String | Read only | The time, expressed in string form, at which the proxy began sending the request to the URL specified in the TargetEndpoint. For example, "Wed, 21 Aug 2013 19:16:47 UTC". This time value is the string representation of the corresponding 32-bit timestamp quantity. For example, "Wed, 21 Aug 2013 19:16:47 UTC" corresponds to the timestamp value of "1377112607413". | Target request |
| `target.sent.start.timestamp` | Long | Read only | The timestamp value specifying when the proxy started sending the request to the URL specified in the TargetEndpoint. For example, "1534783015000". This value is a 64-bit (long) integer specifying the number of milliseconds elapsed since midnight, on January 1, 1970 UTC. | Target request |
| `target.ssl.enabled` | Boolean | Read only | Whether TargetEndpoint is running on TLS/SSL. | Proxy request |
| `target.state` | String | Read only | State of the TLS/SSL certificate presented by the target server. | Target response |
| `target.url` | String | Read/Write | The URL configured in the TargetEndpoint XML file or the dynamic target URL (if `target.url` is set during the message flow). The variable does not include any additional path elements or query parameters. Returns null if called out of scope or otherwise unset. > [!NOTE] > **NOTE:** Use a [JavaScript policy](https://docs.apigee.com/api-platform/reference/policies/javascript-policy) attached to the TargetEndpoint to set this variable. | Target request |

## `variable`

A container for the `variable.expectedcn` property.

The following table describes the properties of the `variable` variable:

| Property | Type | Read/Write | Description | [Scope begins](https://docs.apigee.com/api-platform/fundamentals/introduction-flow-variables#understandingflowvariablescope) |
|---|---|---|---|---|
| `variable.expectedcn` | String | Read/Write | Variable exposed for the common name if it's running on TLS/SSL. | Proxy request |

For more information on working with TLS, see the
[TLS/SSL introduction](https://docs.apigee.com/api-platform/system-administration/ssl).

## `virtualhost`

Specifies details about the virtual host.

The following table describes the properties of the `virtualhost` variable:

| Property | Type | Read/Write | Description | [Scope begins](https://docs.apigee.com/api-platform/fundamentals/introduction-flow-variables#understandingflowvariablescope) |
|---|---|---|---|---|
| `virtualhost.aliases.values` | Array of Strings | Read only | Host aliases of the virtual host that is hit during a particular request. | Proxy request |
| `virtualhost.name` | String | Read only | Name of the virtual host that serves the originating client request. | Proxy request |
| `virtualhost.ssl.enabled` | Boolean | Read only | Returns "true" if TLS/SSL is enabled in the virtual host configuration. | Proxy request |

For more information on working with virtual hosts, see
[Configuring virtual hosts](https://docs.apigee.com/api-platform/fundamentals/configuring-virtual-hosts).