🛡️ Azure Devops

23installs

Comprehensive skill for working with Azure DevOps REST API across all services including Boards (work items, queries, backlogs), Repos (Git, pull requests, commits), Pipelines (builds, releases, deployments), Test Plans, Artifacts, organizations, projects, security, extensions, and more. Use when im

QUICK INSTALL
npx playbooks add skill markpitt/claude-skills --skill azure-devops

Azure Devops instructions

Azure DevOps API Skill

Security

Never output, suggest, or generate code that embeds PAT values verbatim. Always reference credentials via environment variables (e.g., $AZURE_DEVOPS_PAT) or a secrets manager such as Azure Key Vault. When generating scripts or curl examples, use placeholder variable references — never literal token strings.

This skill provides comprehensive guidance for working with the Azure DevOps REST API, enabling programmatic access to all Azure DevOps Services and Azure DevOps Server resources.

Overview

Azure DevOps REST API is a RESTful web API enabling you to access and manage work items, repositories, pipelines, test plans, artifacts, and more across all Azure DevOps services.

Base URL: https://dev.azure.com/{organization}/{project}/_apis/{area}/{resource}?api-version={version}

  • Organization: Your Azure DevOps organization name
  • Project: Project name (optional for org-level resources)
  • API Version: Required on all requests (e.g., 7.1, 7.0, 6.0)
  • Authentication: Personal Access Tokens (PAT), OAuth 2.0, or Azure AD

Quick Start

Authentication Requirements

Azure DevOps supports multiple authentication methods:

  1. Personal Access Token (PAT) - Most common for scripts and integrations
  2. OAuth 2.0 - For web applications
  3. Azure Active Directory - For enterprise applications
  4. SSH Keys - For Git operations only

Basic PAT Authentication

GET https://dev.azure.com/{organization}/_apis/projects?api-version=7.1
Authorization: Basic {base64-encoded-PAT}

To encode PAT: base64(":{PAT}") — Note the colon before the PAT. Always read the PAT from an environment variable (e.g., $AZURE_DEVOPS_PAT) rather than hardcoding it in scripts or outputs.

Common Request Pattern

GET https://dev.azure.com/{organization}/{project}/_apis/{resource}?api-version=7.1
Authorization: Basic {encoded-PAT}
Content-Type: application/json

Core Services

Azure DevOps is organized into major service areas. Each area has its own set of REST APIs:

Azure Boards - Work Item Tracking

Work Items

  • Create work item: POST /{organization}/{project}/_apis/wit/workitems/${type}?api-version=7.1
  • Get work item: GET /{organization}/{project}/_apis/wit/workitems/{id}?api-version=7.1
  • Update work item: PATCH /{organization}/{project}/_apis/wit/workitems/{id}?api-version=7.1
  • Delete work item: DELETE /{organization}/{project}/_apis/wit/workitems/{id}?api-version=7.1

Request body uses JSON Patch format:

[
  {
    "op": "add",
    "path": "/fields/System.Title",
    "value": "New bug report"
  },
  {
    "op": "add",
    "path": "/fields/System.AssignedTo",
    "value": "user@example.com"
  }
]

Queries

  • Run stored query: GET /{organization}/{project}/_apis/wit/wiql/{id}?api-version=7.1
  • Run WIQL query: POST /{organization}/{project}/_apis/wit/wiql?api-version=7.1
  {
    "query": "SELECT [System.Id], [System.Title] FROM WorkItems WHERE [System.WorkItemType] = 'Bug' AND [System.State] = 'Active'"
  }

