パイプライン管理API

Version 26.1.9516


パイプライン管理API


The CData Sync REST API V2 supports the following pipeline management actions:

The following sections describe each of these actions.

List All Pipelines in a Specified Workspace

The following command returns a list of all pipelines within a workspace in CData Sync:

GET http://<SyncHost>/api.rsc/v2/workspaces/{workspace_id}/pipelines

Path Parameter

Name Description
workspace_id (required) Identifies the workspace from which to retrieve the list of pipelines.

Retrieve Details for a Specified Pipeline

The following command retrieves details for a specified pipeline:

GET http://<SyncHost>/api.rsc/v2/pipelines/{pipeline_id}

Path Parameter

Name Description
pipeline_id (required) Identifies the pipeline for which you want to retrieve details.

Create a Pipeline in a Specified Workspace

The following command creates a pipeline in a specified workspace:

POST http://<SyncHost>/api.rsc/v2/workspaces/{workspace_id}/pipelines

Path Parameter

Name Description
workspace_id (required) Identifies the workspace in which you want to create a pipeline.

Update a Pipeline

The following command updates an existing pipeline:

PUT http://<SyncHost>/api.rsc/v2/pipelines/{pipeline_id}

Path Parameter

Name Description
pipeline_id (required) Identifies the pipeline that you want to update.

Example Request

{
  "name": "pipeline name",
  "schedule": {
    "enabled": true,
    "cron": "0 0 0 * * *"
  },
  "labels": []
}

Delete a Pipeline

The following command removes an existing pipeline:

DELETE http://<SyncHost>/api.rsc/v2/pipelines/{pipeline_id}

Note: You cannot delete a pipeline that is running.

Path Parameter

Name Description
pipeline_id (required) Identifies the pipeline that you want to delete.

Query Parameter

Name Description
pipeline_only Specifies what to delete. If this parameter is set to true, Sync deletes only tpipeline, pipeline steps, and the entity relationship. When this value is set to false, Sync deletes the pipeline and pipeline steps as well as the entity resources.

Execute a Pipeline

The following command executes a pipeline:

POST http://<SyncHost>/api.rsc/v2/pipelines/{pipeline_id}

Path Parameter

Name Description
pipeline_id (required) Identifies the pipeline that you want to execute.

Cancel a Running Pipeline

The following command cancels a running pipeline:

POST http://<SyncHost>/api.rsc/v2/pipelines/{pipeline_id}/cancel

Path Parameter

Name Description
pipeline_id (required) Identifies the pipeline that you want to cancel.

List All Pipeline History

The following command retrieves all histories for a pipeline:

GET http://<SyncHost>/api.rsc/v2/pipelines/{pipeline_id}/history

Path Parameter

Name Description
pipeline_id (required) Identifies the pipeline for which you want to retrieve all histories.

Retrieve a Specified Pipeline History

The following command retrieves a specified history in a pipeline:

GET http://<SyncHost>/api.rsc/v2/pipelines/{pipeline_id}/history/{history_id}

Path Parameters

Name Description
pipeline_id (required) Identifies the pipeline for which you want to retrieve a specified history.
history_Id Identifies the specific history instance to retrieve.

Retrieve the Pipeline Status

The following command retrieves the current status of a pipeline:

GET http://<SyncHost>/api.rsc/v2/pipelines/{pipeline_id}/status

Path Parameter

Name Description
pipeline_id (required) Identifies the pipeline for which you want to retrieve the status.

List All Pipeline Steps

The following command lists all steps in a pipeline:

GET http://<SyncHost>/api.rsc/v2/pipelines/{pipeline_id}/steps

Path Parameter

Name Description
pipeline_id (required) Identifies the pipeline for which you want to list all steps.

Create a Pipeline Step

The following command creates a step in a pipeline:

POST http://<SyncHost>/api.rsc/v2/pipelines/{pipeline_id}/steps

Path Parameter

Name Description
pipeline_id (required) Identifies the pipeline in which you want to create the step.

Update a Pipeline Step

The following command updates a step in a pipeline:

PUT http://<SyncHost>/api.rsc/v2/pipelines/{pipeline_id}/steps/{step_id}

Path Parameter

Name Description
pipeline_id (required) Identifies the pipeline in which you want to create the step.
step_id Identifies the step that you want to update.

Delete a Pipeline Step

The following command deletes a step in a pipeline:

DELETE http://<SyncHost>/api.rsc/v2/pipelines/{pipeline_id}/steps/{step_id}

Path Parameter

Name Description
pipeline_id (required) Identifies the pipeline that contains the step that you want to delete.
step_id Identifies the step that you want to delete.

Query Parameter

Name Description
step_only Specifies what to delete. If this parameter is set to true, Sync deletes only the steps and the entity relationship. When this value is set to false, Sync deletes the steps as well as the entity resources. This parameter is used when the step type is Job pr Transformation. Event steps are always deleted.

Move a Pipeline Step

The following command moves the position of a step in a pipeline:

POST /pipelines/{pipeline_id}/move-step

Path Parameter

Name Description
pipeline_id (required) Identifies the pipeline that contains the step that you want to delete.

Example Request

{
  "steps": [
    {
      "id": "",
      "index": 1,
      "previous_step_id": [],
      "next_step_id": []
    }, 
    {
      ...
    }
  ]
}