Azure DevOps Pipeline Runs API

Operations for triggering and monitoring pipeline runs

Operations 3

GET /pipelines/{pipelineId}/runs Azure DevOps List pipeline runs #
POST /pipelines/{pipelineId}/runs Azure DevOps Run a pipeline #
GET /pipelines/{pipelineId}/runs/{runId} Azure DevOps Get a pipeline run #

Documentation

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/microsoft-azure-devops-pipeline-runs-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

microsoft-azure-devops-pipeline-runs-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Azure DevOps Pipelines Pipeline Runs API
  description: 'REST API for managing pipelines and pipeline runs in Azure DevOps. Provides programmatic access to create, list, run, and monitor CI/CD pipelines defined as YAML files in source repositories. Supports triggering runs with custom variables, parameters, and stage selections.

    '
  version: '7.1'
  contact:
    name: Microsoft Azure DevOps
    url: https://learn.microsoft.com/en-us/rest/api/azure/devops/pipelines/
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
- url: https://dev.azure.com/{organization}/{project}/_apis
  description: Azure DevOps Pipelines API
  variables:
    organization:
      description: Azure DevOps organization name or ID
      default: myorganization
    project:
      description: Azure DevOps project name or ID
      default: myproject
security:
- bearerAuth: []
- basicAuth: []
tags:
- name: Pipeline Runs
  description: Operations for triggering and monitoring pipeline runs
