Creating a REST Task

A REST task in Data Integration lets you call a REST API endpoint by using the HTTP protocol.

Create a REST task in a project or folder. Data Integration includes one default project to get you started. To create your own project or folder, see Projects and Folders.

By default, Data Integration allows simultaneous or parallel task runs of a task at a given time. To disallow concurrent task runs that are initiated manually, select the Disable simultaneous execution of the task checkbox when you create the task. When simultaneous task runs are disallowed, a run request for the task fails if there's already a task run in progress that's in a non-terminal state.

  • The configuration UI contains four sections in which you provide the REST API and authentication details for the task, provide optional parameter values in the scope of the task, and check for errors and warnings.

    The steps for each section in the following procedure can also be used when editing a REST task.

    1. Open the project or folder in which you want to create the task.

      For the steps to open the details page of a project or folder, see Viewing the Details of a Project or Viewing the Details of a Folder.

    2. On the project or folder details page, click Tasks.
    3. In the Tasks section, click Create task and select REST.
    4. On the Create REST task page, enter a name and an optional description

      The identifier is a system-generated value based on the name You can change the value, but after you create and save the task, you can't update the identifier.

    5. Select the Disable simultaneous execution of the task checkbox if you want to disallow concurrent runs of this task.
    6. (Optional) For Project or folder, click Select and select a different project or folder to save the task in.
    7. To save the task for the first time, click one of the following buttons:
      • Create: Creates and saves the task. You can continue to create and edit the task.

      • Create and close: Creates and saves the task, closes the page, and returns you to the tasks list on the project or folder details page.

    8. Save periodically while you work by clicking one of the following buttons:
      • Save: Commits changes since the last save. You can continue editing after saving.

      • Save and close: Commits changes, closes the page, and returns you to the tasks list on the project or folder details page.

      • Save as: Commits changes (since the last save) and saves to a copy instead of overwriting the current task. You can provide a name for the copy and select a different project or folder for the copy, or save the copy in the same project or folder as the existing task.

    9. In the REST API details section, click Configure.

      On the Configure REST API details page that appears, provide the REST API execution details and the completion criteria (success condition) for a successful REST call.

      1. Follow these steps to define the REST API execution details:
        1. Specify the HTTP method and REST URL.
        2. (Optional) Configure any URL parameters.
        3. Add a REST request header.
        4. (Optional) Add a task parameter for the value of the REST header.
        5. For a POST or PUT HTTP method, add the request body.
        6. (Optional) Add a task parameter for the entire request body.
        7. To show the REST URL that you have configured, click Show preview URL.
        8. Click Next.
      2. To specify the criteria for a successful completion of the REST API execution, edit the default success condition that's provided in the Conditions section.
      3. If the REST API invokes a long-running operation, in addition to the success condition, select the Configure a polling and termination condition for a no-wait REST call checkbox and specify the required details for a polling configuration (asynchronous behavior). See Providing Completion Criteria by Using Polling.
      4. Click Configure.

        You're returned to the Create REST task or REST task: <task name> page.

    10. In the Authentication section, click Configure. In the Configure authentication panel that appears, specify the authentication method for executing the REST API endpoint. By default, no authentication method is needed.
    11. (Optional) In the Parameters section, click Configure. In the REST task parameters page that appears, view and edit values for the parameters that are available in the scope of this REST task.
    12. (Optional) In the Validate task section, click Validate.

      If there are errors or warnings, click View messages. Resolve any errors before you publish the task.

    13. When you finish configuring the REST task, click Create and close or Save and close.
    Publish the REST task to an application in Data Integration before you run the task or schedule the task for running. For publishing information, see Publishing to a Data Integration Application.
  • Use the oci data-integration task create-task-from-rest-task command and required parameters to create a REST task:

    oci data-integration task create-task-from-rest-task [OPTIONS]

    For a complete list of flags and variable options for CLI commands, see the Command Line Reference.

  • Run the CreateTask operation with the appropriate resource subtype to create a REST task.