openapi: 3.1.0 info: title: Azure Repos Git Commits Pull Request Reviewers API description: REST API for managing Git repositories, branches, commits, pull requests, pushes, and items in Azure Repos. Provides full programmatic control over Git-based source code hosted in Azure DevOps, including creating and reviewing pull requests, managing branches and tags, browsing repository content, and pushing commits. version: '7.1' contact: name: Microsoft Azure DevOps url: https://learn.microsoft.com/en-us/rest/api/azure/devops/git/ license: name: MIT url: https://opensource.org/licenses/MIT termsOfService: https://azure.microsoft.com/en-us/support/legal/ servers: - url: https://dev.azure.com/{organization}/{project}/_apis description: Azure DevOps Services variables: organization: description: The name of the Azure DevOps organization default: myorganization project: description: Project ID or project name default: myproject security: - oauth2: [] - basicAuth: [] tags: - name: Pull Request Reviewers description: Operations for managing reviewers on pull requests, including adding, removing, and updating reviewer votes. paths: /git/repositories/{repositoryId}/pullrequests/{pullRequestId}/reviewers: get: operationId: pullRequestReviewers_list summary: Azure Repos List pull request reviewers description: Retrieve all reviewers for a specific pull request, including their vote status and whether they are required reviewers. tags: - Pull Request Reviewers parameters: - $ref: '#/components/parameters/repositoryId' - $ref: '#/components/parameters/pullRequestId' responses: '200': description: Successfully retrieved reviewers content: application/json: schema: type: array items: $ref: '#/components/schemas/IdentityRefWithVote' '401': description: Unauthorized '404': description: Pull request or repository not found /git/repositories/{repositoryId}/pullrequests/{pullRequestId}/reviewers/{reviewerId}: put: operationId: pullRequestReviewers_createOrUpdate summary: Azure Repos Add or update a reviewer description: Add a reviewer to a pull request or update an existing reviewer's vote. Vote values are 10 (approved), 5 (approved with suggestions), 0 (no vote), -5 (waiting for author), and -10 (rejected). tags: - Pull Request Reviewers parameters: - $ref: '#/components/parameters/repositoryId' - $ref: '#/components/parameters/pullRequestId' - name: reviewerId in: path required: true description: ID of the reviewer identity schema: type: string format: uuid requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/IdentityRefWithVote' responses: '200': description: Reviewer added or updated successfully content: application/json: schema: $ref: '#/components/schemas/IdentityRefWithVote' '401': description: Unauthorized '404': description: Pull request or repository not found delete: operationId: pullRequestReviewers_delete summary: Azure Repos Remove a reviewer description: Remove a reviewer from a pull request. Required reviewers added by branch policy cannot be removed. tags: - Pull Request Reviewers parameters: - $ref: '#/components/parameters/repositoryId' - $ref: '#/components/parameters/pullRequestId' - name: reviewerId in: path required: true description: ID of the reviewer identity to remove schema: type: string format: uuid responses: '200': description: Reviewer removed successfully '401': description: Unauthorized '404': description: Pull request or repository not found components: schemas: IdentityRefWithVote: type: object description: Identity information including a vote on a pull request. Vote values are 10 (approved), 5 (approved with suggestions), 0 (no vote), -5 (waiting for author), -10 (rejected). allOf: - $ref: '#/components/schemas/IdentityRef' - type: object properties: vote: type: integer format: int16 description: 'Vote value: 10=approved, 5=approved with suggestions, 0=no vote, -5=waiting for author, -10=rejected' reviewerUrl: type: string format: uri description: URL to retrieve reviewer information hasDeclined: type: boolean description: Whether the reviewer has declined to review isFlagged: type: boolean description: Whether the reviewer is flagged for attention isRequired: type: boolean description: Whether this is a required reviewer votedFor: type: array items: $ref: '#/components/schemas/IdentityRefWithVote' description: Groups or teams this reviewer contributed to IdentityRef: type: object description: Reference to an Azure DevOps identity (user or group) properties: id: type: string format: uuid description: Unique identity ID displayName: type: string description: Display name of the identity uniqueName: type: string description: Unique name (typically email) url: type: string format: uri description: REST API URL for this identity imageUrl: type: string format: uri description: URL to the identity's avatar image descriptor: type: string description: Graph descriptor for the identity isContainer: type: boolean description: Whether this identity is a group parameters: pullRequestId: name: pullRequestId in: path required: true description: ID of the pull request schema: type: integer format: int32 repositoryId: name: repositoryId in: path required: true description: The ID or name of the repository schema: type: string securitySchemes: oauth2: type: oauth2 description: OAuth 2.0 authorization code flow for Azure DevOps Services. Requires the vso.code scope for read operations and vso.code_write for write operations. flows: authorizationCode: authorizationUrl: https://app.vssps.visualstudio.com/oauth2/authorize tokenUrl: https://app.vssps.visualstudio.com/oauth2/token scopes: vso.code: Read source code and metadata about commits, changesets, branches, and other version control artifacts vso.code_write: Read, create, and manage pull requests and code vso.code_manage: Read, create, manage, and delete repositories and branches basicAuth: type: http scheme: basic description: HTTP Basic authentication using a Personal Access Token (PAT). Use any string for the username and the PAT as the password. externalDocs: description: Azure DevOps Git REST API Reference url: https://learn.microsoft.com/en-us/rest/api/azure/devops/git/?view=azure-devops-rest-7.1