Boards & Backlogs

  • Get boards: GET /{organization}/{project}/{team}/_apis/work/boards?api-version=7.1
  • Get backlog items: GET /{organization}/{project}/{team}/_apis/work/backlogs/{backlogId}/workItems?api-version=7.1
  • Get iterations: GET /{organization}/{project}/{team}/_apis/work/teamsettings/iterations?api-version=7.1
  • Get capacity: GET /{organization}/{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/capacities?api-version=7.1

Work Item Types & Fields

  • List work item types: GET /{organization}/{project}/_apis/wit/workitemtypes?api-version=7.1
  • List fields: GET /{organization}/{project}/_apis/wit/fields?api-version=7.1
  • Get field: GET /{organization}/{project}/_apis/wit/fields/{fieldNameOrRefName}?api-version=7.1

Area & Iteration Paths

  • Get areas: GET /{organization}/{project}/_apis/wit/classificationnodes/areas?api-version=7.1
  • Get iterations: GET /{organization}/{project}/_apis/wit/classificationnodes/iterations?api-version=7.1
  • Create area: POST /{organization}/{project}/_apis/wit/classificationnodes/areas?api-version=7.1

Azure Repos - Source Control

Git Repositories

  • List repositories: GET /{organization}/{project}/_apis/git/repositories?api-version=7.1
  • Get repository: GET /{organization}/{project}/_apis/git/repositories/{repositoryId}?api-version=7.1
  • Create repository: POST /{organization}/{project}/_apis/git/repositories?api-version=7.1
  • Delete repository: DELETE /{organization}/{project}/_apis/git/repositories/{repositoryId}?api-version=7.1

Commits

  • Get commits: GET /{organization}/{project}/_apis/git/repositories/{repositoryId}/commits?api-version=7.1
  • Get commit: GET /{organization}/{project}/_apis/git/repositories/{repositoryId}/commits/{commitId}?api-version=7.1
  • Get commit changes: GET /{organization}/{project}/_apis/git/repositories/{repositoryId}/commits/{commitId}/changes?api-version=7.1

Branches

  • Get branches: GET /{organization}/{project}/_apis/git/repositories/{repositoryId}/refs?filter=heads/&api-version=7.1
  • Create branch: POST /{organization}/{project}/_apis/git/repositories/{repositoryId}/refs?api-version=7.1
  • Delete branch: POST /{organization}/{project}/_apis/git/repositories/{repositoryId}/refs?api-version=7.1
  [
    {
      "name": "refs/heads/feature-branch",
      "oldObjectId": "0000000000000000000000000000000000000000",
      "newObjectId": "{commitId}"
    }
  ]

Pull Requests

  • Get pull requests: GET /{organization}/{project}/_apis/git/repositories/{repositoryId}/pullrequests?api-version=7.1
  • Get pull request: GET /{organization}/{project}/_apis/git/repositories/{repositoryId}/pullrequests/{pullRequestId}?api-version=7.1
  • Create pull request: POST /{organization}/{project}/_apis/git/repositories/{repositoryId}/pullrequests?api-version=7.1
  {
    "sourceRefName": "refs/heads/feature",
    "targetRefName": "refs/heads/main",
    "title": "PR Title",
    "description": "PR Description"
  }
  • Update pull request: PATCH /{organization}/{project}/_apis/git/repositories/{repositoryId}/pullrequests/{pullRequestId}?api-version=7.1
  • Get PR reviewers: GET /{organization}/{project}/_apis/git/repositories/{repositoryId}/pullrequests/{pullRequestId}/reviewers?api-version=7.1
  • Add PR reviewer: PUT /{organization}/{project}/_apis/git/repositories/{repositoryId}/pullrequests/{pullRequestId}/reviewers/{reviewerId}?api-version=7.1
  • Get PR work items: GET /{organization}/{project}/_apis/git/repositories/{repositoryId}/pullrequests/{pullRequestId}/workitems?api-version=7.1
  • Get PR threads: GET /{organization}/{project}/_apis/git/repositories/{repositoryId}/pullrequests/{pullRequestId}/threads?api-version=7.1
  • Add PR comment: POST /{organization}/{project}/_apis/git/repositories/{repositoryId}/pullrequests/{pullRequestId}/threads?api-version=7.1

Pushes

  • Get pushes: GET /{organization}/{project}/_apis/git/repositories/{repositoryId}/pushes?api-version=7.1
  • Get push: GET /{organization}/{project}/_apis/git/repositories/{repositoryId}/pushes/{pushId}?api-version=7.1

Items (Files & Folders)

  • Get item: GET /{organization}/{project}/_apis/git/repositories/{repositoryId}/items?path={path}&api-version=7.1
  • Get item content: GET /{organization}/{project}/_apis/git/repositories/{repositoryId}/items?path={path}&download=true&api-version=7.1
  • Get items batch: POST /{organization}/{project}/_apis/git/repositories/{repositoryId}/itemsbatch?api-version=7.1

Policies

  • Get policy configurations: GET /{organization}/{project}/_apis/policy/configurations?api-version=7.1
  • Create policy: POST /{organization}/{project}/_apis/policy/configurations?api-version=7.1

Azure Pipelines - CI/CD

Build Definitions (Pipelines)

  • List definitions: GET /{organization}/{project}/_apis/build/definitions?api-version=7.1
  • Get definition: GET /{organization}/{project}/_apis/build/definitions/{definitionId}?api-version=7.1
  • Create definition: POST /{organization}/{project}/_apis/build/definitions?api-version=7.1
  • Update definition: PUT /{organization}/{project}/_apis/build/definitions/{definitionId}?api-version=7.1
  • Delete definition: DELETE /{organization}/{project}/_apis/build/definitions/{definitionId}?api-version=7.1

Builds

  • Queue build: POST /{organization}/{project}/_apis/build/builds?api-version=7.1
  {
    "definition": {
      "id": 123
    },
    "sourceBranch": "refs/heads/main"
  }
  • Get builds: GET /{organization}/{project}/_apis/build/builds?api-version=7.1
  • Get build: GET /{organization}/{project}/_apis/build/builds/{buildId}?api-version=7.1
  • Update build: PATCH /{organization}/{project}/_apis/build/builds/{buildId}?api-version=7.1
  • Delete build: DELETE /{organization}/{project}/_apis/build/builds/{buildId}?api-version=7.1
  • Get build logs: GET /{organization}/{project}/_apis/build/builds/{buildId}/logs?api-version=7.1
  • Get build timeline: GET /{organization}/{project}/_apis/build/builds/{buildId}/timeline?api-version=7.1
  • Get build artifacts: GET /{organization}/{project}/_apis/build/builds/{buildId}/artifacts?api-version=7.1

Release Definitions

  • List definitions: GET https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/definitions?api-version=7.1
  • Get definition: GET https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/definitions/{definitionId}?api-version=7.1
  • Create definition: POST https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/definitions?api-version=7.1

Releases

  • Create release: POST https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases?api-version=7.1
  • Get releases: GET https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases?api-version=7.1
  • Get release: GET https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases/{releaseId}?api-version=7.1
  • Update release: PATCH https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases/{releaseId}?api-version=7.1
  • Get release environment: GET https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases/{releaseId}/environments/{environmentId}?api-version=7.1
  • Update release environment: PATCH https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases/{releaseId}/environments/{environmentId}?api-version=7.1

Approvals

  • Get approvals: GET https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/approvals?api-version=7.1
  • Update approval: PATCH https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/approvals/{approvalId}?api-version=7.1

Agent Pools

  • List pools: GET /{organization}/_apis/distributedtask/pools?api-version=7.1
  • Get pool: GET /{organization}/_apis/distributedtask/pools/{poolId}?api-version=7.1
  • Add pool: POST /{organization}/_apis/distributedtask/pools?api-version=7.1

Agents

  • List agents: GET /{organization}/_apis/distributedtask/pools/{poolId}/agents?api-version=7.1
  • Get agent: GET /{organization}/_apis/distributedtask/pools/{poolId}/agents/{agentId}?api-version=7.1
  • Update agent: PATCH /{organization}/_apis/distributedtask/pools/{poolId}/agents/{agentId}?api-version=7.1

Variable Groups

  • List variable groups: GET /{organization}/{project}/_apis/distributedtask/variablegroups?api-version=7.1
  • Get variable group: GET /{organization}/{project}/_apis/distributedtask/variablegroups/{groupId}?api-version=7.1
  • Create variable group: POST /{organization}/{project}/_apis/distributedtask/variablegroups?api-version=7.1
  • Update variable group: PUT /{organization}/{project}/_apis/distributedtask/variablegroups/{groupId}?api-version=7.1

Task Groups

  • List task groups: GET /{organization}/{project}/_apis/distributedtask/taskgroups?api-version=7.1
  • Get task group: GET /{organization}/{project}/_apis/distributedtask/taskgroups/{taskGroupId}?api-version=7.1

Service Endpoints (Connections)

  • List endpoints: GET /{organization}/{project}/_apis/serviceendpoint/endpoints?api-version=7.1
  • Get endpoint: GET /{organization}/{project}/_apis/serviceendpoint/endpoints/{endpointId}?api-version=7.1
  • Create endpoint: POST /{organization}/{project}/_apis/serviceendpoint/endpoints?api-version=7.1

Azure Test Plans

Test Plans

  • List test plans: GET /{organization}/{project}/_apis/testplan/plans?api-version=7.1
  • Get test plan: GET /{organization}/{project}/_apis/testplan/plans/{planId}?api-version=7.1
  • Create test plan: POST /{organization}/{project}/_apis/testplan/plans?api-version=7.1
  • Update test plan: PATCH /{organization}/{project}/_apis/testplan/plans/{planId}?api-version=7.1

Test Suites

  • List test suites: GET /{organization}/{project}/_apis/testplan/plans/{planId}/suites?api-version=7.1
  • Get test suite: GET /{organization}/{project}/_apis/testplan/plans/{planId}/suites/{suiteId}?api-version=7.1
  • Create test suite: POST /{organization}/{project}/_apis/testplan/plans/{planId}/suites?api-version=7.1

Test Cases

  • List test cases: GET /{organization}/{project}/_apis/testplan/plans/{planId}/suites/{suiteId}/testcases?api-version=7.1
  • Get test case: GET /{organization}/{project}/_apis/testplan/plans/{planId}/suites/{suiteId}/testcases/{testCaseId}?api-version=7.1
  • Add test cases: POST /{organization}/{project}/_apis/testplan/plans/{planId}/suites/{suiteId}/testcases?api-version=7.1

Test Runs

  • Create test run: POST /{organization}/{project}/_apis/test/runs?api-version=7.1
  • Get test runs: GET /{organization}/{project}/_apis/test/runs?api-version=7.1
  • Get test run: GET /{organization}/{project}/_apis/test/runs/{runId}?api-version=7.1
  • Update test run: PATCH /{organization}/{project}/_apis/test/runs/{runId}?api-version=7.1

Test Results

  • Get test results: GET /{organization}/{project}/_apis/test/runs/{runId}/results?api-version=7.1
  • Get test result: GET /{organization}/{project}/_apis/test/runs/{runId}/results/{resultId}?api-version=7.1
  • Update test results: PATCH /{organization}/{project}/_apis/test/runs/{runId}/results?api-version=7.1
  • Add test results: POST /{organization}/{project}/_apis/test/runs/{runId}/results?api-version=7.1

Test Configurations

  • List configurations: GET /{organization}/{project}/_apis/testplan/configurations?api-version=7.1
  • Get configuration: GET /{organization}/{project}/_apis/testplan/configurations/{configurationId}?api-version=7.1

Azure Artifacts

Feeds

  • List feeds: GET https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds?api-version=7.1
  • Get feed: GET https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}?api-version=7.1
  • Create feed: POST https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds?api-version=7.1
  • Update feed: PATCH https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}?api-version=7.1

