Pipeline Runs - Query By Factory

Query pipeline runs in the factory based on input filter conditions.

HTTP
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/queryPipelineRuns?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\._\(\)]+$

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

PipelineRunsQueryResponse

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

PipelineRuns_QueryByFactory

Sample request

HTTP
POST https://management.azure.com/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/queryPipelineRuns?api-version=2018-06-01

{
  "lastUpdatedAfter": "2018-06-16T00:36:44.3345758Z",
  "lastUpdatedBefore": "2018-06-16T00:49:48.3686473Z",
  "filters": [
    {
      "operand": "PipelineName",
      "operator": "Equals",
      "values": [
        "examplePipeline"
      ]
    }
  ]
}

Sample response

HTTP
Date: Sat, 16 Jun 2018 00:40:01 GMT
X-Content-Type-Options: nosniff
x-ms-ratelimit-remaining-subscription-reads: 14989
x-ms-request-id: 2f955e10-c6df-45a7-97d4-81acdb8540cd
x-ms-correlation-request-id: 2f955e10-c6df-45a7-97d4-81acdb8540cd
JSON
{
  "value": [
    {
      "runId": "2f7fdb90-5df1-4b8e-ac2f-064cfa58202b",
      "pipelineName": "examplePipeline",
      "parameters": {
        "OutputBlobNameList": "[\"exampleoutput.csv\"]"
      },
      "invokedBy": {
        "id": "80a01654a9d34ad18b3fcac5d5d76b67",
        "name": "Manual"
      },
      "runStart": "2018-06-16T00:37:44.6257014Z",
      "runEnd": "2018-06-16T00:38:12.7314495Z",
      "durationInMs": 28105,
      "status": "Succeeded",
      "message": "",
      "lastUpdated": "2018-06-16T00:38:12.7314495Z",
      "annotations": [],
      "runDimension": {
        "JobId": "79c1cc52-265f-41a5-9553-be65e736fbd3"
      }
    },
    {
      "runId": "16ac5348-ff82-4f95-a80d-638c1d47b721",
      "pipelineName": "examplePipeline",
      "parameters": {
        "OutputBlobNameList": "[\"exampleoutput.csv\"]"
      },
      "invokedBy": {
        "id": "7c5fd7ef7e8a464b98b931cf15fcac66",
        "name": "Manual"
      },
      "runStart": "2018-06-16T00:39:49.2745128Z",
      "runEnd": null,
      "durationInMs": null,
      "status": "Cancelled",
      "message": "",
      "lastUpdated": "2018-06-16T00:39:51.216097Z",
      "annotations": [],
      "runDimension": {
        "JobId": "84a3c493-0628-4b44-852f-ef5b3a11bdab"
      }
    }
  ]
}

Definitions

Name Description
CloudError

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

PipelineRun

Information about a pipeline run.

PipelineRunInvokedBy

Provides entity name and id that started the pipeline run.

PipelineRunsQueryResponse

A list pipeline runs.

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.

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.

PipelineRun

Information about a pipeline run.

Name Type Description
durationInMs

integer

The duration of a pipeline run.

invokedBy

PipelineRunInvokedBy

Entity that started the pipeline run.

isLatest

boolean

Indicates if the recovered pipeline run is the latest in its group.

lastUpdated

string

The last updated timestamp for the pipeline run event in ISO8601 format.

message

string

The message from a pipeline run.

parameters

object

The full or partial list of parameter name, value pair used in the pipeline run.

pipelineName

string

The pipeline name.

runDimensions

object

Run dimensions emitted by Pipeline run.

runEnd

string

The end time of a pipeline run in ISO8601 format.

runGroupId

string

Identifier that correlates all the recovery runs of a pipeline run.

runId

string

Identifier of a run.

runStart

string

The start time of a pipeline run in ISO8601 format.

status

string

The status of a pipeline run. Possible values: Queued, InProgress, Succeeded, Failed, Canceling, Cancelled

PipelineRunInvokedBy

Provides entity name and id that started the pipeline run.

Name Type Description
id

string

The ID of the entity that started the run.

invokedByType

string

The type of the entity that started the run.

name

string

Name of the entity that started the pipeline run.

pipelineName

string

The name of the pipeline that triggered the run, if any.

pipelineRunId

string

The run id of the pipeline that triggered the run, if any.

PipelineRunsQueryResponse

A list pipeline runs.

Name Type Description
continuationToken

string

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

value

PipelineRun[]

List of pipeline runs.

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.

Value Description
ActivityName
ActivityRunEnd
ActivityRunStart
ActivityType
LatestOnly
PipelineName
RunEnd
RunGroupId
RunStart
Status
TriggerName
TriggerRunTimestamp

RunQueryFilterOperator

Operator to be used for filter.

Value Description
Equals
In
NotEquals
NotIn

RunQueryOrder

Sorting order of the parameter.

Value Description
ASC
DESC

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.

Value Description
ActivityName
ActivityRunEnd
ActivityRunStart
PipelineName
RunEnd
RunStart
Status
TriggerName
TriggerRunTimestamp