Activity Runs - Query By Pipeline Run

Query activity runs based on input filter conditions.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelineruns/{runId}/queryActivityruns?api-version=2018-06-01

URI Parameters

Name In Required Type Description
factoryName
path True

string

The factory name.

Regex pattern: ^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$

resourceGroupName
path True

string

The resource group name.

Regex pattern: ^[-\w\._\(\)]+$

runId
path True

string

The pipeline run identifier.

subscriptionId
path True

string

The subscription identifier.

api-version
query True

string

The 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 Data Factory service.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

ActivityRuns_QueryByPipelineRun

Sample request

POST https://management.azure.com/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/pipelineruns/2f7fdb90-5df1-4b8e-ac2f-064cfa58202b/queryActivityruns?api-version=2018-06-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 Data Factory 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 Data Factory 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