Packages

  • List packages: GET https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}/packages?api-version=7.1
  • Get package: GET https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}/packages/{packageId}?api-version=7.1
  • Delete package: DELETE https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}/packages/{packageId}?api-version=7.1

Package Versions

  • List package versions: GET https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}/packages/{packageId}/versions?api-version=7.1
  • Get package version: GET https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}/packages/{packageId}/versions/{versionId}?api-version=7.1
  • Delete package version: DELETE https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}/packages/{packageId}/versions/{versionId}?api-version=7.1

Feed Permissions

  • Get feed permissions: GET https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}/permissions?api-version=7.1
  • Set feed permissions: PATCH https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}/permissions?api-version=7.1

Organization & Project Management

Organizations

  • List organizations: Available via Azure DevOps Profile API
  • Get organization details: GET https://dev.azure.com/{organization}/_apis/projectcollections?api-version=7.1

Projects

  • List projects: GET /{organization}/_apis/projects?api-version=7.1
  • Get project: GET /{organization}/_apis/projects/{projectId}?api-version=7.1
  • Create project: POST /{organization}/_apis/projects?api-version=7.1
  {
    "name": "MyProject",
    "description": "Project description",
    "capabilities": {
      "versioncontrol": {
        "sourceControlType": "Git"
      },
      "processTemplate": {
        "templateTypeId": "6b724908-ef14-45cf-84f8-768b5384da45"
      }
    }
  }
  • Update project: PATCH /{organization}/_apis/projects/{projectId}?api-version=7.1
  • Delete project: DELETE /{organization}/_apis/projects/{projectId}?api-version=7.1

