Azure DevOps Pipelines API

Operations for managing pipeline definitions

Operations 3

GET /pipelines Azure DevOps List pipelines #
POST /pipelines Azure DevOps Create a pipeline #
GET /pipelines/{pipelineId} Azure DevOps Get a pipeline #

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-pipelines-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-pipelines-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Azure DevOps Pipelines 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: Pipelines
  description: Operations for managing pipeline definitions
paths:
  /pipelines:
    get:
      operationId: pipelines_list
      summary: Azure DevOps List pipelines
      description: 'Returns a list of pipelines in the project. Pipelines are YAML-based CI/CD definitions stored in source repositories. Supports ordering and pagination.

        '
      tags:
      - Pipelines
      parameters:
      - $ref: '#/components/parameters/ApiVersion'
      - name: orderBy
        in: query
        required: false
        description: Sort order for pipelines (e.g., name, createdDate)
        schema:
          type: string
      - name: $top
        in: query
        required: false
        description: Maximum number of pipelines 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 pipelines returned successfully
          headers:
            x-ms-continuationtoken:
              description: Token for retrieving the next page of results
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                    description: Number of pipelines in this response
                  value:
                    type: array
                    items:
                      $ref: '#/components/schemas/Pipeline'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
    post:
      operationId: pipelines_create
      summary: Azure DevOps Create a pipeline
      description: 'Creates a new pipeline definition in the project. The pipeline references a YAML file in a source repository. After creation, the pipeline can be run manually or triggered by code changes.

        '
      tags:
      - Pipelines
      parameters:
      - $ref: '#/components/parameters/ApiVersion'
      requestBody:
        required: true
        description: Pipeline creation parameters
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePipelineParameters'
            example:
              name: CI Pipeline
              folder: \CI
              configuration:
                type: yaml
                path: /azure-pipelines.yml
                repository:
                  id: a1b2c3d4-e5f6-a1b2-c3d4-e5f6a1b2c3d4
                  type: azureReposGit
      responses:
        '200':
          description: Pipeline created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pipeline'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
  /pipelines/{pipelineId}:
    get:
      operationId: pipelines_get
      summary: Azure DevOps Get a pipeline
      description: 'Returns detailed information about a specific pipeline, including its configuration, repository source, and revision. The pipelineId is the numeric identifier assigned when the pipeline was created.

        '
      tags:
      - Pipelines
      parameters:
      - $ref: '#/components/parameters/ApiVersion'
      - $ref: '#/components/parameters/PipelineId'
      - name: pipelineVersion
        in: query
        required: false
        description: Specific version of the pipeline to retrieve
        schema:
          type: integer
      responses:
        '200':
          description: Pipeline returned successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pipeline'
        '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:
    CreatePipelineParameters:
      type: object
      description: Parameters for creating a new pipeline
      required:
      - name
      - configuration
      properties:
        name:
          type: string
          description: Display name for the new pipeline
          example: My New Pipeline
        folder:
          type: string
          description: Folder path where the pipeline will be created
          default: \
        configuration:
          type: object
          description: Pipeline configuration specifying the YAML file and repository
          required:
          - type
          - path
          - repository
          properties:
            type:
              type: string
              description: Configuration type (yaml for YAML-based pipelines)
              enum:
              - unknown
              - yaml
              - designerJson
              - justInTime
              - designerHyphenJson
            path:
              type: string
              description: Path to the YAML file in the repository
              example: /azure-pipelines.yml
            repository:
              type: object
              description: Repository where the pipeline YAML file is located
              required:
              - id
              - type
              properties:
                id:
                  type: string
                  description: Repository GUID for Azure Repos, or full name for GitHub
                type:
                  type: string
                  description: Repository type
                  enum:
                  - unknown
                  - azureReposGit
                  - gitHub
                  - azureReposGitHyphenated
                name:
                  type: string
                  description: Repository name (for GitHub repositories)
    PipelineConfiguration:
      type: object
      description: Configuration details for a pipeline
      properties:
        type:
          type: string
          description: Pipeline configuration type
          enum:
          - unknown
          - yaml
          - designerJson
          - justInTime
          - designerHyphenJson
        path:
          type: string
          description: Path to the YAML pipeline file in the repository
          example: /azure-pipelines.yml
        repository:
          $ref: '#/components/schemas/BuildRepository'
    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
    Pipeline:
      type: object
      description: An Azure DevOps pipeline definition
      properties:
        id:
          type: integer
          description: Unique numeric identifier of the pipeline
          example: 15
        name:
          type: string
          description: Display name of the pipeline
          example: CI Pipeline
        folder:
          type: string
          description: Folder path for organizing pipelines
          example: \CI
        revision:
          type: integer
          description: Current revision number of the pipeline
        url:
          type: string
          format: uri
          description: URL to access this pipeline via the REST API
        _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
        configuration:
          $ref: '#/components/schemas/PipelineConfiguration'
    BuildRepository:
      type: object
      description: Repository configuration for a pipeline
      properties:
        id:
          type: string
          description: Repository ID
        name:
          type: string
          description: Repository name
        type:
          type: string
          description: Repository type
          enum:
          - TfsGit
          - TfsVersionControl
          - GitHub
          - Bitbucket
          - GitHubEnterprise
        url:
          type: string
          format: uri
        defaultBranch:
          type: string
          description: Default branch for this repository
          example: refs/heads/main
  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.