This page applies to Apigee and Apigee hybrid.
View Apigee Edge documentation.
This section provides reference information about the flow variables.
Apigee defines the following flow variables:
apigee
is
request
apiproduct
loadbalancing
response
apiproxy
message
route
client
messageid
servicecallout
current
mint
system
environment
organization
target
error
proxy
variable
fault
publishmessage
graphql
ratelimit
Each of these variables is described in the sections that follow.
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 |
---|---|---|---|---|
apigee.metrics.policy.policy_name.timeTaken |
Integer | Read only | The time, in nanoseconds, that the policy took to execute. | Policy |
apiproduct
A helper variable that provides information about API products.
The following table describes the properties of the apiproduct
variable:
Property | Type | Read/Write | Description | Scope begins |
---|---|---|---|---|
apiproduct.operation |
String | Read only |
Name of the API product's operation. This variable helps you differentiate between the Quota policy's settings and the quota settings on an API product's operation. For example, |
Proxy request |
apiproduct.operation.resource |
String | Read only |
The resource name of the operation that is matched to a request. |
Proxy request |
apiproduct.operation.methods |
Array | Read only |
An array of HTTP methods that the operation being matched allows. |
Proxy request |
apiproduct.operation.attributes.key_name |
Array | Read only |
Gets the custom attribute value that matches the key_name. |
Proxy request |
For more information, see the following:
apiproxy
Describes the API proxy.
The following table describes the properties of the apiproxy
variable:
Property | Type | Read/Write | Description | Scope begins |
---|---|---|---|---|
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 |
apiproxy.basepath |
String | Read only | The deployment base path (specified during API deployment). | Proxy request |
For more information on working with API proxies, see Understanding APIs and API proxies.
client
The application or system that sent a request to the load balancer.
The following table describes the properties of the client
variable:
Property | Type | Read/Write | Description | Scope begins |
---|---|---|---|---|
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 load balancer. 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.) | 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. |
Proxy request |
client.resolved.ip |
String | Read only |
The resolved client IP address. This is either the value determined from a configured client IP resolution setting or from the default algorithm, if a client IP resolution setting is not specified. See Client IP resolution for information. |
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
|
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. | 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
|
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. | PostClientFlow |
client.ssl.enabled |
String | Read only |
|
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 |
---|---|---|---|---|
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 Apigee UI's Trace view.
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 |
---|---|---|---|---|
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.
The following table describes the properties of the error
variable:
Property | Type | Read/Write | Description | Scope begins |
---|---|---|---|---|
error |
message |
Read/Write | Error of type 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, |
Error |
error.reason.phrase |
String | Read only |
The reason phrase associated with the error. For example: |
Error |
error.transport.message |
TransportMessage | Read only |
Any error of type |
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
Provides information about a runtime error source, reason, and details. Apigee sets these
variables when a policy throws an error, and values are specific to each policy. To understand
when the fault
variables are set, see
About policy errors.
Property | Type | Read/Write | Description | Scope begins |
---|---|---|---|---|
fault.name |
String | Read only | The name of the fault, as described in the Runtime errors table included in each policy reference topic. This variable may be useful in Conditions applied to FaultRules. | Error |
fault.reason |
String | Read only | The reason for the fault. For example, when the OASValidation policy detects that an inbound request does not validate against the OpenAPI Specification, it will set this variable to a string that describes the policy name, the specification name, and the detail describing why the request does not validate against the specification. Other policies will set this variable to messages appropriate for their faults. | Error |
fault.category |
String | Read only | The category. For example if the fault occurs in a policy step, this variable might hold the value "Step". This variable may be useful in Conditions applied to FaultRules. | Error |
fault.subcategory |
String | Read only | The subcategory. For example, if the OASValidation policy detects that a request does not validate against an OpenAPI Specification, it will set this variable to "OASValidationFailure". This variable may be useful in Conditions applied to FaultRules. | Error |
graphql
Gives you access to the results of a GraphQL query at runtime. For more information, see GraphQL policy.
The following table describes the properties of the graphql
variable:
Property | Type | Read/Write | Description | |
---|---|---|---|---|
graphql |
Complex type | READ ONLY/READ WRITE | The root GraphQL query. | SCOPE |
graphql.fragment |
Complex type | READ ONLY/READ WRITE | A reference to the default fragment for this query. | SCOPE |
graphql.fragment.count |
Integer | Read Only | The number of framents spawned by this GraqhQL query. | SCOPE |
graphql.fragment.INDEX.selectionSet.INDEX |
TYPE | READ ONLY/READ WRITE | A reference to the selection set at the specified index. | SCOPE |
graphql.fragment.INDEX.selectionSet.INDEX.name |
String | READ ONLY/READ WRITE | The name of the selection set at the specified index. | SCOPE |
graphql.fragment.INDEX.selectionSet.count |
Integer | Read Only | The number of selection sets in this fragment. | SCOPE |
graphql.fragment.INDEX.selectionSet.name |
String | READ ONLY/READ WRITE | The name of the default selection set in the fragment. | SCOPE |
graphql.operation |
Complex type | READ ONLY/READ WRITE | A reference to the query's default operation.
You cannot set quotas at the operation level. Instead, set them at the environment level. |
SCOPE |
graphql.operation.name |
String | Read Only | The name of the query's default operation. | SCOPE |
graphql.operation.operationType |
Enumeration | Read Only | The type of query's default operation that can be executed against this API proxy. Possible values are
query , mutation , or all . |
SCOPE |
graphql.operation.selectionSet |
Complex Type | The default selection set for the query's default operation. | SCOPE | |
graphql.operation.selectionSet.count |
Integer | Read Only | The number of selection sets in the query's default operation. | SCOPE |
graphql.operation.selectionSet.name |
String | Read Only | The name of the query's default operation's default selection set. | SCOPE |
graphql.operation.selectionSet.INDEX |
Integer | Read Only | A reference to the selection set at the specified index in the list of selection sets. | SCOPE |
graphql.operation.selectionSet.INDEX.name |
String | Read Only | The name of the selection at the specified index in the list of selection sets for this operation. | SCOPE |
graphql.operation.selectionSet.INDEX.[selectionSet] |
Complex type | READ ONLY/READ WRITE | One or more additional selection set objects.
Selection sets can be accessed recursively. For example, after a
| SCOPE |
graphql.operation.selectionSet.INDEX.directive |
Complex type | A reference to the default directive in the specified selection set. | SCOPE | |
graphql.operation.selectionSet.INDEX.directive.count |
Complex type | SCOPE | ||
graphql.operation.selectionSet.INDEX.directive.INDEX |
Integer | Read Only | A reference to the directive at the specified index. | SCOPE |
graphql.operation.selectionSet.INDEX.directive.INDEX.argument.INDEX |
Integer | Read Only | A reference to the argument at the specified index. | SCOPE |
graphql.operation.selectionSet.INDEX.directive.INDEX.argument.INDEX.name |
String | The name of the argument at the specified index. | SCOPE | |
graphql.operation.selectionSet.INDEX.directive.INDEX.argument.INDEX.value |
String | The value of the argument at the specified index. | SCOPE | |
graphql.operation.selectionSet.INDEX.directive.name |
String | SCOPE | ||
graphql.operation.variableDefinitions |
Complex type | A reference to a list of variable definitions for the query's default operation. | SCOPE | |
graphql.operation.variableDefinitions.count |
Integer | The number of variable definitions for the query's default operation. | SCOPE | |
graphql.operation.variableDefinitions.INDEX |
Integer | A reference to the variable definition at the specified index. | SCOPE | |
graphql.operation.variableDefinitions.INDEX.name |
String | The name of the variable definition at the specified index. | SCOPE | |
graphql.operation.variableDefinitions.INDEX.type |
The type of the variable definition's value at the specified index. | SCOPE |
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 |
---|---|---|---|---|
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 |
---|---|---|---|---|
loadbalancing.failedservers |
Array of Strings | Read only |
List of failed TargetServers during load balancing at TargetEndpoint. |
Target response |
loadbalancing.isfallback |
Boolean | Read only |
|
Target response |
loadbalancing.targetserver |
String | Read only |
TargetServer invoked during load balancing at TargetEndpoint. Set only if the
|
Target response |
message
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.
The following table describes the properties of the message
variable:
Property | Type | Read/Write | Description | Scope begins |
---|---|---|---|---|
message |
message |
Read/Write |
A contextual object, with the same value as |
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. |
Collection | Read only |
All values of the specified form parameter in the message. |
Proxy request |
message.formparam.param_name. |
Integer | Read only |
Count of the values of the specified form parameters in the message. |
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.formparams.names.string |
String | Read only |
A comma-separated list of names of all the 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 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. For example, if the If you want the entire header as a string, use a variable like
|
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 splits header text values by commas. The index starts at 1 for the left-most value. For example, if the |
Proxy request |
message.header.header_name. |
Collection | Read only |
All values of the specified HTTP header name in the message. |
Proxy request |
message.header.header_name. |
Integer | Read only |
Count of the values of the specified HTTP header name in the message. |
Proxy request |
message.header.header_name. |
String | Read only |
All the values of a particular header in the message, in the form of a single string. For example, if the |
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.headers.names.string |
String | Read only |
A comma-separated list of names of all the 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
As an example of writing multiple values for a single query parameter name, such as
|
Proxy request |
message.queryparam.param_name. |
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 |
Proxy request |
message.queryparam.param_name. |
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. |
Proxy request |
message.queryparams.names.string |
String | Read only |
A comma-separated list of names of all the query parameters in the message. |
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 |
Proxy request |
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 |
Proxy request |
message.verb |
String | Read only |
The HTTP verb ( |
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.
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 |
---|---|---|---|---|
messageid |
String | Read only |
Holds the globally unique ID for the request, which includes the load balancer host name. This ID allows requests received at the load balancer to be tracked after they are sent to the message processor. This ID is logged in Apigee error logs to correlate the |
Proxy request |
mint
A helper variable that provides information about monetization.
The following table describes the properties of the mint
variable:
Property | Type | Read/Write | Description | Scope begins |
---|---|---|---|---|
mint.limitscheck.is_request_blocked |
Boolean | Read only |
Flag that specifies whether the API request is blocked. Set to This flow variable is available if the MonetizationLimitsCheck policy is attached to the API proxy. See Enforcing monetization limits in API proxies. |
Proxy request |
mint.limitscheck.is_subscription_found |
Boolean | Read only |
Flag that specifies whether the developer has an active subscription to the API product. Set to This flow variable is available if the MonetizationLimitsCheck policy is attached to the API proxy. See Enforcing monetization limits in API proxies. |
Proxy request |
mint.limitscheck.prepaid_developer_balance |
Numeric | Read only |
Current balance in the developer's prepaid account wallet associated with the rate plan's currency. |
Proxy request |
mint.limitscheck.prepaid_developer_currency |
String | Read only |
Currency of the balance available in the
|
Proxy request |
mint.limitscheck.purchased_product_name |
String | Read only |
Name of the associated API product. This flow variable is available if the MonetizationLimitsCheck policy is attached to the API proxy. See Enforcing monetization limits in API proxies. |
Proxy request |
mint.limitscheck.status_message |
String | Read only |
Additional information about the execution of the MonetizationLimitsCheck policy for debugging purposes. This flow variable is available if the MonetizationLimitsCheck policy is attached to the API proxy. See Enforcing monetization limits in API proxies. |
Proxy request |
mint.mintng_consumption_pricing_rates |
String | Read only |
Consumption-based fees. Set the fees when creating a rate plan. |
PostClientFlow |
mint.mintng_consumption_pricing_type |
String | Read only |
Consumption-based pricing type. For example: Set the consumption-based fees when creating a rate plan. |
PostClientFlow |
mint.mintng_currency |
String | Read only |
Currency for calculating the revenue. This flow variable has the value of the |
DataCapture policy |
mint.mintng_dev_share |
Numeric | Read only |
Revenue to be shared with developer. Set the revenue to be shared with the developer when creating a rate plan. |
PostClientFlow |
mint.mintng_is_apiproduct_monetized |
Boolean | Read only |
Flag that specifies whether the API product is currently monetized (that is, if there is an active rate plan in effect). This flow variable is added by the VerifyAPIKey or VerifyAccessToken policy attached to the API proxy. See Adding an authentication policy. |
Proxy request |
mint.mintng_price |
Numeric | Read only |
Revenue for calculating the developer's share. The flow variable has the value of the |
DataCapture policy and PostClientFlow |
mint.mintng_price_multiplier |
Numeric | Read only |
Factor (multiplier) by which the per-transaction cost is multiplied. The flow variable has the value of the |
DataCapture policy and PostClientFlow |
mint.mintng_rate |
Numeric | Read only |
Rate charged for the API call. This flow variable shows the consumption-based fee per API call.
Set the consumption-based fee when creating a rate plan.
If you have configured the |
PostClientFlow |
mint.mintng_rate_before_multipliers |
Numeric | Read only |
Rate charged for the API call without the If the DataCapture policy captures the |
PostClientFlow |
mint.mintng_rate_plan_id |
String | Read only |
ID of the rate plan. This flow variable is added by the VerifyAPIKey or VerifyAccessToken policy attached to the API proxy. See Adding an authentication policy. |
Proxy request |
mint.mintng_revenue_share_rates |
String | Read only |
Revenue share rates. Set the revenue share rate when creating a rate plan. |
PostClientFlow |
mint.mintng_revenue_share_type |
String | Read only |
Revenue share type. For example: Set the revenue share type when creating a rate plan. |
PostClientFlow |
mint.mintng_tx_success |
Boolean | Read only |
Specifies if the transaction is monetized. This flow variable has the value of the |
DataCapture policy |
mint.prepaid_updated_developer_usage |
Numeric | Read only |
Current usage of the prepaid developer. The usage is calculated based on your rate plan configuration and the value of the perUnitPriceMultiplier monetization variable. |
PostClientFlow |
mint.rateplan_end_time_ms |
Numeric | Read only |
Expiration time for the rate plan in milliseconds since epoch. This flow variable is added by the VerifyAPIKey or VerifyAccessToken policy attached to the API proxy. See Adding an authentication policy. |
Proxy request |
mint.rateplan_start_time_ms |
Numeric | Read only |
Activation time for the rate plan in milliseconds since epoch. This flow variable is added by the VerifyAPIKey or VerifyAccessToken policy attached to the API proxy. See Adding an authentication policy. |
Proxy request |
mint.status |
String | Read only |
Status of the monetized call. Populated only on error. |
PostClientFlow |
mint.status_code |
Numeric | Read only |
HTTP status code of the monetized call. Populated only on error. |
PostClientFlow |
mint.subscription_end_time_ms |
Numeric | Read only |
Expiration time for the API product subscription in milliseconds since epoch. This flow variable is available if the MonetizationLimitsCheck policy is attached to the API proxy. See Enforcing monetization limits in API proxies. |
Proxy request |
mint.subscription_start_time_ms |
Numeric | Read only |
Activation time for the API product subscription in milliseconds since epoch. This flow variable is available if the MonetizationLimitsCheck policy is attached to the API proxy. See Enforcing monetization limits in API proxies. |
Proxy request |
mint.tx_success_result |
Boolean | Read only |
Indicates whether monetization is successful for the transaction. The
|
PostClientFlow |
For more information, see the following:
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 |
---|---|---|---|---|
organization.name |
String | Read only |
Name of the organization. |
Proxy request |
For more information on organizations, see Understanding organizations.
proxy
The API proxy configuration.
The following table describes the properties of the proxy
variable:
Property | Type | Read/Write | Description | Scope begins |
---|---|---|---|---|
proxy.basepath |
String | Read only |
The value of the Base Path in your API proxy endpoint configuration. The base path is the left-most URI fragment that follows the host in the URL. Conditional flow URIs follow the base path. Suppose that you have an API Proxy Endpoint configured with a basepath of
If you define a dynamic Base Path in your API proxy configuration, such as
|
Proxy request |
proxy.client.ip |
String | Read only |
The |
Proxy request |
proxy.name |
String | Read only |
The name attribute configured for the ProxyEndpoint. |
Proxy request |
proxy.pathsuffix |
String | Read only |
The value of the path suffix in the URL that is sent from the client and received at the ProxyEndpoint. The basepath is the left-most path component that uniquely identifies an API proxy within
an Environment Group. Suppose that you have an API Proxy endpoint configured with a basepath
of |
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. |
Proxy request |
For more information on working with API proxies, see Understanding APIs and API proxies.
publishmessage
Populated when a the PublishMessage policy executes.
Property | Type | Read/Write | Description | Scope begins |
---|---|---|---|---|
publishmessage.message.id | String | Read-Only | Returns the messageId
(ID of the published message) from the Pub/Sub server.
Apigee sets this flow variable only if the publish request is successful. |
Proxy request |
ratelimit
Populated when a Quota or SpikeArrest policy executes.
The following table describes the properties of the ratelimit
variable:
Property | Type | Read/Write | Description | Scope begins |
---|---|---|---|---|
ratelimit.policy_name.allowed.count | Long | Read-Only | Returns the allowed quota count. | PostClientFlow |
ratelimit.policy_name.used.count | Long | Read-Only | Returns the current quota used within a quota interval. | PostClientFlow |
ratelimit.policy_name.available.count | Long | Read-Only | Returns the available quota count in the quota interval. | PostClientFlow |
ratelimit.policy_name.exceed.count | Long | Read-Only | Returns 1 after the quota is exceeded. | PostClientFlow |
ratelimit.policy_name.total.exceed.count | Long | Read-Only | Returns 1 after the quota is exceeded. | PostClientFlow |
ratelimit.policy_name.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 |
PostClientFlow |
ratelimit.policy_name.identifier | String | Read-Only | Returns the (client) identifier reference attached to the policy | PostClientFlow |
ratelimit.policy_name.class | String | Read-Only | Returns the class associated with the client identifier | PostClientFlow |
ratelimit.policy_name.class.allowed.count | Long | Read-Only | Returns the allowed quota count defined in the class | PostClientFlow |
ratelimit.policy_name.class.used.count | Long | Read-Only | Returns the used quota within a class | PostClientFlow |
ratelimit.policy_name.class.available.count | Long | Read-Only | Returns the available quota count in the class | PostClientFlow |
ratelimit.policy_name.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.policy_name.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.policy_name.failed | Boolean | Read-Only |
Indicates whether or not the policy failed (true or false). |
PostClientFlow |
For more information, see the following:
request
The complete request, including any payload present.
For more information about request data, see How is request data passed to the backend server?
The following table describes the properties of the request
variable:
Property | Type | Read/Write | Description | Scope begins |
---|---|---|---|---|
request |
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. |
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
|
Proxy request |
request.formparam.param_name. |
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 |
Proxy request |
request.formparams.count |
Integer | Read only |
Count of all parameters associated with the request sent from the client application. |
Proxy request |
request.formparams.names |
Collection | Read only |
A list of all parameter names associated with the request. |
Proxy request |
request.formparams.names.string |
String | Read only |
A comma-separated list of all form parameter names associated with the request. |
Proxy request |
request.formstring |
String | Read only |
The complete For example, |
Proxy request |
request.grpc.rpc.name |
String | Read only |
Applicable only when using a gRPC target server. The RPC name. For information on gRPC proxies, see Creating gRPC API proxies. |
Proxy request |
request.grpc.service.name |
String | Read only |
Applicable only when using a gRPC target server. The gRPC status service name. For information on gRPC proxies, see Creating gRPC API proxies. |
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. For example, if the If you want the entire header as a string, use a variable like
|
Proxy request |
request.header.header_name.N |
String | Read/Write |
The value of the Nth particular header value in the request. Apigee splits header text values by commas. The index starts at 1 for the left-most value. For example, if the |
Proxy request |
request.header.header_name. |
Collection | Read only |
All the values of a particular header in the request. |
Proxy request |
request.header.header_name. |
Integer | Read only |
Count of all the values of a particular header in the request. |
Proxy request |
request.header.header_name. |
String | Read only |
All the values of a particular header in the request, in the form of a single string. For example, if the |
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.headers.names.string |
String | Read only |
A comma-separated list of 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, if the URI to the backend service is
|
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 As an example of writing multiple values for a single query parameter name, such as
|
Proxy request |
request.queryparam.param_name. |
Collection | Read only |
All the values of a particular query parameter in the request, formatted as a comma-separated list. For example, if |
Proxy request |
request.queryparam.param_name. |
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. |
Proxy request |
request.queryparams.names.string |
String | Read only |
A comma-separated list of the names of all the query parameters in the request. |
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 |
Proxy request |
request.transportid |
String | Read only |
ID of the request as type TransportMessage which is contextual. |
Proxy request |
request.transport.message |
Transport-Message | Read only |
Request of type TransportMessage which is contexual. |
Proxy request |
request.uri |
String | Read only |
In an API proxy, the proxy
Points to
In the request, In the response, 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
And the proxy calls:
Which appends
|
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
|
Target response |
request.verb |
String | Read only |
The HTTP verb used for the request. For example, |
Proxy request |
request.version |
String | Read only |
The HTTP version of the request. For example, |
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 |
---|---|---|---|---|
response |
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.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 infers multiple values. In this case,
For example, if the If you want the entire header as a string, use a variable like
|
Target response |
response.header.header_name. |
Collection | Read only |
All the values of a specified HTTP header in response. |
Target response |
response.header.header_name. |
Integer | Read only |
Count of all the values of the specified HTTP header in response. |
Target response |
response.header.header_name. |
String | Read only |
All the values of a particular header in the response, in the form of a single string. For example, if the |
Target response |
response.header.header_name.N |
String | Read/Write |
The value of the Nth particular header value in the response. Apigee splits header text values by commas. The index starts at 1 for the left-most value. For example, if the |
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.headers.names.string |
String | Read only |
A comma-separated list of 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 |
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 |
---|---|---|---|---|
route.name |
String | Read only |
The name of the |
Target request |
route.target |
String | Read only |
The name of the TargetEndpoint that was executed. For example, |
Target request |
servicecallout
Describes the TargetEndpoint for a ServiceCallout policy.
The following table describes the properties of the servicecallout
variable:
Property | Type | Read/Write | Description | Scope begins |
---|---|---|---|---|
servicecallout.policy_name.expectedcn |
String | Read/Write |
The expected Common Name of the TargetEndpoint as referred to in a ServiceCallout policy. This is meaningful only when the TargetEndpoint refers to an TLS/SSL endpoint. |
Proxy request |
servicecallout.policy_name.target.url |
String | Read/Write |
The TargetEndpoint URL for a particular ServiceCallout policy. |
Proxy request |
servicecallout.requesturi |
String | Read/Write |
The TargetEndpoint URI for a ServiceCallout 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 |
---|---|---|---|---|
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 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 GMT. This value is the string representation of the corresponding value of
|
Proxy request |
system.time.year |
Integer | Read only |
The year portion of |
Proxy request |
system.time.month |
Integer | Read only |
The month portion of |
Proxy request |
system.time.day |
Integer | Read only |
The day of month portion of |
Proxy request |
system.time.dayofweek |
Integer | Read only |
The day of the week portion of |
Proxy request |
system.time.hour |
Integer | Read only |
The hour portion of |
Proxy request |
system.time.minute |
Integer | Read only |
The minute portion of |
Proxy request |
system.time.second |
Integer | Read only |
The second portion of |
Proxy request |
system.time.millisecond |
Integer | Read only |
The millisecond portion of |
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,
|
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 |
---|---|---|---|---|
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:
In this example, the If the target were this:
The |
Target request |
target.copy.pathsuffix |
Boolean | Read/Write |
When |
Target request |
target.copy.queryparams |
Boolean | Read/Write |
When |
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 an 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 an 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. |
Long | Read only |
The timestamp value specifying when the TargetEndpoint finished receiving the response
from the target. For example, |
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. |
Long | Read only |
The timestamp value specifying when the TargetEndpoint started receiving the response
from the target. For example, |
Target response |
target.scheme |
String | Read only |
Scope begins: Target response 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, |
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 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 |
---|---|---|---|---|
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 Options for configuring TLS.