SetIntegrationRequest policy Stay organized with collections Save and categorize content based on your preferences.
This pageapplies toApigee andApigee hybrid.
View Apigee Edge documentation.![]()
The SetIntegrationRequest policy lets you create a request object for an integration that you want to run. In the policy, you must configure the details of the API trigger and the input parameters required to run the integration. When you run the SetIntegrationRequest policy, it creates a request object and saves it in a flow variable. The request object has all the information required to run the integration. At this stage, the integration is still not run. To run the integration, you must either call theIntegrationCallout policy or set anIntegrationEndpoint. Both the IntegrationCallout policy and IntegrationEndpoint require the request object to run the integration.
This policy is anExtensible policy and use of this policy might have cost or utilization implications, depending on your Apigee license. For information on policy types and usage implications, seePolicy types.
Note:- You can run only integrations that have an API trigger.
- To run an integration, you must use the SetIntegrationRequest policy along with the IntegrationCallout policy or the IntegrationEndpoint.
<SetIntegrationRequest>
Specifies the SetIntegrationRequest policy.
| Default Value | N/A |
| Required? | Required |
| Type | Complex type |
| Parent Element | N/A |
| Child Elements | <ApiTrigger><DisplayName><IntegrationName><IntegrationRegion><Parameters><ProjectId><Request><ScheduleTime> |
The following table provides a high-level description of the child elements of the<SetIntegrationRequest> element:
| Child Element | Required? | Description |
|---|---|---|
<ApiTrigger> | Required | Name of the API trigger to call in the integration. |
<DisplayName> | Optional | A custom name for the policy. |
<IntegrationName> | Optional | Name of the integration to run. |
<IntegrationRegion> | Required | Name of the region where the integration exists. |
<Parameters> | Optional | Input parameters of the integration. |
<ProjectId> | Optional | Name of the Google Cloud Project which has the integration that you want to run. |
<Request> | Optional | Name of the flow variable to save the request object. |
<ScheduleTime> | Optional | The time at which the integration must be run. |
The SetIntegrationRequest policy uses the following syntax:
Syntax
<?xmlversion="1.0"encoding="UTF-8"standalone="no"?><SetIntegrationRequestcontinueOnError="[true|false]"enabled="[true|false]"name="Set-Integration-Request"><DisplayName>POLICY_DISPLAY_NAME</DisplayName><ProjectIdref="FLOW_VARIABLE_NAME">GOOGLE_CLOUD_PROJECT_ID</ProjectId><IntegrationNameref="FLOW_VARIABLE_NAME">INTEGRATION_NAME</IntegrationName><IntegrationRegionref="FLOW_VARIABLE_NAME">INTEGRATION_REGION</IntegrationRegion><ApiTriggerref="FLOW_VARIABLE_NAME">API_TRIGGER_NAME</ApiTrigger><ScheduleTime>PARAMETER_VALUE</ScheduleTime><Parameters><Parametername="PARAMETER_NAME"type="PARAMETER_DATATYPE"ref="FLOW_VARIABLE_NAME">PARAMETER_VALUE</Parameter><ParameterArrayname="ARRAY_NAME"type="ARRAY_DATATYPE"ref="FLOW_VARIABLE_NAME> <Value ref="FLOW_VARIABLE_NAME>PARAMETER_VALUE</Value><Valueref="FLOW_VARIABLE_NAME>PARAMETER_VALUE</Value> <Value ref="FLOW_VARIABLE_NAME>PARAMETER_VALUE</Value></ParameterArray></Parameters><Request>FLOW_VARIABLE_NAME</Request></SetIntegrationRequest>
Example
The following example shows the SetIntegrationRequest policy definition:
<?xmlversion="1.0"encoding="UTF-8"standalone="no"?><SetIntegrationRequestcontinueOnError="false"enabled="true"name="Set-Integration-Request"><DisplayName>SetIntegrationRequestPolicy</DisplayName><ProjectIdref="my_projectid_var">apigee_staging_1</ProjectId><IntegrationNameref="my_integration_ref">integration_1</IntegrationName><IntegrationRegionref="my_integration_ref">asia-east1</IntegrationRegion><ApiTriggerref="my_api_trigger_ref">API-Trigger-2</ApiTrigger><ScheduleTime>2022-01-15T01:30:15Z</ScheduleTime><Parameters><Parametername="my_str_param"type="string"ref="flow_var_1">someText</Parameter><ParameterArrayname="my_array_param"type="integer"ref="flow_var_2"><Valueref="flow_var_3">1</Value><Valueref="flow_var_4">2</Value><Valueref="flow_var_5">3</Value></ParameterArray></Parameters><Request>my_request_var</Request></SetIntegrationRequest>
This element has the following attributes that are common to all policies:
| Attribute | Default | Required? | Description |
|---|---|---|---|
name | N/A | Required | The internal name of the policy. The value of the Optionally, use the |
continueOnError | false | Optional | Set tofalse to return an error when a policy fails. This is expected behavior for most policies. Set totrue to have flow execution continue even after a policy fails. See also: |
enabled | true | Optional | Set totrue to enforce the policy. Set tofalse toturn off the policy. The policy will not be enforced even if it remains attached to a flow. |
async | false | Deprecated | This attribute is deprecated. |
Child element reference
This section describes the child elements of<SetIntegrationRequest>.<DisplayName>
Use in addition to thename attribute to label the policy in the management UI proxy editor with a different, more natural-sounding name.
The<DisplayName> element is common to all policies.
| Default Value | N/A |
| Required? | Optional. If you omit<DisplayName>, the value of the policy'sname attribute is used. |
| Type | String |
| Parent Element | <PolicyElement> |
| Child Elements | None |
The<DisplayName> element uses the following syntax:
Syntax
<PolicyElement><DisplayName>POLICY_DISPLAY_NAME</DisplayName> ...</PolicyElement>
Example
<PolicyElement><DisplayName>My Validation Policy</DisplayName></PolicyElement>
The<DisplayName> element has no attributes or child elements.
<ProjectId>
Specifies the name of the Google Cloud Project.
Apigee assigns the value you specify for this element to theintegration.project.id flow variable.
| Default Value | N/A |
| Required? | Optional |
| Type | String |
| Parent Element | <SetIntegrationRequest> |
| Child Elements | None |
The<ProjectId> element uses the following syntax:
Syntax
<ProjectId ref="FLOW_VARIABLE_NAME">GOOGLE_CLOUD_PROJECT_ID</ProjectId>
Example
The following example configures the policy to use themy_projectid_var flow variable to fetch the project ID, and if the flow variable fails to resolve at runtime, useapigee_staging_1 as the project ID:
<ProjectIdref="my_projectid_var">apigee_staging_1</ProjectId>
The following table describes the attributes of<ProjectId>:
| Attribute | Required? | Type | Description |
|---|---|---|---|
ref | Optional | String | Specifies the flow variable from which Apigee should read the Google Cloud Project ID. You can set the<ProjectId> element in one of the following ways:
|
<IntegrationName>
Specifies the integration to run.
Apigee assigns the value you specify for this element to theintegration.name flow variable.
The integration name must meet the following naming requirements:
- Must start and end with letters or numbers.
- Cannot have spaces.
- Cannot have two consecutive dash or underscore characters.
| Default Value | N/A |
| Required? | Optional |
| Type | String |
| Parent Element | <SetIntegrationRequest> |
| Child Elements | None |
The<IntegrationName> element uses the following syntax:
Syntax
<IntegrationName ref="FLOW_VARIABLE_NAME">INTEGRATION_NAME</IntegrationName>
Example
The following example configures the policy to use themy_integration_ref flow variable to fetch the integration name, and if the flow variable fails to resolve at runtime, useintegration_1 as the integration name:
<IntegrationName ref="my_integration_ref">integration_1</IntegrationName>
The following table describes the attributes of<IntegrationName>:
| Attribute | Required? | Type | Description |
|---|---|---|---|
ref | Optional | String | Specifies the flow variable from which Apigee should read the integration name. You can set the<IntegrationName> element in one of the following ways:
|
<IntegrationRegion>
Specifies the region where integration exists.
At runtime, Apigee assigns the element's value to theintegration.region flow variable, creates a region-based target URL and stores the URL in theintegration.target.url flow variable.
The region-based target URL has the following format:https://integration.region-integrations.googleapis.com
The integration region must be supported by Application Integration. For information about the supported regions of Application Integration, seeSupported regions.
| Default Value | N/A |
| Required? | Required |
| Type | String |
| Parent Element | <SetIntegrationRequest> |
| Child Elements | None |
The<IntegrationRegion> element uses the following syntax:
Syntax
<IntegrationRegion ref="FLOW_VARIABLE_NAME">INTEGRATION_REGION</IntegrationRegion>
Example
The following example configures the policy to use themy_integration_region_ref flow variable to fetch the integration region, and if the flow variable fails to resolve at runtime,asia-east1 is used as the region of the integration:
<IntegrationRegionref="my_integration_region_ref">asia-east1</IntegrationRegion>
The following table describes the attributes of<IntegrationRegion>:
| Attribute | Required? | Type | Description |
|---|---|---|---|
ref | Optional | String | Specifies the flow variable from which Apigee should read the integration region. You can set the<IntegrationRegion> element in one of the following ways:
|
<ApiTrigger>
Specifies the API trigger to run.
You must specify the API trigger name in theapi_trigger/API_TRIGGER_NAME format.
Apigee assigns the value you specify for this element to theintegration.api.trigger flow variable.
If you have specified the<IntegrationName>, only the API trigger of that integration is run. However, if you have not specified the<IntegrationName>, all the integrations that have the specified API trigger are run.
| Default Value | N/A |
| Required? | Required |
| Type | String |
| Parent Element | <SetIntegrationRequest> |
| Child Elements | None |
The<ApiTrigger> element uses the following syntax:
Syntax
<ApiTrigger ref="FLOW_VARIABLE_NAME">API_TRIGGER_NAME</ApiTrigger>
Example
The following example configures the policy to use themy_api_trigger_ref flow variable to fetch the API trigger name, and if the flow variable fails to resolve at runtime, useapi_trigger/API-Trigger-2 as the API trigger name:
<ApiTrigger ref="my_api_trigger_ref">api_trigger/API-Trigger-2</ApiTrigger>
The following table describes the attributes of<ApiTrigger>:
| Attribute | Required? | Type | Description |
|---|---|---|---|
ref | Optional | String | Specifies the flow variable from which Apigee should read the API trigger name. You can set the<ApiTrigger> element in one of the following ways:
|
<ScheduleTime>
Specifies the time at which the integration must run.
If the time is less or equal to the current time, the integration runs immediately. You must specify the time in theyyyy-mm-ddThh:mm:ssZ format where Z is the UTC timezone. For example, if you specify2022-01-15T01:30:15Z, the integration is scheduled to run on 1-15-2022 at 1:30:15 UTC. You can also specify the timezone using an offset from UTC. For example, if you specify2022-01-15T01:30:15-08:00, the integration is scheduled to run on 1-15-2022 at 1:30:15 PST. For more information about the time format, see Combined date and time representations.
| Default Value | N/A |
| Required? | Optional |
| Type | String |
| Parent Element | <SetIntegrationRequest> |
| Child Elements | None |
The<ScheduleTime> element uses the following syntax:
Syntax
<ScheduleTime>PARAMETER_VALUE</ScheduleTime>
Example
The following example schedules the integration to run at2022-01-15T01:30:15Z:
<ScheduleTime>2022-01-15T01:30:15Z</ScheduleTime>
<Parameters>
Specifies the input parameters required to run the integration.
You can specify individual parameter(s) or parameter array(s).
- To specify an individual parameter, use the
<Parameter>element. - To specify a parameter array, use the
<ParameterArray>element.
| Default Value | N/A |
| Required? | Optional |
| Type | Complex type |
| Parent Element | <SetIntegrationRequest> |
| Child Elements | <Parameter><ParameterArray> |
The following table describes the attributes of<Parameters>:
| Attribute | Required? | Type | Description |
|---|---|---|---|
substitutionVariableChar | Optional | Char | Lets you set custom delimiters to pass flow variable values as template arguments in the<Parameter> child element.Note:substitutionVariableChar can pass template arguments only for parameters of JSON or String datatype, and for parameter arrays of String array datatype. |
The<Parameters> element uses the following syntax:
Syntax
<ParameterssubstitutionVariableChar="SUBSTITUTION_CHAR"><Parametername="PARAMETER_NAME"type="PARAMETER_DATATYPE"ref="FLOW_VARIABLE_NAME">PARAMETER_VALUE</Parameter><Parametername="PARAMETER_NAME"type="PARAMETER_DATATYPE">SUBSTITUTION_CHARFLOW_VARIABLE_NAMESUBSTITUTION_CHAR</Parameter><ParameterArrayname="ARRAY_NAME"type="ARRAY_DATATYPE ref="FLOW_VARIABLE_NAME""><Value>PARAMETER_VALUE</Value><Valueref="FLOW_VARIABLE_NAME"/><Valueref="FLOW_VARIABLE_NAME">PARAMETER_VALUE</Value></ParameterArray></Parameters>
Example
The following example initializes themy_str_param parameter and themy_array_param parameter array:
<ParameterssubstitutionVariableChar="#"><Parametername="my_str_param"type="string"ref="flow_var_1">someText</Parameter><Parametername="strVar"type="string">#flowvar1#</Parameter><ParameterArrayname="my_array_param"type="integer"ref="flow_var_2"><Value>1</Value><Valueref="flow_var_3"/><Valueref="flow_var_4">3</Value></ParameterArray></Parameters>
Apigee treats empty<Parameter> and<ParameterArray> elements asnull values. For example, declarations like<Parameter></Parameter> and<ParameterArray></ParameterArray> are treated asnull values.
<Parameter>
Specifies an input parameter.
| Default Value | N/A |
| Required? | Optional |
| Type | String |
| Parent Element | <Parameters> |
| Child Elements | None |
You can specify the parameter value in the following ways:
- <Parameter name="my_param" type="string">val</Parameter>: Useval as the parameter value. Ifval is invalid, Apigee reports an exception.
- <Parameter name="my_param" type="string" ref="refval"/>: Resolve therefval flow variable at runtime and use its value. Apigee reports an exception if the resolvedrefval value is invalid or ifrefval is unresolved.
- <Parameter name="my_param" type="string" ref="refval">val</Parameter>: Resolve therefval flow variable at runtime and use its value. Apigee reports an exception if the resolvedrefval value is invalid. Ifrefval does not resolve, Apigee usesval as the parameter value.
- <Parameter name="my_param" type="json">{"name":"$#flowval#$"}</Parameter>: Use
$#FLOW_VARIABLE_NAME#$to pass flow variable values as a template argument in Parameter. Apigee resolves theflowval flow variable at runtime and uses its value. An exception is reported if the resolvedflowval value is invalid.Note: You can only pass template arguments for parameters of JSON or String datatype, and for parameter arrays of String array datatype.Warning: Template arguments enclosed within{and}are no longer identified as flow variables. - <Parameter name="my_param" type="json">{"name":"SUBSTITUTION_CHAR flowvalSUBSTITUTION_CHAR"}</Parameter>: WhereSUBSTITUTION_CHAR denotes the the value specified for the
substitutionVariableCharattribute of the<Parameters>parent element. Apigee resolves theflowval flow variable at runtime and uses its value. An exception is reported if the resolvedflowval value is invalid.Note:substitutionVariableChar can pass template arguments only for parameters of JSON or String datatype, and for parameter arrays of String array datatype.Important: We recommend you to add and update thesubstitutionVariableCharattribute in the<Parameters>parent element for any existing delimiters in your Set Integration Request policy.
The<Parameter> element uses the following syntax:
Syntax
<ParameterssubstitutionVariableChar="SUBSTITUTION_CHAR"><Parametername="PARAMETER_NAME"type="PARAMETER_DATATYPE">PARAMETER_VALUE</Parameter><Parametername="PARAMETER_NAME"type="PARAMETER_DATATYPE"ref="FLOW_VARIABLE_NAME"/><Parametername="PARAMETER_NAME"type="PARAMETER_DATATYPE"ref="FLOW_VARIABLE_NAME">PARAMETER_VALUE</Parameter><Parametername="PARAMETER_NAME"type="json">$#FLOW_VARIABLE_NAME#$</Parameter><Parametername="PARAMETER_NAME"type="PARAMETER_DATATYPE">SUBSTITUTION_CHARFLOW_VARIABLE_NAMESUBSTITUTION_CHAR</Parameter></Parameters>
Example 1
The following example declaresmy_str_param parameter as a string and sets the value tosomeText.
<Parameters><Parametername="my_str_param"type="string">someText</Parameter></Parameters>
Example 2
The following example declaresmy_double_param parameter as a double and assigns the value of theflow_var flow variable to the parameter.
<Parameters><Parametername="my_double_param"type="double"ref="flow_var"/></Parameters>
Example 3
The following example sets value to themy_int_param_1 integer parameter.
<Parameters><Parametername="my_int_param_1"type="integer"ref="flow_var_1">96</Parameter></Parameters>
In this example, if theflow_var_1 flow variable resolves successfully,my_int_param_1 is set to the value of the flow variable. However, ifflow_var_1 fails to resolve,my_int_param_1 is set to96.
Example 4
The following example sets values for themy_json_param_1 andmy_json_param_2 JSON parameters.
<Parameters><Parametername="my_json_param_1"type="json"ref="flow_var_1">{name:"Apple",color:"Red"}</Parameter><Parametername="my_json_param_2"type="json">{name:"Banana",color:"Yellow"}</Parameter></Parameters>
In this example, if theflow_var_1 flow variable resolves successfully,my_json_param_1 is set to the value of theflow_var_1 flow variable. However, if theflow_var_1 fails to resolve,my_json_param_1 is set to{name:"Apple", color:"Red"}. Themy_json_param_2 parameter is set to{name:"Banana", color:"Yellow"} as there is noref attribute specified.
Example 5
The following example sets the value for thetemplate_json_param JSON parameter using the flow variable value passed in the default template.
<Parameters><Parametername="template_json_param"type="json">{"name":"$#flow_var_1#$"}</Parameter></Parameters>
In this example, if theflow_var_1 flow variable resolves successfully,template_json_param is set to the value of theflow_var_1 flow variable. However, if theflow_var_1 fails to resolve, Apigee throws an exception.
Example 6
The following example sets the value for thetemplate_json_param JSON parameter using thesubstitutionVariableChar attribute.
<ParameterssubstitutionVariableChar="#"><Parametername="template_json_param"type="json">{"name":"#flow_var_1#"}</Parameter></Parameters>
In this example, if theflow_var_1 flow variable resolves successfully,template_json_param is set to the value of theflow_var_1 flow variable. However, if theflow_var_1 fails to resolve, Apigee throws an exception.
The following table describes the attributes of<Parameter>:
| Attribute | Required? | Type | Description |
|---|---|---|---|
name | Required | String | Name of the parameter. |
type | Required | String | Data type of the parameter. The supported types areinteger,string,boolean,double, andjson. |
ref | Optional | String | Specifies the flow variable from which Apigee should read the parameter value. Apigee uses the following criteria to set the parameter value:
|
<ParameterArray>
Specifies an input parameter array.
| Default Value | N/A |
| Required? | Optional |
| Type | Complex type |
| Parent Element | <Parameters> |
| Child Elements | <Value> |
The<Parameters> element can have multiple<ParameterArray> elements within it. For a parameter array you can set the value of the array elements either by specifying the actual value or by specifying a flow variable in theref attribute. If you specify a flow variable, the array elements are set to the value of the flow variable. The examples in this section describe the various ways in which you can configure the<ParameterArray> element.
The<ParameterArray> element uses the following syntax:
Syntax
<Parameters><ParameterArrayname="ARRAY_NAME"type="ARRAY_DATATYPE"ref="FLOW_VARIABLE_NAME"><Valueref="FLOW_VARIABLE_NAME"/><Valueref="FLOW_VARIABLE_NAME">PARAMETER_VALUE</Value><Value>PARAMETER_VALUE</Value></ParameterArray><ParameterArrayname="ARRAY_NAME"type="ARRAY_DATATYPE"ref="FLOW_VARIABLE_NAME"/><ParameterArrayname="ARRAY_NAME"type="ARRAY_DATATYPE"><Valueref="FLOW_VARIABLE_NAME"/><Valueref="FLOW_VARIABLE_NAME">PARAMETER_VALUE</Value><Value>PARAMETER_VALUE</Value></ParameterArray><Parameters/>
Example-1
The following example declaresmy_array_param as an integer array and sets the value of the array elements to1,2, and3:
<Parameters><ParameterArrayname="my_array_param"type="integer"><Value>1</Value><Value>2</Value><Value>3</Value></ParameterArray><Parameters/>
Example-2
The following example declaresmy_array_param as a double array where:
- First element is set to the value of the
flow_var_1flow variable. - Second element is set to
3.0.
<Parameters><ParameterArrayname="my_array_param"type="double"><Valueref="flow_var_1"/><Value>3.0</Value></ParameterArray><Parameters/>
Example-3
The following example declaresmy_array_param as a boolean array and sets it to the value of theflow_var_1 flow variable.
<Parameters><ParameterArrayname="my_array_param"type="boolean"ref="flow_var_1"><Value>true</Value><Value>false</Value><Value>false</Value></ParameterArray><Parameters/>
In this example, ifflow_var_1 resolves successfully,my_array_param is set to the values of theflow_var_1 array. However, ifflow_var_1 fails to resolve, themy_array_param array is set to the values of theValue elements.
Example-4
The following example declaresmy_array_param as a JSON array and sets it to the value of theflow_var_1 flow variable.
<Parameters><ParameterArrayname="my_array_param"type="json"ref="flow_var_1"/><Parameters/>
In this example, ifflow_var_1 resolves successfully,my_array_param is set to the values of theflow_var_1 array. However, ifflow_var_1 fails to resolve, Apigee reports an exception.
Example-5
The following example declaresmy_array_param as a string array and sets it to the values of theflow_var_1 flow variable.
<Parameters><ParameterArrayname="my_array_param"type="string"ref="flow_var_1"><Valueref="flow_var_2"/><Value>test_string</Value></ParameterArray><Parameters/>
In this example, ifflow_var_1 resolves successfully,my_array_param is set to the values of theflow_var_1 array. Only ifflow_var_1 fails to resolve,my_array_param is set to the values specified in the<Value> elements.
The following table describes the attributes of<ParameterArray>:
| Attribute | Required? | Type | Description |
|---|---|---|---|
name | Required | String | Name of the parameter array. |
type | Required | String | Data type of the parameter array. The supported types areinteger,string,boolean, anddouble. |
ref | Optional | String | Specifies the flow variable from which Apigee should read the array values. Apigee uses the following criteria to set the parameter value:
|
<Value>
Specifies the value of an array element.
| Default Value | N/A |
| Required? | Optional |
| Type | String |
| Parent Element | <ParameterArray> |
| Child Elements | None |
Each element of the array must be a separate<Value> element. You can specify the value in the following ways:
- <Value>val</Value>: Useval as the element value. Ifval is invalid, Apigee reports an exception.
- <Value ref="refval"/>: Resolve therefval flow variable at runtime and use its value. Apigee reports an exception if the resolvedrefval value is invalid or ifrefval is unresolved.
- <Value ref="refval">val</Value>: Resolve therefval flow variable at runtime and use its value. Apigee reports an exception if the resolvedrefval value is invalid. Ifrefval does not resolve, Apigee usesval as the element value.
- <Value>val1 $#flowval#$</Value>: Use
$#FLOW_VARIABLE_NAME#$to pass flow variable values as a template argument in Value. Apigee resolves theflowval flow variable at runtime and uses its value. An exception is reported if the resolvedflowval value is invalid.Note:You can only specify template arguments as Value for parameter arrays of string data type.Warning: Template arguments enclosed within{and}are no longer identified as flow variables.
The<Value> element uses the following syntax:
Syntax
<ParameterArrayname="ARRAY_NAME"type="ARRAY_DATATYPE"ref="FLOW_VARIABLE_NAME"><Value>PARAMETER_VALUE</Value><Valueref="FLOW_VARIABLE_NAME"/><Valueref="FLOW_VARIABLE_NAME">PARAMETER_VALUE</Value></ParameterArray>
Example 1
The following example declaresmy_array_param as an integer parameter array with values1,2, and3:
<ParameterArrayname="my_array_param"type="integer"><Value>1</Value><Value>2</Value><Value>3</Value></ParameterArray>
Example 2
The following example declaresmy_array_param as a string parameter array with values of theflow_var_1 andflow_var_2 flow variables:
<ParameterArrayname="my_array_param"type="string"><Valueref="flow_var_1"/><Valueref="flow_var_2"/></ParameterArray>
Example 3
The following example declaresmy_array_param as a string parameter array:
<ParameterArrayname="my_array_param"type="string"><Valueref="flow_var_1">string_1</Value><Valueref="flow_var_2">string_2</Value></ParameterArray>
In this example, if the flow variable resolves successfully, the array element value is set to the value of theflow_var_1 flow variable. However, ifflow_var_1 fails to resolve, the array element value is set tostring_1.
Example 4
The following example sets the value for thetemplate_strArray_param string array parameter using the flow variable value passed in a template.
<Parameters><ParameterArrayname="template_strArray_param"type="string"><Value>apple$#flow_var_1#$</Value></ParameterArray></Parameters>
In this example, if the flow variable resolves successfully, the array element value is set to the value of theflow_var_1 flow variable. However, ifflow_var_1 fails to resolve, Apigee throws an exception.
The following table describes the attributes of<Value>:
| Attribute | Required? | Type | Description |
|---|---|---|---|
ref | Optional | String | Specifies the flow variable from which Apigee should read the parameter value. Apigee uses the following criteria to set the parameter value:
|
<Value> element can't be empty.<Request>
Specifies the flow variable name for saving the request.
Note: If you are using an integration endpoint instead of theIntegrationCallout policy policy, do not specify the<Request> element in the SetIntegrationRequest policy.After the policy executes, it creates a newrequest message object, and saves the object in theFLOW_VARIABLE_NAME variable which you can query to read the request.
If you do not specify a flow variable name, the policy saves the request in therequest message, overriding the existing request message if any.
| Default Value | request |
| Required? | Optional |
| Type | String |
| Parent Element | <SetIntegrationRequest> |
| Child Elements | None |
The<Request> element uses the following syntax:
Syntax
<Request>FLOW_VARIABLE_NAME</Request>
Example
The following example saves the request object in themy_request_var flow variable:
<Request>my_request_var</Request>
Error codes
This section describes the fault codes, error messages, and the fault variables set by Apigee when this policy triggers an error. This information is essential if you are developing fault rules to handle faults. To learn more, seeWhat you need to know about policy errors andHandling faults.
Runtime errors
These errors can occur when the policy executes.
| Fault code | HTTP status | Cause |
|---|---|---|
steps.setintegrationrequest.EmptyParameterArray | 500 | This error occurs when the |
steps.setintegrationrequest.EmptyParameterArrayValue | 500 | This error occurs when the |
steps.setintegrationrequest.InvalidResolvedFlowVariable | 500 | This error occurs when the flow variable specified in the
|
steps.setintegrationrequest.MismatchedTypeAndResolvedRef | 500 | This error occurs when the flow variable specified inthe |
steps.setintegrationrequest.MismatchedTypeAndResolvedRefOfParameterArray | 500 | This error occurs when the flow variable specified inthe |
steps.setintegrationrequest.MismatchedTypeAndResolvedRefOfParameterArrayValue | 500 | This error occurs when the flow variable specified inthe |
steps.setintegrationrequest.RequestVariableNotMessageType | 500 | This error occurs when the flow variable specified by theRequest element is not ofmessage type. |
steps.setintegrationrequest.RequestVariableNotRequestMessageType | 500 | This error occurs when the flow variable specified by theRequest element is not ofRequest message type. |
steps.setintegrationrequest.UnresolvedVariable | 500 | This error occurs when Apigee can't resolve the flow variables specified in the |
Fault variables
Whenever there are execution errors in a policy, Apigee generates error messages. You can view these error messages in the error response. Many a time, system generated error messages might not be relevant in the context of your product. You might want to customize the error messages based on the type of error to make the messages more meaningful.
To customize the error messages, you can use either fault rules or the RaiseFault policy. For information about differences between fault rules and the RaiseFault policy, seeFaultRules vs. the RaiseFault policy. You must check for conditions using theCondition element in both the fault rules and the RaiseFault policy. Apigee provides fault variables unique to each policy and the values of the fault variables are set when a policy triggers runtime errors. By using these variables, you can check for specific error conditions and take appropriate actions. For more information about checking error conditions, seeBuilding conditions.
The following table describes the fault variables specific to this policy.
| Variables | Where | Example |
|---|---|---|
fault.name | Thefault.name can match to any of the faults listed in theRuntime errors table. The fault name is the last part of the fault code. | fault.name Matches "UnresolvedVariable" |
SetIntegrationRequest.POLICY_NAME.failed | POLICY_NAME is the user-specified name of the policy that threw the fault. | SetIntegrationRequest.set-integration-request-1.failed = true |
Related topics
If you want to learn more about Application Integration feature, seeApplication Integration overview
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-17 UTC.