Providing Completion Criteria
Specify the condition that determines the criteria for a successful completion of the REST execution.
A success condition is required to complete any REST invocation, whether the API invokes a short-running or long-running operation.
To define the completion of the REST invocation for a long-running operation by using polling, see also Providing Completion Criteria by Using Polling.
Basic String and Operator functions are supported in success and polling conditions.
The expression for a success or polling condition can
include only the functions as shown in the following section. To extract values from
JSON structures, use the json_path
function.
Basic arithmetic |
|
Basic boolean |
|
Basic compare |
|
Basic null |
|
Basic string |
|
Basic date/time |
|
json_path function |
For JSONPath syntax elements, see:
For example, to retrieve the current status value from the following
response, use the syntax:
|
The success condition in a REST task is an expression that determines a successful completion of the REST API call. Polling stops when the success condition is met.
By default, Data Integration provides a success condition for a REST task. The default success condition is an HTTP status code of 200 or greater but less than 300, written as the following expression:
SYS.RESPONSE_STATUS >= 200 AND SYS.RESPONSE_STATUS < 300
The success condition expression references output in the JSON response that's received from the REST request defined in the execution step.
You can use the default success condition, or you can write a condition expression using system outputs or extracted JSON property values from the response.
To edit the success condition:
You can assign a task parameter to the success condition in a REST task.
The following procedure can also be used to parameterize a polling condition.
To parameterize a condition:
You can change the description and default value of the task parameter for the success condition.
The following procedure can also be used to edit the polling condition parameter.
To edit the parameterized condition:
Removing the condition parameter removes only the association of the parameter to the success condition specified for the REST task.
The following procedure can also be used to remove the polling condition parameter.
To unassign the parameter from the condition: