Pipeline Run - Query Activity Runs

Query activity runs based on input filter conditions.

POST {endpoint}/pipelines/{pipelineName}/pipelineruns/{runId}/queryActivityruns?api-version=2020-12-01

URI Parameters

Name In Required Type Description
endpoint
path True

string

uri

The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net.

pipelineName
path True

string

The pipeline name.

Regex pattern: ^[A-Za-z0-9_][^<>*#.%&:\\+?/]*$

runId
path True

string

The pipeline run identifier.

api-version
query True

string

The Synapse client API Version.

Request Body

Name Required Type Description
lastUpdatedAfter True

string

The time at or after which the run event was updated in 'ISO 8601' format.

lastUpdatedBefore True

string

The time at or before which the run event was updated in 'ISO 8601' format.

continuationToken

string

The continuation token for getting the next page of results. Null for first page.

filters

RunQueryFilter[]

List of filters.

orderBy

RunQueryOrderBy[]

List of OrderBy option.

Responses

Name Type Description
200 OK

ActivityRunsQueryResponse

OK.

Other Status Codes

CloudError

An error response received from the Azure Synapse service.

Examples

ActivityRuns_QueryByPipelineRun

Sample Request

POST exampleWorkspace.dev.azuresynapse.net/pipelines/examplePipeline/pipelineruns/2f7fdb90-5df1-4b8e-ac2f-064cfa58202b/queryActivityruns?api-version=2020-12-01

{
  "lastUpdatedAfter": "2018-06-16T00:36:44.3345758Z",
  "lastUpdatedBefore": "2018-06-16T00:49:48.3686473Z"
}

Sample Response

Date: Sat, 16 Jun 2018 00:40:13 GMT
X-Content-Type-Options: nosniff
x-ms-ratelimit-remaining-subscription-writes: 1187
x-ms-request-id: 5465cf41-2e71-4ce6-8db4-9de1b92ffda9
x-ms-correlation-request-id: 5465cf41-2e71-4ce6-8db4-9de1b92ffda9
{
  "value": [
    {
      "activityRunEnd": "2018-06-16T00:38:11.5445431Z",
      "activityName": "ExampleForeachActivity",
      "activityRunStart": "2018-06-16T00:37:49.4804925Z",
      "activityType": "ForEach",
      "durationInMs": 22064,
      "retryAttempt": null,
      "error": {
        "errorCode": "",
        "message": "",
        "failureType": "",
        "target": "ExampleForeachActivity"
      },
      "activityRunId": "f30c5514-fb85-43ed-9fa4-768d42e58680",
      "input": {},
      "linkedServiceName": "",
      "output": {},
      "userProperties": {},
      "pipelineName": "examplePipeline",
      "pipelineRunId": "2f7fdb90-5df1-4b8e-ac2f-064cfa58202b",
      "status": "Succeeded"
    },
    {
      "activityRunEnd": "2018-06-16T00:38:07.4188923Z",
      "activityName": "ExampleCopyActivity",
      "activityRunStart": "2018-06-16T00:37:50.2460952Z",
      "activityType": "Copy",
      "durationInMs": 17172,
      "retryAttempt": null,
      "error": {
        "errorCode": "",
        "message": "",
        "failureType": "",
        "target": "ExampleCopyActivity"
      },
      "activityRunId": "a96678c8-7167-4f00-b629-afccfbad4e51",
      "input": {
        "source": {
          "type": "BlobSource"
        },
        "sink": {
          "type": "BlobSink"
        },
        "dataIntegrationUnits": 32
      },
      "linkedServiceName": "",
      "output": {
        "dataRead": 142000,
        "dataWritten": 142000,
        "filesRead": 1,
        "filesWritten": 1,
        "copyDuration": 6,
        "throughput": 23.112,
        "errors": [],
        "effectiveIntegrationRuntime": "DefaultIntegrationRuntime (East US)",
        "usedCloudDataMovementUnits": 4,
        "usedParallelCopies": 1,
        "executionDetails": [
          {
            "source": {
              "type": "AzureBlob"
            },
            "sink": {
              "type": "AzureBlob"
            },
            "status": "Succeeded",
            "start": "2018-06-16T00:37:50.68834Z",
            "duration": 6,
            "usedCloudDataMovementUnits": 4,
            "usedParallelCopies": 1,
            "detailedDurations": {
              "queuingDuration": 4,
              "transferDuration": 2
            }
          }
        ]
      },
      "userProperties": {},
      "pipelineName": "examplePipeline",
      "pipelineRunId": "2f7fdb90-5df1-4b8e-ac2f-064cfa58202b",
      "status": "Succeeded"
    }
  ]
}

Definitions

Name Description
ActivityRun

Information about an activity run in a pipeline.

ActivityRunsQueryResponse

A list activity runs.

CloudError

The object that defines the structure of an Azure Synapse error response.

RunFilterParameters

Query parameters for listing runs.

RunQueryFilter

Query filter option for listing runs.

RunQueryFilterOperand

Parameter name to be used for filter. The allowed operands to query pipeline runs are PipelineName, RunStart, RunEnd and Status; to query activity runs are ActivityName, ActivityRunStart, ActivityRunEnd, ActivityType and Status, and to query trigger runs are TriggerName, TriggerRunTimestamp and Status.

RunQueryFilterOperator

Operator to be used for filter.

RunQueryOrder

Sorting order of the parameter.

RunQueryOrderBy

An object to provide order by options for listing runs.

RunQueryOrderByField

Parameter name to be used for order by. The allowed parameters to order by for pipeline runs are PipelineName, RunStart, RunEnd and Status; for activity runs are ActivityName, ActivityRunStart, ActivityRunEnd and Status; for trigger runs are TriggerName, TriggerRunTimestamp and Status.

ActivityRun

Information about an activity run in a pipeline.

Name Type Description
activityName

string

The name of the activity.

activityRunEnd

string

The end time of the activity run in 'ISO 8601' format.

activityRunId

string

The id of the activity run.

activityRunStart

string

The start time of the activity run in 'ISO 8601' format.

activityType

string

The type of the activity.

durationInMs

integer

The duration of the activity run.

error

object

The error if any from the activity run.

input

object

The input for the activity.

linkedServiceName

string

The name of the compute linked service.

output

object

The output for the activity.

pipelineName

string

The name of the pipeline.

pipelineRunId

string

The id of the pipeline run.

status

string

The status of the activity run.

ActivityRunsQueryResponse

A list activity runs.

Name Type Description
continuationToken

string

The continuation token for getting the next page of results, if any remaining results exist, null otherwise.

value

ActivityRun[]

List of activity runs.

CloudError

The object that defines the structure of an Azure Synapse error response.

Name Type Description
error.code

string

Error code.

error.details

CloudError[]

Array with additional error details.

error.message

string

Error message.

error.target

string

Property name/path in request associated with error.

RunFilterParameters

Query parameters for listing runs.

Name Type Description
continuationToken

string

The continuation token for getting the next page of results. Null for first page.

filters

RunQueryFilter[]

List of filters.

lastUpdatedAfter

string

The time at or after which the run event was updated in 'ISO 8601' format.

lastUpdatedBefore

string

The time at or before which the run event was updated in 'ISO 8601' format.

orderBy

RunQueryOrderBy[]

List of OrderBy option.

RunQueryFilter

Query filter option for listing runs.

Name Type Description
operand

RunQueryFilterOperand

Parameter name to be used for filter. The allowed operands to query pipeline runs are PipelineName, RunStart, RunEnd and Status; to query activity runs are ActivityName, ActivityRunStart, ActivityRunEnd, ActivityType and Status, and to query trigger runs are TriggerName, TriggerRunTimestamp and Status.

operator

RunQueryFilterOperator

Operator to be used for filter.

values

string[]

List of filter values.

RunQueryFilterOperand

Parameter name to be used for filter. The allowed operands to query pipeline runs are PipelineName, RunStart, RunEnd and Status; to query activity runs are ActivityName, ActivityRunStart, ActivityRunEnd, ActivityType and Status, and to query trigger runs are TriggerName, TriggerRunTimestamp and Status.

Name Type Description
ActivityName

string

ActivityRunEnd

string

ActivityRunStart

string

ActivityType

string

LatestOnly

string

PipelineName

string

RunEnd

string

RunGroupId

string

RunStart

string

Status

string

TriggerName

string

TriggerRunTimestamp

string

RunQueryFilterOperator

Operator to be used for filter.

Name Type Description
Equals

string

In

string

NotEquals

string

NotIn

string

RunQueryOrder

Sorting order of the parameter.

Name Type Description
ASC

string

DESC

string

RunQueryOrderBy

An object to provide order by options for listing runs.

Name Type Description
order

RunQueryOrder

Sorting order of the parameter.

orderBy

RunQueryOrderByField

Parameter name to be used for order by. The allowed parameters to order by for pipeline runs are PipelineName, RunStart, RunEnd and Status; for activity runs are ActivityName, ActivityRunStart, ActivityRunEnd and Status; for trigger runs are TriggerName, TriggerRunTimestamp and Status.

RunQueryOrderByField

Parameter name to be used for order by. The allowed parameters to order by for pipeline runs are PipelineName, RunStart, RunEnd and Status; for activity runs are ActivityName, ActivityRunStart, ActivityRunEnd and Status; for trigger runs are TriggerName, TriggerRunTimestamp and Status.

Name Type Description
ActivityName

string

ActivityRunEnd

string

ActivityRunStart

string

PipelineName

string

RunEnd

string

RunStart

string

Status

string

TriggerName

string

TriggerRunTimestamp

string