How to get referenced pipeline run via rest api?

Viewed 48

Using Azure Pipelines, I have a yaml pipeline with a pipeline resource specified:

https://docs.microsoft.com/en-us/azure/devops/pipelines/process/resources?view=azure-devops&tabs=schema#define-a-pipelines-resource

resources:
  pipelines:
  - pipeline: Workload
    source: Build Azure Function App

In the Run dialog you are then able to pick a run of this referenced pipeline as an input to the pipeline you are planning to run.

I would like to query previous pipeline runs through rest api in order to retrieve the particular run the pipeline has run against.

I tried the following rest api: az rest -m get -u https://dev.azure.com/myorg/myproject/_apis/pipelines/20/runs/713?api-version=6.0-preview.1 --resource 499b84ac-1321-427f-aa17-267ca6975798 -o json

But this does not seem to yield the referenced pipeline run.

Any clues?

1 Answers
Related