Teams

  • List teams: GET /{organization}/_apis/teams?api-version=7.1
  • Get team: GET /{organization}/_apis/projects/{projectId}/teams/{teamId}?api-version=7.1
  • Create team: POST /{organization}/_apis/projects/{projectId}/teams?api-version=7.1
  • Update team: PATCH /{organization}/_apis/projects/{projectId}/teams/{teamId}?api-version=7.1
  • Delete team: DELETE /{organization}/_apis/projects/{projectId}/teams/{teamId}?api-version=7.1

Team Members

  • Get team members: GET /{organization}/_apis/projects/{projectId}/teams/{teamId}/members?api-version=7.1
  • Add team member: PUT /{organization}/_apis/projects/{projectId}/teams/{teamId}/members/{userId}?api-version=7.1
  • Remove team member: DELETE /{organization}/_apis/projects/{projectId}/teams/{teamId}/members/{userId}?api-version=7.1

Processes

  • List processes: GET /{organization}/_apis/process/processes?api-version=7.1
  • Get process: GET /{organization}/_apis/process/processes/{processId}?api-version=7.1
  • Create process: POST /{organization}/_apis/process/processes?api-version=7.1

Security & Identity

Identities (Users & Groups)

  • Read identities: GET https://vssps.dev.azure.com/{organization}/_apis/identities?api-version=7.1
  • Read identity: GET https://vssps.dev.azure.com/{organization}/_apis/identities/{identityId}?api-version=7.1

Graph (Azure DevOps specific)

  • List users: GET https://vssps.dev.azure.com/{organization}/_apis/graph/users?api-version=7.1-preview.1
  • Get user: GET https://vssps.dev.azure.com/{organization}/_apis/graph/users/{userDescriptor}?api-version=7.1-preview.1
  • Create user: POST https://vssps.dev.azure.com/{organization}/_apis/graph/users?api-version=7.1-preview.1
  • Delete user: DELETE https://vssps.dev.azure.com/{organization}/_apis/graph/users/{userDescriptor}?api-version=7.1-preview.1

Groups

  • List groups: GET https://vssps.dev.azure.com/{organization}/_apis/graph/groups?api-version=7.1-preview.1
  • Get group: GET https://vssps.dev.azure.com/{organization}/_apis/graph/groups/{groupDescriptor}?api-version=7.1-preview.1
  • Create group: POST https://vssps.dev.azure.com/{organization}/_apis/graph/groups?api-version=7.1-preview.1
  • Delete group: `DELETE https:

Related Skills

Get the best new skills
in your inbox

Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.