Azure DevOps Pipelines API

The Pipelines API from Azure DevOps — 3 operation(s) for pipelines.

OpenAPI Specification

azure-dev-ops-pipelines-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  description: Azure DevOps Resource Provider
  title: Azure DevOps Operations Pipelines API
  version: 2019-07-01-preview
  x-apisguru-categories:
  - cloud
  x-logo:
    url: https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png
  x-ms-code-generation-settings:
    name: DevOpsClient
  x-origin:
  - format: swagger
    url: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/devops/resource-manager/Microsoft.DevOps/preview/2019-07-01-preview/devops.json
    version: '2.0'
  x-providerName: azure.com
  x-serviceName: devops
  x-tags:
  - Azure
  - Microsoft
host: management.azure.com
schemes:
- https
consumes:
- application/json
produces:
- application/json
security:
- azure_auth:
  - user_impersonation
tags:
- name: Pipelines
paths:
  /subscriptions/{subscriptionId}/providers/Microsoft.DevOps/pipelines:
    get:
      description: Lists all Azure Pipelines under the specified subscription.
      operationId: Pipelines_ListBySubscription
      parameters:
      - $ref: '#/parameters/SubscriptionIdParameter'
      - $ref: '#/parameters/ApiVersionParameter'
      responses:
        '200':
          description: The Azure Pipelines have been fetched successfully.
          schema:
            $ref: '#/definitions/PipelineListResult'
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: '#/definitions/CloudError'
      tags:
      - Pipelines
      x-ms-examples:
        List all Azure pipelines under the specified subscription:
          parameters:
            api-version: 2019-07-01-preview
            subscriptionId: '{subscriptionId}'
          responses:
            '200':
              body:
                value:
                - id: /subscriptions/{subscriptionId}/resourceGroups/myAspNetWebAppPipeline-rg/providers/Microsoft.DevOps/pipelines/myAspNetWebAppPipeline
                  location: South India
                  name: myAspNetWebAppPipeline
                  properties:
                    bootstrapConfiguration:
                      template:
                        id: ms.vss-continuous-delivery-pipeline-templates.aspnet-windowswebapp
                        parameters:
                          appInsightLocation: South India
                          appServicePlan: S1 Standard
                          azureAuth: null
                          location: South India
                          resourceGroup: myAspNetWebAppPipeline-rg
                          subscriptionId: '{subscriptionId}'
                          webAppName: myAspNetWebApp
                    organization:
                      name: myAspNetWebAppPipeline-org
                    project:
                      name: myAspNetWebAppPipeline-project
                  type: Microsoft.DevOps/pipelines
                - id: /subscriptions/{subscriptionId}/resourceGroups/myAspNetWebAppPipeline-rg1/providers/Microsoft.DevOps/pipelines/myAspNetWebAppPipeline1
                  location: South India
                  name: myAspNetWebAppPipeline1
                  properties:
                    bootstrapConfiguration:
                      template:
                        id: ms.vss-continuous-delivery-pipeline-templates.aspnet-windowswebapp
                        parameters:
                          appInsightLocation: South India
                          appServicePlan: S1 Standard
                          azureAuth: null
                          location: South India
                          resourceGroup: myAspNetWebAppPipeline-rg
                          subscriptionId: '{subscriptionId}'
                          webAppName: myAspNetWebApp
                    organization:
                      name: myAspNetWebAppPipeline-org1
                    project:
                      name: myAspNetWebAppPipeline-project1
                  type: Microsoft.DevOps/pipelines
              description: The Azure Pipelines have been fetched successfully.
      x-ms-pageable:
        nextLinkName: nextLink
      summary: Azure DevOps Pipelines_ List by Subscription
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevOps/pipelines:
    get:
      description: Lists all Azure Pipelines under the specified resource group.
      operationId: Pipelines_ListByResourceGroup
      parameters:
      - $ref: '#/parameters/SubscriptionIdParameter'
      - $ref: '#/parameters/ResourceGroupNameParameter'
      - $ref: '#/parameters/ApiVersionParameter'
      responses:
        '200':
          description: The Azure Pipelines have been fetched successfully.
          schema:
            $ref: '#/definitions/PipelineListResult'
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: '#/definitions/CloudError'
      tags:
      - Pipelines
      x-ms-examples:
        List all Azure Pipelines under the specified resource group:
          parameters:
            api-version: 2019-07-01-preview
            resourceGroupName: myAspNetWebAppPipeline-rg
            subscriptionId: '{subscriptionId}'
          responses:
            '200':
              body:
                value:
                - id: /subscriptions/{subscriptionId}/resourceGroups/myAspNetWebAppPipeline-rg/providers/Microsoft.DevOps/pipelines/myAspNetWebAppPipeline
                  location: South India
                  name: myAspNetWebAppPipeline
                  properties:
                    bootstrapConfiguration:
                      template:
                        id: ms.vss-continuous-delivery-pipeline-templates.aspnet-windowswebapp
                        parameters:
                          appInsightLocation: South India
                          appServicePlan: S1 Standard
                          azureAuth: null
                          location: South India
                          resourceGroup: myAspNetWebAppPipeline-rg
                          subscriptionId: '{subscriptionId}'
                          webAppName: myAspNetWebApp
                    organization:
                      name: myAspNetWebAppPipeline-org
                    project:
                      name: myAspNetWebAppPipeline-project
                  type: Microsoft.DevOps/pipelines
              description: The Azure Pipelines has been fetched successfully.
      x-ms-pageable:
        nextLinkName: nextLink
      summary: Azure DevOps Pipelines_ List by Resource Group
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevOps/pipelines/{pipelineName}:
    delete:
      description: Deletes an Azure Pipeline.
      operationId: Pipelines_Delete
      parameters:
      - $ref: '#/parameters/SubscriptionIdParameter'
      - $ref: '#/parameters/ResourceGroupNameParameter'
      - $ref: '#/parameters/ApiVersionParameter'
      - description: The name of the Azure Pipeline resource.
        in: path
        name: pipelineName
        required: true
        type: string
        x-ms-parameter-location: method
        example: example-value
      responses:
        '200':
          description: The Azure Pipeline has been deleted successfully.
        '204':
          description: The Azure Pipeline is not found or has been deleted already.
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: '#/definitions/CloudError'
      tags:
      - Pipelines
      x-ms-examples:
        Get an existing Azure pipeline:
          parameters:
            api-version: 2019-07-01-preview
            pipelineName: myAspNetWebAppPipeline
            resourceGroupName: myAspNetWebAppPipeline-rg
            subscriptionId: '{subscriptionId}'
          responses:
            '200':
              description: The Azure Pipeline has been deleted successfully.
            '204':
              description: The Azure Pipeline is not found or has been deleted already.
      summary: Azure DevOps Pipelines_ Delete
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    get:
      description: Gets an existing Azure Pipeline.
      operationId: Pipelines_Get
      parameters:
      - $ref: '#/parameters/SubscriptionIdParameter'
      - $ref: '#/parameters/ResourceGroupNameParameter'
      - $ref: '#/parameters/ApiVersionParameter'
      - description: The name of the Azure Pipeline resource in ARM.
        in: path
        name: pipelineName
        required: true
        type: string
        x-ms-parameter-location: method
        example: example-value
      responses:
        '200':
          description: The Azure Pipeline has been fetched successfully.
          schema:
            $ref: '#/definitions/Pipeline'
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: '#/definitions/CloudError'
      tags:
      - Pipelines
      x-ms-examples:
        Get an existing Azure pipeline:
          parameters:
            api-version: 2019-07-01-preview
            pipelineName: myAspNetWebAppPipeline
            resourceGroupName: myAspNetWebAppPipeline-rg
            subscriptionId: '{subscriptionId}'
          responses:
            '200':
              body:
                id: /subscriptions/{subscriptionId}/resourceGroups/myAspNetWebAppPipeline-rg/providers/Microsoft.DevOps/pipelines/myAspNetWebAppPipeline
                location: South India
                name: myAspNetWebAppPipeline
                properties:
                  bootstrapConfiguration:
                    template:
                      id: ms.vss-continuous-delivery-pipeline-templates.aspnet-windowswebapp
                      parameters:
                        appInsightLocation: South India
                        appServicePlan: S1 Standard
                        azureAuth: null
                        location: South India
                        resourceGroup: myAspNetWebAppPipeline-rg
                        subscriptionId: '{subscriptionId}'
                        webAppName: myAspNetWebApp
                  organization:
                    name: myAspNetWebAppPipeline-org
                  project:
                    name: myAspNetWebAppPipeline-project
                type: Microsoft.DevOps/pipelines
              description: The Azure Pipeline has been configured successfully.
      summary: Azure DevOps Pipelines_ Get
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    patch:
      description: Updates the properties of an Azure Pipeline. Currently, only tags can be updated.
      operationId: Pipelines_Update
      parameters:
      - $ref: '#/parameters/SubscriptionIdParameter'
      - $ref: '#/parameters/ResourceGroupNameParameter'
      - $ref: '#/parameters/ApiVersionParameter'
      - description: The name of the Azure Pipeline resource.
        in: path
        name: pipelineName
        required: true
        type: string
        x-ms-parameter-location: method
        example: example-value
      - description: The request payload containing the properties to update in the Azure Pipeline.
        in: body
        name: updateOperationParameters
        required: true
        schema:
          $ref: '#/definitions/PipelineUpdateParameters'
        example: example-value
      responses:
        '200':
          description: The Azure Pipeline has been updated successfully.
          schema:
            $ref: '#/definitions/Pipeline'
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: '#/definitions/CloudError'
      tags:
      - Pipelines
      x-ms-examples:
        Get an existing Azure pipeline:
          parameters:
            api-version: 2019-07-01-preview
            pipelineName: myAspNetWebAppPipeline
            resourceGroupName: myAspNetWebAppPipeline-rg
            subscriptionId: '{subscriptionId}'
            updateOperationParameters:
              tags:
                tagKey: tagvalue
          responses:
            '200':
              body:
                id: /subscriptions/{subscriptionId}/resourceGroups/myAspNetWebAppPipeline-rg/providers/Microsoft.DevOps/pipelines/myAspNetWebAppPipeline
                location: South India
                name: myAspNetWebAppPipeline
                properties:
                  bootstrapConfiguration:
                    template:
                      id: ms.vss-continuous-delivery-pipeline-templates.aspnet-windowswebapp
                      parameters:
                        appInsightLocation: South India
                        appServicePlan: S1 Standard
                        azureAuth: null
                        location: South India
                        resourceGroup: myAspNetWebAppPipeline-rg
                        subscriptionId: '{subscriptionId}'
                        webAppName: myAspNetWebApp
                  organization:
                    name: myAspNetWebAppPipeline-org
                  project:
                    name: myAspNetWebAppPipeline-project
                tags:
                  tagKey: tagvalue
                type: Microsoft.DevOps/pipelines
              description: The Azure Pipeline has been updated successfully.
      summary: Azure DevOps Pipelines_ Update
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    put:
      description: Creates or updates an Azure Pipeline.
      operationId: Pipelines_CreateOrUpdate
      parameters:
      - $ref: '#/parameters/SubscriptionIdParameter'
      - $ref: '#/parameters/ResourceGroupNameParameter'
      - $ref: '#/parameters/ApiVersionParameter'
      - description: The name of the Azure Pipeline resource in ARM.
        in: path
        name: pipelineName
        required: true
        type: string
        x-ms-parameter-location: method
        example: example-value
      - description: The request payload to create the Azure Pipeline.
        in: body
        name: createOperationParameters
        required: true
        schema:
          $ref: '#/definitions/Pipeline'
        example: example-value
      responses:
        '200':
          description: The Azure Pipeline has been configured successfully.
          schema:
            $ref: '#/definitions/Pipeline'
        '202':
          description: The request has been accepted for processing and the Azure Pipeline will be configured asynchronously.
        default:
          description: Error response describing why the operation failed.
          schema:
            $ref: '#/definitions/CloudError'
      tags:
      - Pipelines
      x-ms-examples:
        Create an Azure pipeline to deploy a sample ASP.Net application to Azure web-app:
          parameters:
            api-version: 2019-07-01-preview
            createOperationParameters:
              location: South India
              properties:
                bootstrapConfiguration:
                  template:
                    id: ms.vss-continuous-delivery-pipeline-templates.aspnet-windowswebapp
                    parameters:
                      appInsightLocation: South India
                      appServicePlan: S1 Standard
                      azureAuth: '{"scheme":"ServicePrincipal","parameters":{"tenantid":"{subscriptionTenantId}","objectid":"{appObjectId}","serviceprincipalid":"{appId}","serviceprincipalkey":"{appSecret}"}}'
                      location: South India
                      resourceGroup: myAspNetWebAppPipeline-rg
                      subscriptionId: '{subscriptionId}'
                      webAppName: myAspNetWebApp
                organization:
                  name: myAspNetWebAppPipeline-org
                project:
                  name: myAspNetWebAppPipeline-project
              tags: {}
            pipelineName: myAspNetWebAppPipeline
            resourceGroupName: myAspNetWebAppPipeline-rg
            subscriptionId: '{subscriptionId}'
          responses:
            '200':
              body:
                id: /subscriptions/{subscriptionId}/resourceGroups/myAspNetWebAppPipeline-rg/providers/Microsoft.DevOps/pipelines/myAspNetWebAppPipeline
                location: South India
                name: myAspNetWebAppPipeline
                properties:
                  bootstrapConfiguration:
                    template:
                      id: ms.vss-continuous-delivery-pipeline-templates.aspnet-windowswebapp
                      parameters:
                        appInsightLocation: South India
                        appServicePlan: S1 Standard
                        azureAuth: null
                        location: South India
                        resourceGroup: myAspNetWebAppPipeline-rg
                        subscriptionId: '{subscriptionId}'
                        webAppName: myAspNetWebApp
                  organization:
                    name: myAspNetWebAppPipeline-org
                  project:
                    name: myAspNetWebAppPipeline-project
                type: Microsoft.DevOps/pipelines
              description: The Azure Pipeline has been configured successfully.
            '202':
              description: The request has been accepted for processing and the Azure Pipeline will be configured asynchronously.
              headers:
                location: https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myAspNetWebAppPipeline-rg/providers/Microsoft.DevOps/pipelines/myAspNetWebAppPipeline/operations/{operationId}
                retry-after: '5'
      x-ms-long-running-operation: true
      summary: Azure DevOps Pipelines_ Create or Update
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
definitions:
  ProjectReference:
    description: Reference to an Azure DevOps Project.
    properties:
      id:
        description: Unique immutable identifier of the Azure DevOps Project.
        readOnly: true
        type: string
      name:
        description: Name of the Azure DevOps Project.
        type: string
    required:
    - name
    type: object
  PipelineTemplate:
    description: Template used to bootstrap the pipeline.
    properties:
      id:
        description: Unique identifier of the pipeline template.
        type: string
      parameters:
        additionalProperties:
          type: string
        description: Dictionary of input parameters used in the pipeline template.
        type: object
    required:
    - id
    type: object
  PipelineUpdateParameters:
    description: Request payload used to update an existing Azure Pipeline.
    properties:
      tags:
        additionalProperties:
          type: string
        description: Dictionary of key-value pairs to be set as tags on the Azure Pipeline. This will overwrite any existing tags.
        type: object
    type: object
  Resource:
    description: An Azure Resource Manager (ARM) resource.
    properties:
      id:
        description: Resource Id
        readOnly: true
        type: string
      location:
        description: Resource Location
        type: string
      name:
        description: Resource Name
        readOnly: true
        type: string
      tags:
        additionalProperties:
          type: string
        description: Resource Tags
        type: object
      type:
        description: Resource Type
        readOnly: true
        type: string
    type: object
    x-ms-azure-resource: true
  Pipeline:
    allOf:
    - $ref: '#/definitions/Resource'
    description: Azure DevOps Pipeline used to configure Continuous Integration (CI) & Continuous Delivery (CD) for Azure resources.
    properties:
      properties:
        $ref: '#/definitions/PipelineProperties'
        description: Custom properties of the Pipeline.
        x-ms-client-flatten: true
    required:
    - properties
    type: object
  OrganizationReference:
    description: Reference to an Azure DevOps Organization.
    properties:
      id:
        description: Unique immutable identifier for the Azure DevOps Organization.
        readOnly: true
        type: string
      name:
        description: Name of the Azure DevOps Organization.
        type: string
    required:
    - name
    type: object
  PipelineListResult:
    description: Result of a request to list all Azure Pipelines under a given scope.
    properties:
      nextLink:
        description: URL to get the next set of Pipelines, if there are any.
        type: string
      value:
        description: List of pipelines.
        items:
          $ref: '#/definitions/Pipeline'
        type: array
  CloudError:
    description: An error response from the Pipelines Resource Provider.
    properties:
      error:
        $ref: '#/definitions/CloudErrorBody'
        description: Details of the error from the Pipelines Resource Provider.
    x-ms-external: true
  BootstrapConfiguration:
    description: Configuration used to bootstrap a Pipeline.
    properties:
      repository:
        $ref: '#/definitions/CodeRepository'
        description: Repository containing the source code for the pipeline.
      template:
        $ref: '#/definitions/PipelineTemplate'
        description: Template used to bootstrap the pipeline.
    required:
    - template
    type: object
  CloudErrorBody:
    description: An error response from the Pipelines Resource Provider.
    properties:
      code:
        description: An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
        type: string
      details:
        description: A list of additional details about the error.
        items:
          $ref: '#/definitions/CloudErrorBody'
        type: array
      message:
        description: A message describing the error, intended to be suitable for display in a user interface.
        type: string
      target:
        description: The target of the particular error. For example, the name of the property in error or the method where the error occurred.
        type: string
    x-ms-external: true
  PipelineProperties:
    description: Custom properties of a Pipeline.
    properties:
      bootstrapConfiguration:
        $ref: '#/definitions/BootstrapConfiguration'
        description: Configuration used to bootstrap the Pipeline.
      organization:
        $ref: '#/definitions/OrganizationReference'
        description: Reference to the Azure DevOps Organization containing the Pipeline.
      pipelineId:
        description: Unique identifier of the Azure Pipeline within the Azure DevOps Project.
        readOnly: true
        type: integer
      project:
        $ref: '#/definitions/ProjectReference'
        description: Reference to the Azure DevOps Project containing the Pipeline.
    required:
    - organization
    - project
    - bootstrapConfiguration
    type: object
  CodeRepository:
    description: Repository containing the source code for a pipeline.
    properties:
      authorization:
        $ref: '#/definitions/Authorization'
        description: Authorization info to access the code repository.
      defaultBranch:
        description: Default branch used to configure Continuous Integration (CI) in the pipeline.
        type: string
      id:
        description: Unique immutable identifier of the code repository.
        type: string
      properties:
        additionalProperties:
          type: string
        description: Repository-specific properties.
        type: object
        x-ms-client-flatten: true
      repositoryType:
        description: Type of code repository.
        enum:
        - gitHub
        - vstsGit
        type: string
        x-ms-enum:
          modelAsString: true
          name: CodeRepositoryType
    required:
    - repositoryType
    - id
    - defaultBranch
    type: object
  Authorization:
    description: Authorization info used to access a resource (like code repository).
    properties:
      authorizationType:
        description: Type of authorization.
        enum:
        - personalAccessToken
        type: string
        x-ms-enum:
          modelAsString: true
          name: AuthorizationType
      parameters:
        additionalProperties:
          type: string
        description: Authorization parameters corresponding to the authorization type.
        type: object
    required:
    - authorizationType
    type: object
parameters:
  ApiVersionParameter:
    description: API version to be used with the HTTP request.
    in: query
    name: api-version
    required: true
    type: string
  SubscriptionIdParameter:
    description: Unique identifier of the Azure subscription. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
    in: path
    name: subscriptionId
    required: true
    type: string
  ResourceGroupNameParameter:
    description: Name of the resource group within the Azure subscription.
    in: path
    name: resourceGroupName
    required: true
    type: string
    x-ms-parameter-location: method
securityDefinitions:
  azure_auth:
    authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
    description: Azure Active Directory OAuth2 Flow
    flow: implicit
    scopes:
      user_impersonation: impersonate your user account
    type: oauth2