paths:
  /pipelines/{pipelineId}/runs:
    get:
      operationId: runs_list
      summary: Azure DevOps List pipeline runs
      description: 'Returns a list of runs (executions) for a specific pipeline. Includes the run state, result, timing, and template parameters used. Supports pagination through the continuationToken.

        '
      tags:
      - Pipeline Runs
      parameters:
      - $ref: '#/components/parameters/ApiVersion'
      - $ref: '#/components/parameters/PipelineId'
      - name: $top
        in: query
        required: false
        description: Maximum number of runs to return
        schema:
          type: integer
      - name: continuationToken
        in: query
        required: false
        description: Continuation token for paginated results
        schema:
          type: string
      responses:
        '200':
          description: List of pipeline runs returned successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  value:
                    type: array
                    items:
                      $ref: '#/components/schemas/Run'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
    post:
      operationId: runs_run
      summary: Azure DevOps Run a pipeline
      description: 'Triggers a new run of a pipeline. You can override template parameters, variables, the repository branch, and specify which stages to skip or include. The run is queued and executed when an agent becomes available.

        '
      tags:
      - Pipeline Runs
      parameters:
      - $ref: '#/components/parameters/ApiVersion'
      - $ref: '#/components/parameters/PipelineId'
      - name: pipelineVersion
        in: query
        required: false
        description: Specific version of the pipeline to run
        schema:
          type: integer
      requestBody:
        required: false
        description: Optional run parameters to override defaults
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RunPipelineParameters'
            example:
              stagesToSkip: []
              resources:
                repositories:
                  self:
                    refName: refs/heads/main
              variables:
                MyVariable:
                  value: custom-value
                  isSecret: false
              templateParameters:
                environment: staging
      responses:
        '200':
          description: Pipeline run started successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Run'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
  /pipelines/{pipelineId}/runs/{runId}:
    get:
      operationId: runs_get
      summary: Azure DevOps Get a pipeline run
      description: 'Returns detailed information about a specific pipeline run, including its state, result, template parameters, variables used, and timing. Poll this endpoint to monitor run progress.

        '
      tags:
      - Pipeline Runs
      parameters:
      - $ref: '#/components/parameters/ApiVersion'
      - $ref: '#/components/parameters/PipelineId'
      - name: runId
        in: path
        required: true
        description: Numeric ID of the pipeline run
        schema:
          type: integer
      responses:
        '200':
          description: Pipeline run returned successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Run'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  responses:
    BadRequest:
      description: Bad request - invalid parameters or request body
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    NotFound:
      description: Not found - the requested resource does not exist
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Forbidden:
      description: Forbidden - insufficient permissions to perform this operation
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Unauthorized:
      description: Unauthorized - missing or invalid authentication credentials
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  parameters:
    PipelineId:
      name: pipelineId
      in: path
      required: true
      description: Numeric ID of the pipeline
      schema:
        type: integer
    ApiVersion:
      name: api-version
      in: query
      required: true
      description: Azure DevOps REST API version. Use 7.1 for the latest stable version.
      schema:
        type: string
        default: '7.1'
        enum:
        - '7.1'
        - '7.0'
        - '6.0'
  schemas:
    Run:
      type: object
      description: A pipeline run (execution instance)
      properties:
        id:
          type: integer
          description: Unique numeric identifier of the run
          example: 1001
        name:
          type: string
          description: Auto-generated run name (usually the build number)
          example: '20240315.1'
        state:
          type: string
          description: Current state of the run
          enum:
          - unknown
          - inProgress
          - canceling
          - completed
        result:
          type: string
          description: Final result of the run (set when state is completed)
          enum:
          - unknown
          - succeeded
          - failed
          - canceled
          nullable: true
        createdDate:
          type: string
          format: date-time
          description: Date and time the run was created
        finishedDate:
          type: string
          format: date-time
          description: Date and time the run finished
          nullable: true
        url:
          type: string
          format: uri
          description: URL to access this run via the REST API
        pipeline:
          type: object
          description: The pipeline this run belongs to
          properties:
            id:
              type: integer
            name:
              type: string
            folder:
              type: string
            revision:
              type: integer
            url:
              type: string
              format: uri
        resources:
          type: object
          description: Resources used in this run
          properties:
            repositories:
              type: object
              additionalProperties:
                type: object
                properties:
                  refName:
                    type: string
                  version:
                    type: string
            pipelines:
              type: object
              additionalProperties:
                type: object
                properties:
                  version:
                    type: string
        variables:
          type: object
          description: Variables used in this run
          additionalProperties:
            type: object
            properties:
              value:
                type: string
              isSecret:
                type: boolean
        templateParameters:
          type: object
          description: Template parameters used in this run
          additionalProperties:
            type: string
        _links:
          type: object
          description: HAL links for related resources
          properties:
            self:
              type: object
              properties:
                href:
                  type: string
                  format: uri
            web:
              type: object
              properties:
                href:
                  type: string
                  format: uri
            pipeline:
              type: object
              properties:
                href:
                  type: string
                  format: uri
            pipeline.web:
              type: object
              properties:
                href:
                  type: string
                  format: uri
    ApiError:
      type: object
      description: Error response from the Azure DevOps API
      properties:
        id:
          type: string
          format: uuid
        message:
          type: string
        typeName:
          type: string
        typeKey:
          type: string
        errorCode:
          type: integer
        eventId:
          type: integer
    RunPipelineParameters:
      type: object
      description: Parameters for running a pipeline
      properties:
        stagesToSkip:
          type: array
          description: Stages to skip in this run
          items:
            type: string
        resources:
          type: object
          description: Resource versions to use for this run
          properties:
            repositories:
              type: object
              description: Repository resource versions (keyed by repository alias)
              additionalProperties:
                type: object
                properties:
                  refName:
                    type: string
                    description: Branch or tag to check out
                    example: refs/heads/feature/my-feature
                  version:
                    type: string
                    description: Specific commit SHA to use
            pipelines:
              type: object
              description: Pipeline resource versions (keyed by pipeline alias)
              additionalProperties:
                type: object
                properties:
                  version:
                    type: string
            builds:
              type: object
              description: Build resource versions
              additionalProperties:
                type: object
        variables:
          type: object
          description: Variable overrides for this run (keyed by variable name)
          additionalProperties:
            type: object
            properties:
              value:
                type: string
                description: Variable value override
              isSecret:
                type: boolean
                description: Whether this variable value should be treated as secret
        templateParameters:
          type: object
          description: Template parameter overrides for YAML pipelines
          additionalProperties:
            type: string
          example:
            environment: production
            deployRegion: eastus
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Azure AD OAuth 2.0 bearer token
    basicAuth:
      type: http
      scheme: basic
      description: Basic authentication using a Personal Access Token (PAT). Use any string as the username and the PAT as the password, then base64-encode the result.