
Azure Devops
- 177 installs
- 22 repo stars
- Updated February 19, 2026
- markpitt/claude-skills
Author Azure DevOps YAML pipelines, release gates, service connections, and board workflows when shipping apps through Azure Repos and Pipelines.
About
Guides Claude through Azure DevOps practices including pipeline YAML, release management, boards, repos, and service connections for teams shipping on Microsoft Azure DevOps.
- YAML pipeline generation
- Release and environment promotion
- Azure Boards and work-item linkage
- Service connections and variable groups
- Artifact and test integration in pipelines
Azure Devops by the numbers
- 177 all-time installs (skills.sh)
- +3 installs in the week ending Aug 2, 2026 (Skillselion tracking)
- Ranked #429 of 1,435 DevOps & CI/CD skills by installs in the Skillselion catalog
- Data as of Aug 2, 2026 (Skillselion catalog sync)
npx skills add https://github.com/markpitt/claude-skills --skill azure-devopsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 177 |
|---|---|
| repo stars | ★ 22 |
| Last updated | February 19, 2026 |
| Repository | markpitt/claude-skills ↗ |
What it does
Author Azure DevOps YAML pipelines, release gates, service connections, and board workflows when shipping apps through Azure Repos and Pipelines.
Files
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/jsonCore 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://vssps.dev.azure.com/{organization}/_apis/graph/groups/{groupDescriptor}?api-version=7.1-preview.1
Group Memberships
- List memberships:
GET https://vssps.dev.azure.com/{organization}/_apis/graph/memberships/{subjectDescriptor}?api-version=7.1-preview.1 - Add membership:
PUT https://vssps.dev.azure.com/{organization}/_apis/graph/memberships/{subjectDescriptor}/{containerDescriptor}?api-version=7.1-preview.1 - Remove membership:
DELETE https://vssps.dev.azure.com/{organization}/_apis/graph/memberships/{subjectDescriptor}/{containerDescriptor}?api-version=7.1-preview.1
Access Control Lists (ACLs)
- Query ACLs:
GET /{organization}/_apis/accesscontrollists/{securityNamespaceId}?api-version=7.1 - Set ACLs:
POST /{organization}/_apis/accesscontrollists/{securityNamespaceId}?api-version=7.1 - Remove ACLs:
DELETE /{organization}/_apis/accesscontrollists/{securityNamespaceId}?api-version=7.1
Security Namespaces
- List security namespaces:
GET /{organization}/_apis/securitynamespaces?api-version=7.1 - Get security namespace:
GET /{organization}/_apis/securitynamespaces/{securityNamespaceId}?api-version=7.1
Permissions
- Query permissions:
GET /{organization}/_apis/permissions/{securityNamespaceId}/{permissions}?api-version=7.1 - Check permission:
GET /{organization}/_apis/security/permissions/{securityNamespaceId}?api-version=7.1
Extensions & Integrations
Extensions
- List installed extensions:
GET /{organization}/_apis/extensionmanagement/installedextensions?api-version=7.1 - Get installed extension:
GET /{organization}/_apis/extensionmanagement/installedextensions/{publisherName}/{extensionName}?api-version=7.1 - Install extension:
POST /{organization}/_apis/extensionmanagement/installedextensions?api-version=7.1 - Uninstall extension:
DELETE /{organization}/_apis/extensionmanagement/installedextensions/{publisherName}/{extensionName}?api-version=7.1
Service Hooks
- List subscriptions:
GET /{organization}/_apis/hooks/subscriptions?api-version=7.1 - Get subscription:
GET /{organization}/_apis/hooks/subscriptions/{subscriptionId}?api-version=7.1 - Create subscription:
POST /{organization}/_apis/hooks/subscriptions?api-version=7.1
{
"publisherId": "tfs",
"eventType": "git.push",
"resourceVersion": "1.0",
"consumerId": "webHooks",
"consumerActionId": "httpRequest",
"publisherInputs": {
"projectId": "{projectId}"
},
"consumerInputs": {
"url": "https://example.com/webhook"
}
}- Delete subscription:
DELETE /{organization}/_apis/hooks/subscriptions/{subscriptionId}?api-version=7.1
Notifications
- List subscriptions:
GET /{organization}/_apis/notification/subscriptions?api-version=7.1 - Create subscription:
POST /{organization}/_apis/notification/subscriptions?api-version=7.1
Additional Services
Wiki
- List wikis:
GET /{organization}/{project}/_apis/wiki/wikis?api-version=7.1 - Get wiki:
GET /{organization}/{project}/_apis/wiki/wikis/{wikiId}?api-version=7.1 - Create wiki:
POST /{organization}/{project}/_apis/wiki/wikis?api-version=7.1 - Get wiki page:
GET /{organization}/{project}/_apis/wiki/wikis/{wikiId}/pages?path={path}&api-version=7.1 - Create/update wiki page:
PUT /{organization}/{project}/_apis/wiki/wikis/{wikiId}/pages?path={path}&api-version=7.1
Search
- Search work items:
POST /{organization}/{project}/_apis/search/workitemsearchresults?api-version=7.1 - Search code:
POST /{organization}/{project}/_apis/search/codesearchresults?api-version=7.1
Dashboards
- List dashboards:
GET /{organization}/{project}/{team}/_apis/dashboard/dashboards?api-version=7.1 - Get dashboard:
GET /{organization}/{project}/{team}/_apis/dashboard/dashboards/{dashboardId}?api-version=7.1 - Create dashboard:
POST /{organization}/{project}/{team}/_apis/dashboard/dashboards?api-version=7.1
Widgets
- List widgets:
GET /{organization}/{project}/{team}/_apis/dashboard/dashboards/{dashboardId}/widgets?api-version=7.1 - Create widget:
POST /{organization}/{project}/{team}/_apis/dashboard/dashboards/{dashboardId}/widgets?api-version=7.1
Audit
- Query audit log:
GET /{organization}/_apis/audit/auditlog?api-version=7.1-preview.1 - Download audit log:
GET /{organization}/_apis/audit/downloadlog?api-version=7.1-preview.1
Common Operations
Pagination
Azure DevOps API uses continuation tokens for pagination:
Response with continuation token:
{
"count": 100,
"value": [...],
"continuationToken": "MTIz"
}Next request:
GET /{endpoint}?continuationToken=MTIz&api-version=7.1Some endpoints use $top and $skip:
GET /{endpoint}?$top=100&$skip=100&api-version=7.1Filtering & Querying
OData-style filters (select endpoints):
GET /{endpoint}?$filter=state eq 'Active'&api-version=7.1Work item queries use WIQL (Work Item Query Language):
SELECT [System.Id], [System.Title], [System.State]
FROM WorkItems
WHERE [System.WorkItemType] = 'Bug'
AND [System.State] = 'Active'
AND [System.AssignedTo] = @Me
ORDER BY [System.ChangedDate] DESCBatch Operations
Some Azure DevOps APIs support batch operations:
Work Items batch get:
GET /{organization}/_apis/wit/workitemsbatch?ids=1,2,3,4,5&api-version=7.1Git items batch:
POST /{organization}/{project}/_apis/git/repositories/{repositoryId}/itemsbatch?api-version=7.1
{
"itemDescriptors": [
{"path": "/file1.txt", "version": "main"},
{"path": "/file2.txt", "version": "main"}
]
}JSON Patch for Updates
Work items and some other resources use JSON Patch (RFC 6902):
Operations:
add- Add a field or relationshipremove- Remove a fieldreplace- Replace field valuetest- Test a value (for concurrency)copy- Copy a valuemove- Move a value
Example:
[
{
"op": "add",
"path": "/fields/System.Title",
"value": "New title"
},
{
"op": "replace",
"path": "/fields/System.State",
"value": "Active"
},
{
"op": "add",
"path": "/relations/-",
"value": {
"rel": "System.LinkTypes.Hierarchy-Reverse",
"url": "https://dev.azure.com/{org}/_apis/wit/workItems/123"
}
}
]Error Handling
Azure DevOps API returns standard HTTP status codes:
200 OK- Success201 Created- Resource created202 Accepted- Request accepted (async operation)204 No Content- Success, no content400 Bad Request- Invalid request401 Unauthorized- Authentication required403 Forbidden- Insufficient permissions404 Not Found- Resource not found409 Conflict- Conflict (e.g., version mismatch)429 Too Many Requests- Rate limit exceeded500 Internal Server Error- Server error503 Service Unavailable- Service unavailable
Error response format:
{
"id": "request-id",
"innerException": null,
"message": "TF401019: The Git repository with name or identifier MyRepo does not exist or you do not have permissions for the operation you are attempting.",
"typeName": "Microsoft.TeamFoundation.Git.Server.GitRepositoryNotFoundException",
"typeKey": "GitRepositoryNotFoundException",
"errorCode": 0,
"eventId": 3000
}Rate Limiting
Azure DevOps enforces rate limits:
- Global limit: Varies by service (typically 200-300 requests per minute)
- TSTUs (Team Services Time Units): Used to measure resource consumption
- Retry-After header: Indicates when to retry after 429 error
Best practices:
- Implement exponential backoff
- Respect
Retry-Afterheader - Cache responses when appropriate
- Use batch operations when available
Permissions & Scopes
PAT Scopes
When creating Personal Access Tokens, select appropriate scopes:
- Agent Pools: Read & manage
- Analytics: Read
- Audit: Read audit log
- Build: Read & execute
- Code: Full, Read, or Status
- Extensions: Read & manage
- Graph: Read
- Identity: Read
- Marketplace: Acquire, manage, publish
- Member Entitlement Management: Read & write
- Packaging: Read, write, & manage
- Project and Team: Read, write, & manage
- Release: Read, write, execute, & manage
- Secure Files: Read, create, & manage
- Service Connections: Read, query, & manage
- Symbols: Read
- Task Groups: Read, create, & manage
- Test Management: Read & write
- Tokens: Read & manage
- User Profile: Read & write
- Variable Groups: Read, create, & manage
- Work Items: Full, Read, & write
Important: Always use the least privileged scope required.
OAuth 2.0 Scopes
For OAuth applications, use scopes in the format:
vso.work- Work items (read)vso.work_write- Work items (write)vso.code- Code (read)vso.code_write- Code (write)vso.build- Build (read)vso.build_execute- Build (execute)
Full list: https://docs.microsoft.com/azure/devops/integrate/get-started/authentication/oauth
API Versioning
Azure DevOps APIs use explicit versioning:
Versions:
7.1- Latest stable (recommended)7.0- Stable6.0- Stable5.1- Older stable- Versions with
-previewsuffix (e.g.,7.1-preview.1) - Preview features
Version format:
api-version=7.1- Latest patch of 7.1api-version=7.1-preview.1- Preview version 1 of 7.1
Important:
- Always specify
api-version(required on all requests) - Preview APIs may change or be removed
- Use stable versions for production
- Monitor deprecation notices
Best Practices
Performance
1. Use batch operations when fetching multiple items 2. Implement pagination for large result sets 3. Use specific fields with $select where supported 4. Cache responses when appropriate 5. Use delta queries for incremental sync 6. Leverage continuation tokens properly
Security
1. Store PATs securely (use Azure Key Vault or similar) 2. Use appropriate scopes (least privilege) 3. Rotate PATs regularly (set expiration) 4. Use HTTPS only 5. Validate input to prevent injection 6. Implement proper error handling 7. Log security events 8. Never commit PATs to source control
Development
1. Use latest stable API version 2. Handle rate limits with retry logic 3. Implement exponential backoff 4. Check for preview API stability before using 5. Monitor service health 6. Use JSON Patch for updates 7. Validate responses 8. Handle pagination correctly 9. Test with various edge cases 10. Use descriptive error messages
Integration Patterns
1. Webhooks (Service Hooks): For event-driven integrations 2. Polling: For batch processing (avoid excessive polling) 3. Scheduled Jobs: For periodic sync operations 4. Real-time sync: Using service hooks + API calls
Common Use Cases
Create Work Item
POST https://dev.azure.com/{organization}/{project}/_apis/wit/workitems/$Bug?api-version=7.1
Content-Type: application/json-patch+json
[
{
"op": "add",
"path": "/fields/System.Title",
"value": "Critical bug in login flow"
},
{
"op": "add",
"path": "/fields/System.Description",
"value": "Users cannot log in with SSO"
},
{
"op": "add",
"path": "/fields/Microsoft.VSTS.Common.Priority",
"value": 1
}
]Create Pull Request
POST https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullrequests?api-version=7.1
Content-Type: application/json
{
"sourceRefName": "refs/heads/feature/new-feature",
"targetRefName": "refs/heads/main",
"title": "Add new feature",
"description": "This PR adds the new feature",
"reviewers": [
{"id": "reviewer-id-1"},
{"id": "reviewer-id-2"}
]
}Queue Build
POST https://dev.azure.com/{organization}/{project}/_apis/build/builds?api-version=7.1
Content-Type: application/json
{
"definition": {
"id": 123
},
"sourceBranch": "refs/heads/main",
"parameters": "{\"param1\":\"value1\"}"
}Run WIQL Query
POST https://dev.azure.com/{organization}/{project}/_apis/wit/wiql?api-version=7.1
Content-Type: application/json
{
"query": "SELECT [System.Id], [System.Title], [System.State] FROM WorkItems WHERE [System.WorkItemType] = 'Bug' AND [System.State] = 'Active' AND [System.AssignedTo] = @Me ORDER BY [System.Priority] ASC"
}Create Service Hook Subscription
POST https://dev.azure.com/{organization}/_apis/hooks/subscriptions?api-version=7.1
Content-Type: application/json
{
"publisherId": "tfs",
"eventType": "workitem.updated",
"resourceVersion": "1.0",
"consumerId": "webHooks",
"consumerActionId": "httpRequest",
"publisherInputs": {
"projectId": "{projectId}",
"workItemType": "Bug"
},
"consumerInputs": {
"url": "https://example.com/webhook",
"httpHeaders": "Content-Type:application/json"
}
}Tools & Testing
REST Client Tools
- Postman - Popular API testing tool
- curl - Command-line tool
- PowerShell -
Invoke-RestMethod - Python -
requestslibrary - Azure DevOps CLI - Official CLI tool
Azure DevOps CLI
Install and use the official CLI:
# Install
pip install azure-devops
# Login
az devops login --organization https://dev.azure.com/{organization}
# Configure defaults
az devops configure --defaults organization=https://dev.azure.com/{organization} project={project}
# Examples
az repos list
az pipelines build list
az boards work-item create --title "Bug" --type BugTesting Authentication
Test PAT authentication using an environment variable — never hardcode the token:
# Set once in your shell session (do not commit this to scripts or source control)
# export AZURE_DEVOPS_PAT="<your-pat>"
# Encode from environment variable
PAT_ENCODED=$(echo -n ":$AZURE_DEVOPS_PAT" | base64)
# Test
curl -H "Authorization: Basic $PAT_ENCODED" \
"https://dev.azure.com/{organization}/_apis/projects?api-version=7.1"Preferred: Use az devops login which handles credential storage securely without manual encoding.
SDKs Available
- .NET -
Microsoft.TeamFoundationServer.Client,Microsoft.VisualStudio.Services.Client - Node.js -
azure-devops-node-api - Python -
azure-devops - Java - Azure DevOps SDK for Java
Progressive Loading
This skill provides comprehensive coverage of Azure DevOps API. For specific tasks:
1. Identify the service area (Boards, Repos, Pipelines, Test, Artifacts) 2. Find the relevant section in this document 3. Use the API reference for detailed parameter information 4. Test with Azure DevOps CLI or REST client before implementing
Reference Links
- Official Docs: https://docs.microsoft.com/rest/api/azure/devops/
- API Reference: https://docs.microsoft.com/rest/api/azure/devops/?view=azure-devops-rest-7.1
- Authentication: https://docs.microsoft.com/azure/devops/integrate/get-started/authentication/authentication-guidance
- Service Hooks: https://docs.microsoft.com/azure/devops/service-hooks/overview
- Rate Limits: https://docs.microsoft.com/azure/devops/integrate/concepts/rate-limits
- API Versioning: https://docs.microsoft.com/azure/devops/integrate/concepts/rest-api-versioning
- Azure DevOps CLI: https://docs.microsoft.com/cli/azure/devops
- Node.js SDK: https://github.com/microsoft/azure-devops-node-api
- Python SDK: https://github.com/microsoft/azure-devops-python-api
- Status Page: https://status.dev.azure.com/
API URL Patterns
Different Azure DevOps services use different base URLs:
- Core services:
https://dev.azure.com/{organization}/ - Release Management:
https://vsrm.dev.azure.com/{organization}/ - Package Management:
https://feeds.dev.azure.com/{organization}/ - Identity:
https://vssps.dev.azure.com/{organization}/ - Analytics:
https://analytics.dev.azure.com/{organization}/
Notes
- This skill covers the Azure DevOps REST API version 7.1 (latest stable)
- Some endpoints may require preview API versions
- Always check the official documentation for latest changes
- API versions and endpoints may evolve over time
- Rate limits and throttling policies apply
- Proper authentication and permissions are required for all operations
- Some features are only available in Azure DevOps Services, not Server
Azure DevOps Advanced Integrations
Covers extensions, webhooks, service hooks, notifications, wiki, search, dashboards, and audit capabilities.
Service Hooks (Event Subscriptions)
Integrate Azure DevOps with external systems via webhooks.
List Subscriptions
GET /{organization}/_apis/hooks/subscriptions?api-version=7.1Get Subscription
GET /{organization}/_apis/hooks/subscriptions/{subscriptionId}?api-version=7.1Create Subscription
POST /{organization}/_apis/hooks/subscriptions?api-version=7.1
Content-Type: application/json
{
"publisherId": "tfs",
"eventType": "git.push",
"resourceVersion": "1.0",
"consumerId": "webHooks",
"consumerActionId": "httpRequest",
"publisherInputs": {
"projectId": "{projectId}"
},
"consumerInputs": {
"url": "https://example.com/webhook",
"httpHeaders": "Authorization:Bearer token",
"resourceDetailsToSend": "all",
"detailedMessagesToSend": "all",
"messagesToSend": "all",
"basicAuthenticationUsername": "",
"basicAuthenticationPassword": ""
}
}Update Subscription
PATCH /{organization}/_apis/hooks/subscriptions/{subscriptionId}?api-version=7.1
Content-Type: application/json
{
"status": "enabled"
}Delete Subscription
DELETE /{organization}/_apis/hooks/subscriptions/{subscriptionId}?api-version=7.1Common Event Types
git.push- Code pushed to repositorygit.pullrequest.created- Pull request createdgit.pullrequest.updated- Pull request updatedgit.pullrequest.merged- Pull request mergedworkitem.created- Work item createdworkitem.updated- Work item updatedworkitem.commented- Comment added to work itembuild.complete- Build completedrelease.deployment.completion- Release deployment completed
Notifications
Create notification subscriptions for user notifications.
List Subscriptions
GET /{organization}/_apis/notification/subscriptions?api-version=7.1Get Subscription
GET /{organization}/_apis/notification/subscriptions/{subscriptionId}?api-version=7.1Create Subscription
POST /{organization}/_apis/notification/subscriptions?api-version=7.1
Content-Type: application/json
{
"description": "Notify on build failure",
"filter": {
"type": "event",
"criteria": [
{
"filterType": "eventType",
"criteria": "build.complete"
},
{
"filterType": "status",
"criteria": "failed"
}
]
},
"channel": {
"type": "email"
},
"scope": {
"type": "project",
"id": "{projectId}"
}
}Extensions
Manage installed and available extensions.
List Installed Extensions
GET /{organization}/_apis/extensionmanagement/installedextensions?api-version=7.1Get Installed Extension
GET /{organization}/_apis/extensionmanagement/installedextensions/{publisherName}/{extensionName}?api-version=7.1Install Extension
POST /{organization}/_apis/extensionmanagement/installedextensions?api-version=7.1
Content-Type: application/json
{
"publisherName": "ms-devlabs",
"extensionName": "devops-community-extension"
}Uninstall Extension
DELETE /{organization}/_apis/extensionmanagement/installedextensions/{publisherName}/{extensionName}?api-version=7.1Wiki
Create and manage project wikis and documentation.
List Wikis
GET /{organization}/{project}/_apis/wiki/wikis?api-version=7.1Get Wiki
GET /{organization}/{project}/_apis/wiki/wikis/{wikiId}?api-version=7.1Create Wiki
POST /{organization}/{project}/_apis/wiki/wikis?api-version=7.1
Content-Type: application/json
{
"name": "Project Wiki",
"type": "projectWiki",
"mappedPath": "/"
}Get Wiki Page
GET /{organization}/{project}/_apis/wiki/wikis/{wikiId}/pages?path=/Home&api-version=7.1Create/Update Wiki Page
PUT /{organization}/{project}/_apis/wiki/wikis/{wikiId}/pages?path=/My-Page&api-version=7.1
Content-Type: application/json
{
"content": "# Page Title\n\nPage content in markdown"
}Search
Search across work items, code, and wiki.
Search Work Items
POST /{organization}/{project}/_apis/search/workitemsearchresults?api-version=7.1
Content-Type: application/json
{
"searchText": "bug",
"$skip": 0,
"$top": 50,
"filters": {
"type": ["Bug"],
"state": ["Active"]
}
}Search Code
POST /{organization}/{project}/_apis/search/codesearchresults?api-version=7.1
Content-Type: application/json
{
"searchText": "function handleClick",
"$skip": 0,
"$top": 50,
"filters": {
"repository": ["{repositoryId}"],
"branch": ["main"]
}
}Search Wiki
POST /{organization}/{project}/_apis/search/wikisearchresults?api-version=7.1
Content-Type: application/json
{
"searchText": "architecture",
"$skip": 0,
"$top": 50
}Dashboards
Create and manage team dashboards.
List Dashboards
GET /{organization}/{project}/{team}/_apis/dashboard/dashboards?api-version=7.1Get Dashboard
GET /{organization}/{project}/{team}/_apis/dashboard/dashboards/{dashboardId}?api-version=7.1Create Dashboard
POST /{organization}/{project}/{team}/_apis/dashboard/dashboards?api-version=7.1
Content-Type: application/json
{
"name": "Project Overview",
"description": "Main project metrics dashboard"
}Update Dashboard
PUT /{organization}/{project}/{team}/_apis/dashboard/dashboards/{dashboardId}?api-version=7.1
Content-Type: application/json
{
"name": "Updated Dashboard Name",
"description": "Updated description"
}Widgets
Add and manage widgets on dashboards.
List Widgets
GET /{organization}/{project}/{team}/_apis/dashboard/dashboards/{dashboardId}/widgets?api-version=7.1Create Widget
POST /{organization}/{project}/{team}/_apis/dashboard/dashboards/{dashboardId}/widgets?api-version=7.1
Content-Type: application/json
{
"name": "New Work Item",
"description": "Create new work item",
"contributionId": "ms.vss-dashboards-web.Microsoft.VisualStudioOnline.Dashboards.NewWorkItem",
"position": {
"row": 1,
"column": 1
},
"size": {
"rowSpan": 1,
"columnSpan": 1
},
"settings": {}
}Audit
Query organization audit logs.
Query Audit Log
GET /{organization}/_apis/audit/auditlog?api-version=7.1-preview.1Query options:
?startTime=2025-01-01T00:00:00Z- Start date?endTime=2025-01-31T23:59:59Z- End date?skipCount=0&top=100- Pagination?activityIds=ProjectCollectionAdministrators.Update- Filter by activity
Download Audit Log
GET /{organization}/_apis/audit/downloadlog?format=json&startTime=2025-01-01T00:00:00Z&endTime=2025-01-31T23:59:59Z&api-version=7.1-preview.1Formats: json, csv
Best Practices
Service Hooks Integration
1. Use service hooks for event-driven integrations 2. Validate webhook signatures 3. Implement retry logic 4. Log webhook events 5. Monitor webhook failures 6. Keep webhook handlers idempotent 7. Avoid blocking operations in webhooks 8. Test webhook integrations thoroughly
Notification Management
1. Use group notifications 2. Avoid notification overload 3. Create targeted subscriptions 4. Set up digest notifications 5. Test notification delivery 6. Document notification purposes 7. Review and clean up old subscriptions
Extension Development
1. Choose extensions from verified publishers 2. Review extension permissions 3. Keep extensions updated 4. Monitor extension usage 5. Remove unused extensions 6. Test extensions in non-prod first 7. Document custom extensions
Wiki Documentation
1. Keep wiki synchronized with code 2. Use clear page hierarchies 3. Include examples in documentation 4. Link to relevant resources 5. Maintain version history 6. Archive outdated pages 7. Use templates for consistency
Search Optimization
1. Index code regularly 2. Keep search indexes updated 3. Use filters for better results 4. Document important code locations 5. Tag important artifacts 6. Review search performance 7. Archive old indexes
Dashboard Usage
1. Create focused dashboards 2. Limit widgets per dashboard 3. Use meaningful widget titles 4. Refresh dashboards regularly 5. Share dashboards with stakeholders 6. Archive unused dashboards 7. Document dashboard purposes
Audit & Compliance
1. Review audit logs regularly 2. Archive audit logs for retention 3. Monitor sensitive operations 4. Document audit policies 5. Implement alerts for risky activities 6. Use audit logs for compliance 7. Report on audit findings
Azure Artifacts - Package Management
Azure Artifacts provides package management for NuGet, npm, PyPI, Maven, and Universal packages with feed management and package promotion.
Feeds
Manage package feeds and access control.
List Feeds
GET https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds?api-version=7.1Query options:
?includeDeletedUpstreams=true- Include deleted upstream sources?getUpstreamSources=true- Include upstream source details
Get Feed
GET https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}?api-version=7.1Create Feed
POST https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds?api-version=7.1
Content-Type: application/json
{
"name": "MyFeed",
"description": "Feed for internal packages",
"upstreamSources": [
{
"id": "public-source",
"name": "Public Source",
"location": "https://api.nuget.org/v3/index.json",
"upstreamSourceType": "public",
"internalUpstreamSourceId": null
}
],
"feedPermissions": [
{
"role": "contributor",
"identityDescriptor": "{descriptor}"
}
]
}Update Feed
PATCH https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}?api-version=7.1
Content-Type: application/json
{
"name": "UpdatedFeedName",
"description": "Updated description"
}Delete Feed
DELETE https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}?api-version=7.1Packages
Manage packages within feeds.
List Packages
GET https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}/packages?api-version=7.1Query options:
?protocolType=NuGet- Filter by protocol (NuGet, npm, PyPI, Maven, etc.)?includeDescription=true- Include package descriptions?$top=100- Pagination
Get Package
GET https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}/packages/{packageId}?api-version=7.1Delete Package
DELETE https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}/packages/{packageId}?api-version=7.1Delete permanently (not just deprecate):
DELETE https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}/packages/{packageId}?api-version=7.1&hardDelete=truePackage Versions
Manage individual package versions.
List Package Versions
GET https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}/packages/{packageId}/versions?api-version=7.1Query options:
?includeDeleted=false- Hide deleted versions?$top=50- Pagination
Get Package Version
GET https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}/packages/{packageId}/versions/{versionId}?api-version=7.1Deprecate Package Version
PATCH https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}/packages/{packageId}/versions/{versionId}?api-version=7.1
Content-Type: application/json
{
"isDeleted": false,
"isDeprecated": true,
"deprecationMessage": "Use version 2.0 instead"
}Delete Package Version
PATCH https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}/packages/{packageId}/versions/{versionId}?api-version=7.1
Content-Type: application/json
{
"isDeleted": true
}Permanently Delete Package Version
DELETE https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}/packages/{packageId}/versions/{versionId}?api-version=7.1Package Permissions
Manage access to packages and feeds.
Get Feed Permissions
GET https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}/permissions?api-version=7.1Set Feed Permissions
PATCH https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}/permissions?api-version=7.1
Content-Type: application/json
[
{
"role": "owner",
"identityDescriptor": "{descriptor}"
},
{
"role": "contributor",
"identityDescriptor": "{descriptor}"
},
{
"role": "reader",
"identityDescriptor": "{descriptor}"
}
]Permission roles:
owner- Full controlcontributor- Can publish packagesreader- Can consume packagescollaborator- Limited contributor access
Get Package Permissions
GET https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}/packages/{packageId}/permissions?api-version=7.1NuGet Package Operations
Publish NuGet Package
Publish via Azure Artifacts NuGet source:
nuget push MyPackage.1.0.0.nupkg -Source https://feeds.dev.azure.com/{organization}/{project}/_packaging/{feedName}/nuget/v2 -ApiKey AzureDevOpsOr via REST (not recommended - use NuGet CLI): Upload .nupkg files using the NuGet CLI instead of REST API for best compatibility.
Search NuGet Packages
GET https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}/packages?protocolType=NuGet&api-version=7.1npm Package Operations
Publish npm Package
Configure .npmrc with Azure Artifacts registry:
registry=https://pkgs.dev.azure.com/{organization}/{project}/_packaging/{feedName}/npm/registry/Then:
npm publish --registry https://pkgs.dev.azure.com/{organization}/{project}/_packaging/{feedName}/npm/registry/Install npm Package
npm install @{scope}/mypackage --registry https://pkgs.dev.azure.com/{organization}/{project}/_packaging/{feedName}/npm/registry/PyPI Package Operations
Publish PyPI Package
Configure setup.py or use twine:
twine upload -r https://pkgs.dev.azure.com/{organization}/{project}/_packaging/{feedName}/pypi/simple/ dist/*Install PyPI Package
pip install mypackage --index-url https://pkgs.dev.azure.com/{organization}/{project}/_packaging/{feedName}/pypi/simple/Maven Package Operations
Publish Maven Package
Configure pom.xml:
<distributionManagement>
<repository>
<id>AzureArtifacts</id>
<url>https://pkgs.dev.azure.com/{organization}/{project}/_packaging/{feedName}/maven/v1</url>
</repository>
</distributionManagement>Then:
mvn deployConsume Maven Package
Configure pom.xml:
<repositories>
<repository>
<id>AzureArtifacts</id>
<url>https://pkgs.dev.azure.com/{organization}/{project}/_packaging/{feedName}/maven/v1</url>
</repository>
</repositories>Universal Packages
Create and manage custom binary packages.
Create Universal Package
# Install Universal Package tool
dotnet tool install -g Microsoft.VisualStudio.Services.UniversalPackageTools
# Create and publish
upack pack --name MyPackage --version 1.0.0 --source ./package-contents --target ./
upack push ./MyPackage.1.0.0.upack https://pkgs.dev.azure.com/{organization}/{project}/_packaging/{feedName}/nuget/v2 --apiKey AzureDevOpsDownload Universal Package
upack download --name MyPackage --version 1.0.0 --source https://pkgs.dev.azure.com/{organization}/{project}/_packaging/{feedName}/nuget/v2 --target ./Upstream Sources
Link upstream package sources for dependency resolution.
Add Upstream Source
PATCH https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}?api-version=7.1
Content-Type: application/json
{
"upstreamSources": [
{
"id": "nuget-org",
"name": "nuget.org",
"location": "https://api.nuget.org/v3/index.json",
"upstreamSourceType": "public"
}
]
}List Upstream Sources
Upstream sources are returned with feed details:
GET https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}?getUpstreamSources=true&api-version=7.1Retention Policies
Manage package retention and cleanup.
Set Retention Policy
PATCH https://feeds.dev.azure.com/{organization}/_apis/packaging/feeds/{feedId}?api-version=7.1
Content-Type: application/json
{
"retentionPolicy": {
"daysToKeepRecentlyDownloadedPackages": 30
}
}Best Practices
Feed Organization
1. Create separate feeds for different projects/teams 2. Use naming conventions (prod, staging, test) 3. Implement promotion workflows 4. Set clear retention policies 5. Document feed purposes 6. Manage permissions by role 7. Monitor feed size and costs
Package Management
1. Follow semantic versioning (major.minor.patch) 2. Tag pre-release versions clearly (alpha, beta, rc) 3. Document package contents and dependencies 4. Include changelogs 5. Deprecate old versions properly 6. Archive deprecated packages 7. Remove sensitive data before publishing
Security & Access
1. Use service principals for automation 2. Scope PAT tokens appropriately 3. Restrict feed access by team 4. Audit package downloads 5. Scan packages for vulnerabilities 6. Require code reviews before publishing 7. Use signed packages where possible
Consumption Best Practices
1. Pin to specific versions in production 2. Use version ranges for development 3. Cache dependencies locally 4. Monitor upstream package updates 5. Test dependency updates 6. Document external dependencies 7. Keep dependencies current
CI/CD Integration
1. Publish packages from pipelines 2. Build packages during CI 3. Test packages before promotion 4. Automate version numbering 5. Include build metadata in versions 6. Generate package documentation 7. Report on package metrics
Maintenance & Cleanup
1. Set retention policies 2. Archive old versions 3. Remove broken packages 4. Monitor disk usage 5. Clean up test packages 6. Review access logs 7. Update upstream sources regularly
Azure Boards - Work Item Tracking
Azure Boards provides comprehensive work item management including tasks, bugs, user stories, and custom work item types. This resource covers work items, queries, iterations, and area/iteration paths.
Work Items - Core Operations
Work items are the fundamental units of tracking in Azure DevOps (bugs, tasks, features, stories, etc.).
Create Work Item
POST /{organization}/{project}/_apis/wit/workitems/${type}?api-version=7.1
Content-Type: application/json-patch+json
[
{
"op": "add",
"path": "/fields/System.Title",
"value": "New bug report"
},
{
"op": "add",
"path": "/fields/System.Description",
"value": "Detailed description"
},
{
"op": "add",
"path": "/fields/System.AssignedTo",
"value": "user@example.com"
},
{
"op": "add",
"path": "/fields/Microsoft.VSTS.Common.Priority",
"value": 1
}
]Get Work Item
GET /{organization}/{project}/_apis/wit/workitems/{id}?api-version=7.1Update Work Item
PATCH /{organization}/{project}/_apis/wit/workitems/{id}?api-version=7.1
Content-Type: application/json-patch+json
[
{
"op": "replace",
"path": "/fields/System.State",
"value": "Active"
},
{
"op": "replace",
"path": "/fields/System.Title",
"value": "Updated title"
}
]Delete Work Item
DELETE /{organization}/{project}/_apis/wit/workitems/{id}?api-version=7.1Batch Get Work Items
GET /{organization}/_apis/wit/workitemsbatch?ids=1,2,3,4,5&api-version=7.1Work Item Queries
Run queries to find work items matching specific criteria using WIQL (Work Item Query Language).
Run WIQL Query
POST /{organization}/{project}/_apis/wit/wiql?api-version=7.1
Content-Type: application/json
{
"query": "SELECT [System.Id], [System.Title], [System.State] FROM WorkItems WHERE [System.WorkItemType] = 'Bug' AND [System.State] = 'Active'"
}Run Stored Query
GET /{organization}/{project}/_apis/wit/wiql/{queryId}?api-version=7.1WIQL Query Examples
Active bugs assigned to current user:
SELECT [System.Id], [System.Title], [System.State]
FROM WorkItems
WHERE [System.WorkItemType] = 'Bug'
AND [System.State] = 'Active'
AND [System.AssignedTo] = @Me
ORDER BY [System.ChangedDate] DESCHigh-priority work in current sprint:
SELECT [System.Id], [System.Title], [System.WorkItemType]
FROM WorkItems
WHERE [System.TeamProject] = @Project
AND [System.Iteration] = @CurrentIteration
AND [Microsoft.VSTS.Common.Priority] <= 1
ORDER BY [System.Priority] ASCRecently closed work items:
SELECT [System.Id], [System.Title], [System.State], [System.ChangedDate]
FROM WorkItems
WHERE [System.State] = 'Closed'
AND [System.ChangedDate] > @Today - 7
ORDER BY [System.ChangedDate] DESCBoards & Backlogs
Manage team boards, sprints/iterations, and capacity planning.
Get Boards
GET /{organization}/{project}/{team}/_apis/work/boards?api-version=7.1Get Backlog Items
GET /{organization}/{project}/{team}/_apis/work/backlogs/{backlogId}/workItems?api-version=7.1Get Team Iterations
GET /{organization}/{project}/{team}/_apis/work/teamsettings/iterations?api-version=7.1Get Iteration Capacity
Get team member capacity for an iteration:
GET /{organization}/{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/capacities?api-version=7.1Update Iteration Capacity
PATCH /{organization}/{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/capacities/{userId}?api-version=7.1
Content-Type: application/json
{
"activities": [
{
"name": "Development",
"capacityPerDay": 8.0
}
]
}Work Item Types & Fields
Manage the schema of your work items.
List Work Item Types
GET /{organization}/{project}/_apis/wit/workitemtypes?api-version=7.1List All Fields
GET /{organization}/{project}/_apis/wit/fields?api-version=7.1Get Specific Field
GET /{organization}/{project}/_apis/wit/fields/{fieldNameOrRefName}?api-version=7.1Common System Fields
System.Id- Work item IDSystem.Title- TitleSystem.Description- DescriptionSystem.State- Current state (New, Active, Resolved, Closed)System.AssignedTo- Assigned personSystem.CreatedDate- Creation dateSystem.ChangedDate- Last modified dateSystem.WorkItemType- Type (Bug, Task, Feature, Story)
Common Custom Fields
Microsoft.VSTS.Common.Priority- Priority (1-4)Microsoft.VSTS.Common.Severity- SeverityMicrosoft.VSTS.Scheduling.Effort- Story pointsMicrosoft.VSTS.Scheduling.RemainingWork- Remaining hours
Area & Iteration Paths
Organize work using area and iteration hierarchies.
Get Areas
GET /{organization}/{project}/_apis/wit/classificationnodes/areas?api-version=7.1Get Iterations
GET /{organization}/{project}/_apis/wit/classificationnodes/iterations?api-version=7.1Create Area
POST /{organization}/{project}/_apis/wit/classificationnodes/areas?api-version=7.1
Content-Type: application/json
{
"name": "Backend",
"structureGroup": "areas"
}Create Iteration
POST /{organization}/{project}/_apis/wit/classificationnodes/iterations?api-version=7.1
Content-Type: application/json
{
"name": "Sprint 1",
"attributes": {
"startDate": "2025-01-01T00:00:00Z",
"finishDate": "2025-01-14T23:59:59Z"
}
}JSON Patch Operations for Work Items
Work item updates use JSON Patch (RFC 6902) format:
Available Operations
add- Add or set a field valueremove- Remove a field valuereplace- Replace field valuetest- Test a value (for concurrency)copy- Copy a valuemove- Move a value
Example: Complete Work Item Update
[
{
"op": "add",
"path": "/fields/System.Title",
"value": "New title"
},
{
"op": "replace",
"path": "/fields/System.State",
"value": "Active"
},
{
"op": "add",
"path": "/fields/Microsoft.VSTS.Common.Priority",
"value": 1
},
{
"op": "add",
"path": "/relations/-",
"value": {
"rel": "System.LinkTypes.Hierarchy-Reverse",
"url": "https://dev.azure.com/{org}/_apis/wit/workItems/123"
}
}
]Best Practices
Work Item Management
1. Use meaningful titles and descriptions 2. Assign work items promptly 3. Keep state transitions consistent 4. Link related work items 5. Use iterations/sprints for planning 6. Estimate effort when needed 7. Regularly review and close completed work
Query Performance
1. Use specific field selections 2. Filter by date ranges for historical queries 3. Avoid querying across all projects unnecessarily 4. Cache query results when possible 5. Use pagination for large result sets
Field Naming Conventions
- Use consistent field naming
- Document custom field purposes
- Use standard system fields where applicable
- Minimize custom field proliferation
Azure DevOps Organization & Security
Covers organization and project management, user and group administration, security policies, identities, and access control.
Organizations & Projects
Organization and project-level management.
Organization Management
Azure DevOps organizations are created through the Azure DevOps portal. Key endpoints:
List Projects
GET /{organization}/_apis/projects?api-version=7.1Query options:
?stateFilter=wellFormed- Only valid projects?includeCapabilities=true- Include project capabilities?$skip=0&$top=100- Pagination
Get Project
GET /{organization}/_apis/projects/{projectId}?api-version=7.1Response includes:
- Project name and description
- Project capabilities (version control, process template)
- Default team
- Visibility (public/private)
Create Project
POST /{organization}/_apis/projects?api-version=7.1
Content-Type: application/json
{
"name": "MyProject",
"description": "Project description",
"capabilities": {
"versioncontrol": {
"sourceControlType": "Git"
},
"processTemplate": {
"templateTypeId": "6b724908-ef14-45cf-84f8-768b5384da45"
}
},
"visibility": "private"
}Process template IDs:
6b724908-ef14-45cf-84f8-768b5384da45- Agileadcc42ab-9882-485e-a3ed-7678f01f66bc- Scrum27450541-8e31-4150-9947-dc59f998fc01- CMMI
Update Project
PATCH /{organization}/_apis/projects/{projectId}?api-version=7.1
Content-Type: application/json
{
"description": "Updated project description",
"visibility": "public"
}Delete Project
DELETE /{organization}/_apis/projects/{projectId}?api-version=7.1Teams
Organize users into teams within projects.
List Teams
GET /{organization}/_apis/teams?api-version=7.1Or for specific project:
GET /{organization}/_apis/projects/{projectId}/teams?api-version=7.1Get Team
GET /{organization}/_apis/projects/{projectId}/teams/{teamId}?api-version=7.1Create Team
POST /{organization}/_apis/projects/{projectId}/teams?api-version=7.1
Content-Type: application/json
{
"name": "Backend Team",
"description": "Team responsible for backend services"
}Update Team
PATCH /{organization}/_apis/projects/{projectId}/teams/{teamId}?api-version=7.1
Content-Type: application/json
{
"name": "Updated Team Name",
"description": "Updated description"
}Delete Team
DELETE /{organization}/_apis/projects/{projectId}/teams/{teamId}?api-version=7.1Team Members
Manage team membership.
Get Team Members
GET /{organization}/_apis/projects/{projectId}/teams/{teamId}/members?api-version=7.1Add Team Member
PUT /{organization}/_apis/projects/{projectId}/teams/{teamId}/members/{userId}?api-version=7.1Remove Team Member
DELETE /{organization}/_apis/projects/{projectId}/teams/{teamId}/members/{userId}?api-version=7.1Users & Groups Management
User and group administration.
List Users (Graph API)
GET https://vssps.dev.azure.com/{organization}/_apis/graph/users?api-version=7.1-preview.1Get User
GET https://vssps.dev.azure.com/{organization}/_apis/graph/users/{userDescriptor}?api-version=7.1-preview.1User descriptor format: aad.{guid} for Azure AD users
Create User
POST https://vssps.dev.azure.com/{organization}/_apis/graph/users?api-version=7.1-preview.1
Content-Type: application/json
{
"principalName": "user@example.com",
"displayName": "User Name",
"mailAddress": "user@example.com"
}Delete User
DELETE https://vssps.dev.azure.com/{organization}/_apis/graph/users/{userDescriptor}?api-version=7.1-preview.1List Groups
GET https://vssps.dev.azure.com/{organization}/_apis/graph/groups?api-version=7.1-preview.1Get Group
GET https://vssps.dev.azure.com/{organization}/_apis/graph/groups/{groupDescriptor}?api-version=7.1-preview.1Create Group
POST https://vssps.dev.azure.com/{organization}/_apis/graph/groups?api-version=7.1-preview.1
Content-Type: application/json
{
"displayName": "Architecture Team",
"description": "Team for architecture review"
}Delete Group
DELETE https://vssps.dev.azure.com/{organization}/_apis/graph/groups/{groupDescriptor}?api-version=7.1-preview.1Group Memberships
Manage group membership and nesting.
List Group Memberships
GET https://vssps.dev.azure.com/{organization}/_apis/graph/memberships/{subjectDescriptor}?api-version=7.1-preview.1Add Member to Group
PUT https://vssps.dev.azure.com/{organization}/_apis/graph/memberships/{subjectDescriptor}/{containerDescriptor}?api-version=7.1-preview.1Remove Member from Group
DELETE https://vssps.dev.azure.com/{organization}/_apis/graph/memberships/{subjectDescriptor}/{containerDescriptor}?api-version=7.1-preview.1Access Control Lists (ACLs)
Manage permissions using ACLs and security namespaces.
List Security Namespaces
Security namespaces define permission categories:
GET /{organization}/_apis/securitynamespaces?api-version=7.1Common namespaces:
- Build namespace
- Git Repositories namespace
- Work Items namespace
- Project namespace
- Analytics namespace
Query ACLs
GET /{organization}/_apis/accesscontrollists/{securityNamespaceId}?api-version=7.1With filters:
GET /{organization}/_apis/accesscontrollists/{securityNamespaceId}?tokens=repoV2/{projectId}/{repoId}&descriptors={groupDescriptor}&includeExtendedInfo=true&recurse=false&api-version=7.1Set ACLs (Grant Permissions)
POST /{organization}/_apis/accesscontrollists/{securityNamespaceId}?api-version=7.1
Content-Type: application/json
[
{
"token": "repoV2/{projectId}/{repoId}",
"merge": false,
"aces": [
{
"descriptor": "{groupDescriptor}",
"allow": 127,
"deny": 0,
"extendedInfo": {
"effectiveAllow": 127,
"effectiveDeny": 0,
"inheritedAllow": 0,
"inheritedDeny": 0
}
}
]
}
]Permission bits vary by namespace (see Azure DevOps documentation for specific values).
Remove ACLs (Deny Permissions)
DELETE /{organization}/_apis/accesscontrollists/{securityNamespaceId}?tokens=repoV2/{projectId}/{repoId}&descriptors={groupDescriptor}&api-version=7.1Processes
View and manage process templates.
List Processes
GET /{organization}/_apis/process/processes?api-version=7.1Get Process
GET /{organization}/_apis/process/processes/{processId}?api-version=7.1Create Process (Clone)
POST /{organization}/_apis/process/processes?api-version=7.1
Content-Type: application/json
{
"name": "CustomProcess",
"description": "Custom process based on Agile",
"parentProcessTypeId": "6b724908-ef14-45cf-84f8-768b5384da45",
"type": "inherited"
}Best Practices
Organization Management
1. Plan organization structure ahead 2. Use clear naming conventions 3. Document project purposes 4. Implement consistent processes 5. Archive old projects 6. Monitor organization growth 7. Plan capacity
Team Organization
1. Organize teams by function 2. Keep teams reasonably sized (3-9 people) 3. Assign clear team leads 4. Document team responsibilities 5. Plan cross-team collaboration 6. Review team structure regularly 7. Support team autonomy
User Management
1. Use Azure AD for authentication 2. Keep users current 3. Remove inactive users 4. Enforce strong passwords 5. Implement MFA 6. Document user roles 7. Audit user access regularly
Access Control
1. Follow least privilege principle 2. Use groups for permission management 3. Avoid individual user permissions 4. Regularly audit permissions 5. Document permission decisions 6. Use service principals for automation 7. Implement separation of duties
Security Policies
1. Enforce branch policies 2. Require code review 3. Implement build validation 4. Use status checks 5. Require work item linking 6. Audit sensitive operations 7. Monitor security events
Governance
1. Implement consistent processes 2. Document standards 3. Enforce naming conventions 4. Require change tracking 5. Plan retention policies 6. Audit compliance regularly 7. Report on metrics
Azure Pipelines - CI/CD & Automation
Azure Pipelines provides build automation, release management, and deployment orchestration using YAML pipelines, classic builds, and release definitions.
Build Definitions (Pipelines)
Manage YAML and classic pipeline definitions.
List Build Definitions
GET /{organization}/{project}/_apis/build/definitions?api-version=7.1Query options:
?name=MyPipeline- Filter by name?$top=50- Limit results?includeAllProperties=true- Include full definition
Get Build Definition
GET /{organization}/{project}/_apis/build/definitions/{definitionId}?api-version=7.1Create Build Definition
POST /{organization}/{project}/_apis/build/definitions?api-version=7.1
Content-Type: application/json
{
"name": "MyPipeline",
"type": "build",
"quality": "definition",
"description": "Build pipeline for my project",
"repository": {
"id": "{repositoryId}",
"type": "TfsGit",
"name": "MyRepo",
"url": "https://dev.azure.com/{org}/{project}/_git/MyRepo",
"defaultBranch": "refs/heads/main"
},
"process": {
"yamlFilename": "azure-pipelines.yml",
"type": 2
}
}Update Build Definition
PUT /{organization}/{project}/_apis/build/definitions/{definitionId}?api-version=7.1
Content-Type: application/jsonDelete Build Definition
DELETE /{organization}/{project}/_apis/build/definitions/{definitionId}?api-version=7.1Queuing & Managing Builds
Queue, monitor, and manage build executions.
Queue Build
POST /{organization}/{project}/_apis/build/builds?api-version=7.1
Content-Type: application/json
{
"definition": {
"id": 123
},
"sourceBranch": "refs/heads/main",
"sourceVersion": "{commitId}",
"priority": "normal",
"parameters": "{\"param1\":\"value1\",\"param2\":\"value2\"}"
}Get Builds
GET /{organization}/{project}/_apis/build/builds?api-version=7.1Filter options:
?definitions=1,2,3- Specific definitions?buildNumber=MyBuild.123- By build number?branchName=refs/heads/main- By branch?$orderBy=finishTime desc- Sort by finish time?statusFilter=completed,inProgress- By status
Get Specific Build
GET /{organization}/{project}/_apis/build/builds/{buildId}?api-version=7.1Update Build
PATCH /{organization}/{project}/_apis/build/builds/{buildId}?api-version=7.1
Content-Type: application/json
{
"status": "inProgress",
"keepForever": true,
"retainedByRelease": true
}Build statuses:
inProgress- Currently runningcompleted- Finishedcancelling- Being cancelledpostponed- Queued
Stop/Cancel Build
PATCH /{organization}/{project}/_apis/build/builds/{buildId}?api-version=7.1
Content-Type: application/json
{
"status": "cancelling"
}Delete Build
DELETE /{organization}/{project}/_apis/build/builds/{buildId}?api-version=7.1Build Logs & Artifacts
Access build logs, timelines, and artifacts.
Get Build Logs
GET /{organization}/{project}/_apis/build/builds/{buildId}/logs?api-version=7.1Each log entry includes:
- Log ID
- Log file URL
Get Specific Log
GET /{organization}/{project}/_apis/build/builds/{buildId}/logs/{logId}?api-version=7.1Get Build Timeline
Timeline shows task execution sequence and duration:
GET /{organization}/{project}/_apis/build/builds/{buildId}/timeline?api-version=7.1Get Build Artifacts
GET /{organization}/{project}/_apis/build/builds/{buildId}/artifacts?api-version=7.1Response includes artifact names and download URLs:
{
"value": [
{
"id": 1,
"name": "drop",
"resource": {
"downloadUrl": "..."
}
}
]
}Release Management
Manage release definitions and deployments.
Note: Release endpoints use vsrm.dev.azure.com instead of dev.azure.com
List Release Definitions
GET https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/definitions?api-version=7.1Get Release Definition
GET https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/definitions/{definitionId}?api-version=7.1Create Release Definition
POST https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/definitions?api-version=7.1
Content-Type: application/json
{
"name": "MyRelease",
"description": "Release definition",
"environments": [
{
"name": "Development",
"deployPhases": [],
"environmentOptions": {}
}
],
"artifacts": [
{
"type": "Build",
"alias": "drop",
"definitionReference": {
"definition": {
"id": "{buildDefinitionId}"
}
}
}
]
}Releases (Deployments)
Create and manage release instances.
Create Release
POST https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases?api-version=7.1
Content-Type: application/json
{
"definitionId": 1,
"description": "Release triggered from API",
"artifacts": [
{
"alias": "drop",
"instanceReference": {
"id": "{buildId}"
}
}
]
}Get Releases
GET https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases?api-version=7.1Filter options:
?definitionId=1- By definition?statusFilter=active,draft- By status?$orderBy=modifiedOn desc- Sort by modified date
Get Specific Release
GET https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases/{releaseId}?api-version=7.1Update Release
PATCH https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases/{releaseId}?api-version=7.1
Content-Type: application/json
{
"status": "active"
}Environment & Deployment Management
Manage release environments and deployments.
Get Release Environment
GET https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases/{releaseId}/environments/{environmentId}?api-version=7.1Update Release Environment
Deploy to or manage an environment:
PATCH https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases/{releaseId}/environments/{environmentId}?api-version=7.1
Content-Type: application/json
{
"status": "inProgress",
"scheduledDeploymentTime": "2025-01-15T10:00:00Z"
}Environment statuses:
notStarted- PendinginProgress- Currently deployingsucceeded- Successfulpartiallysucceeded- Some tasks failedfailed- Failedcanceled- Cancelled
Approvals
Manage release approvals.
Get Approvals
GET https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/approvals?api-version=7.1Filter options:
?releaseId={releaseId}- By release?statusFilter=pending,approved- By status
Update Approval
PATCH https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/approvals/{approvalId}?api-version=7.1
Content-Type: application/json
{
"status": "approved",
"comments": "Approved - ready for deployment"
}Approval statuses:
pending- Awaiting approvalapproved- Approvedrejected- Rejectedreassigned- Reassigneddeferred- Deferred
Agent Pools & Management
Manage build and release agents.
List Agent Pools
GET /{organization}/_apis/distributedtask/pools?api-version=7.1Get Specific Pool
GET /{organization}/_apis/distributedtask/pools/{poolId}?api-version=7.1Create Agent Pool
POST /{organization}/_apis/distributedtask/pools?api-version=7.1
Content-Type: application/json
{
"name": "MyPoolName",
"autoProvision": false
}List Agents in Pool
GET /{organization}/_apis/distributedtask/pools/{poolId}/agents?api-version=7.1Get Specific Agent
GET /{organization}/_apis/distributedtask/pools/{poolId}/agents/{agentId}?api-version=7.1Update Agent
PATCH /{organization}/_apis/distributedtask/pools/{poolId}/agents/{agentId}?api-version=7.1
Content-Type: application/json
{
"enabled": true
}Variable Groups & Pipeline Variables
Manage variables across pipelines.
List Variable Groups
GET /{organization}/{project}/_apis/distributedtask/variablegroups?api-version=7.1Get Variable Group
GET /{organization}/{project}/_apis/distributedtask/variablegroups/{groupId}?api-version=7.1Create Variable Group
POST /{organization}/{project}/_apis/distributedtask/variablegroups?api-version=7.1
Content-Type: application/json
{
"name": "MyVariableGroup",
"description": "Shared variables",
"variables": {
"var1": {
"value": "value1"
},
"secretVar": {
"value": "secretValue",
"isSecret": true
}
}
}Update Variable Group
PUT /{organization}/{project}/_apis/distributedtask/variablegroups/{groupId}?api-version=7.1
Content-Type: application/json
{
"id": {groupId},
"name": "UpdatedName",
"variables": {...}
}Task Groups & Reusable Components
Create reusable task groups for pipeline composition.
List Task Groups
GET /{organization}/{project}/_apis/distributedtask/taskgroups?api-version=7.1Get Task Group
GET /{organization}/{project}/_apis/distributedtask/taskgroups/{taskGroupId}?api-version=7.1Service Endpoints (Connections)
Manage service connections for deployment targets.
List Service Endpoints
GET /{organization}/{project}/_apis/serviceendpoint/endpoints?api-version=7.1Get Service Endpoint
GET /{organization}/{project}/_apis/serviceendpoint/endpoints/{endpointId}?api-version=7.1Create Service Endpoint
POST /{organization}/{project}/_apis/serviceendpoint/endpoints?api-version=7.1
Content-Type: application/json
{
"name": "MyAzureSubscription",
"type": "azurerm",
"url": "https://management.azure.com/",
"authorization": {
"parameters": {
"tenantId": "{tenantId}",
"clientId": "{clientId}",
"clientSecret": "{clientSecret}",
"subscriptionId": "{subscriptionId}",
"subscriptionName": "My Subscription"
},
"scheme": "ServicePrincipal"
},
"isShared": false
}Common endpoint types:
azurerm- Azure Resource Managergithub- GitHubkubernetes- Kubernetesdocker- Docker Registrynpm- npm Registrynuget- NuGet
Best Practices
Pipeline Design
1. Use YAML pipelines for version control 2. Keep pipelines simple and focused 3. Use templates for reusable components 4. Implement proper branching strategies 5. Use meaningful pipeline names 6. Document parameters and variables
CI/CD Workflow
1. Build on every commit to main 2. Run tests automatically 3. Gate production deployments with approvals 4. Implement blue-green or canary deployments 5. Monitor and alert on deployment failures 6. Keep deployment logs for audit 7. Automate rollback procedures
Security
1. Use managed identities where possible 2. Store secrets in Key Vault 3. Limit agent access to sensitive resources 4. Use separate pools for different environments 5. Implement PAT rotation 6. Audit and log all deployments 7. Use service principals with minimal permissions
Performance & Cost
1. Use hosted agents for standard workloads 2. Self-host agents for long-running builds 3. Cache dependencies 4. Parallelize builds 5. Clean up old build artifacts 6. Monitor agent pool utilization 7. Use demand-based agent scaling
Monitoring & Troubleshooting
1. Check build logs for errors 2. Review pipeline execution timeline 3. Monitor agent status and health 4. Track build duration trends 5. Set up alerts for failures 6. Use diagnostic logs 7. Test locally before committing
Azure Repos - Version Control & Git
Azure Repos provides Git and TFVC repository management with comprehensive pull request workflow, branch policies, and commit tracking.
Repositories - Management
Work with Git repositories in Azure DevOps.
List Repositories
GET /{organization}/{project}/_apis/git/repositories?api-version=7.1Get Repository
GET /{organization}/{project}/_apis/git/repositories/{repositoryId}?api-version=7.1Create Repository
POST /{organization}/{project}/_apis/git/repositories?api-version=7.1
Content-Type: application/json
{
"name": "MyRepo",
"project": {
"id": "{projectId}"
}
}Delete Repository
DELETE /{organization}/{project}/_apis/git/repositories/{repositoryId}?api-version=7.1Commits & History
Query commits and file changes.
Get Commits
GET /{organization}/{project}/_apis/git/repositories/{repositoryId}/commits?api-version=7.1Query options:
?branch=refs/heads/main- Filter by branch?searchCriteria.itemVersion.versionType=branch&searchCriteria.itemVersion.version=main- Branch specification?$top=100&$skip=200- Pagination
Get Specific Commit
GET /{organization}/{project}/_apis/git/repositories/{repositoryId}/commits/{commitId}?api-version=7.1Get Commit Changes
View files modified in a commit:
GET /{organization}/{project}/_apis/git/repositories/{repositoryId}/commits/{commitId}/changes?api-version=7.1Response includes:
- File path
- Change type (add, edit, delete, rename)
- File size
- Line counts
Branches & References
Manage branches and Git references.
Get All Branches
GET /{organization}/{project}/_apis/git/repositories/{repositoryId}/refs?filter=heads/&api-version=7.1Get Specific Branch
GET /{organization}/{project}/_apis/git/repositories/{repositoryId}/refs?filter=heads/main&api-version=7.1Create Branch
POST /{organization}/{project}/_apis/git/repositories/{repositoryId}/refs?api-version=7.1
Content-Type: application/json
[
{
"name": "refs/heads/feature-branch",
"oldObjectId": "0000000000000000000000000000000000000000",
"newObjectId": "{commitId}"
}
]Delete Branch
POST /{organization}/{project}/_apis/git/repositories/{repositoryId}/refs?api-version=7.1
Content-Type: application/json
[
{
"name": "refs/heads/old-branch",
"oldObjectId": "{currentCommitId}",
"newObjectId": "0000000000000000000000000000000000000000"
}
]Pull Requests - Core Operations
Manage pull request workflow.
Create Pull Request
POST /{organization}/{project}/_apis/git/repositories/{repositoryId}/pullrequests?api-version=7.1
Content-Type: application/json
{
"sourceRefName": "refs/heads/feature",
"targetRefName": "refs/heads/main",
"title": "Add new feature",
"description": "This PR adds the new feature"
}Get Pull Requests
GET /{organization}/{project}/_apis/git/repositories/{repositoryId}/pullrequests?api-version=7.1Filter options:
?searchCriteria.status=active- Active PRs only?searchCriteria.status=all- All PRs?searchCriteria.reviewerId={userId}- Filter by reviewer?searchCriteria.creatorId={userId}- Filter by creator
Get Specific Pull Request
GET /{organization}/{project}/_apis/git/repositories/{repositoryId}/pullrequests/{pullRequestId}?api-version=7.1Update Pull Request
PATCH /{organization}/{project}/_apis/git/repositories/{repositoryId}/pullrequests/{pullRequestId}?api-version=7.1
Content-Type: application/json
{
"status": "completed",
"title": "Updated PR title",
"description": "Updated description"
}Complete/Merge Pull Request
PATCH /{organization}/{project}/_apis/git/repositories/{repositoryId}/pullrequests/{pullRequestId}?api-version=7.1
Content-Type: application/json
{
"status": "completed",
"lastMergeSourceCommit": {
"commitId": "{sourceCommitId}"
},
"completionOptions": {
"mergeCommitMessage": "Merged via API",
"deleteSourceBranch": true,
"squashMerge": false,
"transitionWorkItems": true
}
}Pull Request Reviews
Manage reviewers and review process.
Add Reviewer
PUT /{organization}/{project}/_apis/git/repositories/{repositoryId}/pullrequests/{pullRequestId}/reviewers/{reviewerId}?api-version=7.1
Content-Type: application/json
{
"vote": 0,
"isFlagged": false
}Vote values:
-10- Rejected-5- Waiting for author0- No response (default)5- Approved with suggestions10- Approved
Get Reviewers
GET /{organization}/{project}/_apis/git/repositories/{repositoryId}/pullrequests/{pullRequestId}/reviewers?api-version=7.1Get PR Work Items
View linked work items:
GET /{organization}/{project}/_apis/git/repositories/{repositoryId}/pullrequests/{pullRequestId}/workitems?api-version=7.1Pull Request Comments & Discussions
Manage review threads and comments.
Get PR Threads (Comments)
GET /{organization}/{project}/_apis/git/repositories/{repositoryId}/pullrequests/{pullRequestId}/threads?api-version=7.1Add Comment Thread
POST /{organization}/{project}/_apis/git/repositories/{repositoryId}/pullrequests/{pullRequestId}/threads?api-version=7.1
Content-Type: application/json
{
"comments": [
{
"content": "This looks good, but consider optimizing this loop.",
"commentType": 1
}
],
"status": 1,
"threadContext": {
"filePath": "/src/file.ts",
"leftFileStart": 45,
"leftFileEnd": 45,
"rightFileStart": 45,
"rightFileEnd": 45
}
}Update Thread
PATCH /{organization}/{project}/_apis/git/repositories/{repositoryId}/pullrequests/{pullRequestId}/threads/{threadId}?api-version=7.1
Content-Type: application/json
{
"status": 1,
"comments": [
{
"id": {commentId},
"content": "Updated comment"
}
]
}File & Path Operations
Access repository files and directory contents.
Get Item (File or Folder)
GET /{organization}/{project}/_apis/git/repositories/{repositoryId}/items?path=/src/file.ts&api-version=7.1Get Item Content (File Download)
GET /{organization}/{project}/_apis/git/repositories/{repositoryId}/items?path=/src/file.ts&download=true&api-version=7.1Get Items Batch
Query multiple files efficiently:
POST /{organization}/{project}/_apis/git/repositories/{repositoryId}/itemsbatch?api-version=7.1
Content-Type: application/json
{
"itemDescriptors": [
{"path": "/file1.txt", "version": "main"},
{"path": "/file2.txt", "version": "main"},
{"path": "/config.json", "version": "main"}
]
}Branch Policies & Protection
Manage branch policies and protection rules.
Get Policy Configurations
GET /{organization}/{project}/_apis/policy/configurations?api-version=7.1Create Policy
POST /{organization}/{project}/_apis/policy/configurations?api-version=7.1
Content-Type: application/json
{
"type": {
"id": "{policyTypeId}"
},
"isEnabled": true,
"isBlocking": true,
"settings": {
"scope": [
{
"repositoryId": "{repositoryId}",
"refName": "refs/heads/main",
"matchKind": "exact"
}
],
"minimumApproverCount": 2,
"creatorVoteCounts": false,
"resetOnSourcePush": true,
"resetVotes": true
}
}Common policy types:
- Minimum reviewers
- Build validation
- Status checks
- Comment requirements
- Case enforcement
- Reserved names
Pushes
View push history and operations.
Get Pushes
GET /{organization}/{project}/_apis/git/repositories/{repositoryId}/pushes?api-version=7.1Query options:
?searchCriteria.fromDate=2025-01-01T00:00:00Z- Filter by date range?searchCriteria.pusherId={userId}- Filter by pusher
Get Specific Push
GET /{organization}/{project}/_apis/git/repositories/{repositoryId}/pushes/{pushId}?api-version=7.1Best Practices
Repository Management
1. Use clear repository naming conventions 2. Implement appropriate branch policies 3. Document repository purposes 4. Organize repositories by team or project domain 5. Regularly archive unused repositories 6. Use read-only mirrors for sensitive code
Pull Request Workflow
1. Require minimum reviewers (typically 2) 2. Enforce build/CI validation 3. Use branch policies for protection 4. Write descriptive PR titles and descriptions 5. Link related work items 6. Use squash merge for feature branches 7. Delete source branch after merge 8. Automate PR closure of resolved issues
Commit Best Practices
1. Write descriptive commit messages 2. Use conventional commit format (feat:, fix:, docs:, etc.) 3. Keep commits atomic and focused 4. Reference work items in commits 5. Avoid committing secrets or credentials
Review Best Practices
1. Set clear review expectations 2. Provide constructive feedback 3. Approve or request changes decisively 4. Resolve threads explicitly 5. Don't approve just to get PR merged 6. Consider code quality, security, and maintainability
Branching Strategy
1. Use main/develop/feature branch strategy 2. Protect main branch with policies 3. Use meaningful branch names 4. Clean up merged branches 5. Consider trunk-based development for fast teams
Azure Test Plans - Testing & Quality Management
Azure Test Plans provides test management, test execution, and quality tracking for manual and automated testing scenarios.
Test Plans
Manage test plan organization and structure.
List Test Plans
GET /{organization}/{project}/_apis/testplan/plans?api-version=7.1Query options:
?$orderBy=name- Sort by name?$top=50- Limit results?filterActivePlans=true- Active plans only
Get Test Plan
GET /{organization}/{project}/_apis/testplan/plans/{planId}?api-version=7.1Create Test Plan
POST /{organization}/{project}/_apis/testplan/plans?api-version=7.1
Content-Type: application/json
{
"name": "Website Regression Testing",
"description": "Test plan for website functionality",
"startDate": "2025-01-15T00:00:00Z",
"endDate": "2025-01-31T23:59:59Z"
}Update Test Plan
PATCH /{organization}/{project}/_apis/testplan/plans/{planId}?api-version=7.1
Content-Type: application/json
{
"name": "Updated Plan Name",
"description": "Updated description",
"state": "Active"
}Test Suites
Organize tests into logical suites within plans.
List Test Suites
GET /{organization}/{project}/_apis/testplan/plans/{planId}/suites?api-version=7.1Get Test Suite
GET /{organization}/{project}/_apis/testplan/plans/{planId}/suites/{suiteId}?api-version=7.1Create Test Suite
POST /{organization}/{project}/_apis/testplan/plans/{planId}/suites?api-version=7.1
Content-Type: application/json
{
"name": "Login Functionality",
"suiteType": "StaticTestSuite",
"parentSuite": {
"id": "{parentSuiteId}"
}
}Suite types:
StaticTestSuite- Manual suiteDynamicTestSuite- Query-based suiteRequirementTestSuite- Linked to requirements
Update Test Suite
PATCH /{organization}/{project}/_apis/testplan/plans/{planId}/suites/{suiteId}?api-version=7.1
Content-Type: application/json
{
"name": "Updated Suite Name",
"inheritDefaultConfigurations": true
}Test Cases
Add and manage test cases within suites.
List Test Cases in Suite
GET /{organization}/{project}/_apis/testplan/plans/{planId}/suites/{suiteId}/testcases?api-version=7.1Get Test Case
GET /{organization}/{project}/_apis/testplan/plans/{planId}/suites/{suiteId}/testcases/{testCaseId}?api-version=7.1Add Test Case to Suite
POST /{organization}/{project}/_apis/testplan/plans/{planId}/suites/{suiteId}/testcases?api-version=7.1
Content-Type: application/json
{
"workItem": {
"id": "{workItemId}"
}
}Create Test Case (as Work Item)
Test cases are work items of type "Test Case":
POST /{organization}/{project}/_apis/wit/workitems/$TestCase?api-version=7.1
Content-Type: application/json-patch+json
[
{
"op": "add",
"path": "/fields/System.Title",
"value": "Test user login with SSO"
},
{
"op": "add",
"path": "/fields/System.Description",
"value": "Verify user can log in using single sign-on"
},
{
"op": "add",
"path": "/fields/Microsoft.VSTS.TCM.Steps",
"value": "<steps id='0' last='2'><step id='1' type='ActionStep'><parameterizedString isformatted='true'>1. Navigate to login page</parameterizedString><parameterizedString isformatted='true'>SSO login option displayed</parameterizedString></step><step id='2' type='ActionStep'><parameterizedString isformatted='true'>2. Click SSO button</parameterizedString><parameterizedString isformatted='true'>User logged in successfully</parameterizedString></step></steps>"
}
]Test Runs & Results
Manage test execution and result tracking.
Create Test Run
POST /{organization}/{project}/_apis/test/runs?api-version=7.1
Content-Type: application/json
{
"name": "Smoke Test Run",
"automated": false,
"build": {
"id": "{buildId}"
},
"releaseUri": "vstfs:///ReleaseManagement/Release/1",
"releaseEnvironmentUri": "vstfs:///ReleaseManagement/Release/1/environments/1",
"startedDate": "2025-01-15T10:00:00Z",
"completeDate": "2025-01-15T11:00:00Z",
"dueDate": "2025-01-15T12:00:00Z",
"state": "InProgress",
"planId": "{planId}",
"isAutomated": false
}Get Test Runs
GET /{organization}/{project}/_apis/test/runs?api-version=7.1Filter options:
?buildIds={buildId}- By build?automated=true- Automated tests only?$top=100- Limit results
Get Specific Test Run
GET /{organization}/{project}/_apis/test/runs/{runId}?api-version=7.1Update Test Run
PATCH /{organization}/{project}/_apis/test/runs/{runId}?api-version=7.1
Content-Type: application/json
{
"state": "Completed",
"completeDate": "2025-01-15T11:30:00Z"
}Test run states:
NotStarted- Created but not startedInProgress- Currently runningCompleted- FinishedAborted- Stopped before completionNotRelevant- Not applicable
Get Test Results
GET /{organization}/{project}/_apis/test/runs/{runId}/results?api-version=7.1Get Specific Test Result
GET /{organization}/{project}/_apis/test/runs/{runId}/results/{resultId}?api-version=7.1Add Test Results
POST /{organization}/{project}/_apis/test/runs/{runId}/results?api-version=7.1
Content-Type: application/json
[
{
"testCase": {
"id": "{testCaseId}"
},
"outcome": "Passed",
"startedDate": "2025-01-15T10:00:00Z",
"completedDate": "2025-01-15T10:05:00Z",
"durationInMs": 300000,
"comment": "Test executed successfully"
}
]Update Test Results
PATCH /{organization}/{project}/_apis/test/runs/{runId}/results?api-version=7.1
Content-Type: application/json
[
{
"id": {resultId},
"outcome": "Failed",
"comment": "Assertion failed on line 45",
"errorMessage": "Expected value was not found"
}
]Test outcomes:
Passed- Test passedFailed- Test failedNotExecuted- Test not runBlocked- Test blockedNotApplicable- Not applicablePaused- PausedInProgress- Currently executing
Test Configurations
Manage test configurations (browser, OS, device combinations).
List Configurations
GET /{organization}/{project}/_apis/testplan/configurations?api-version=7.1Get Configuration
GET /{organization}/{project}/_apis/testplan/configurations/{configurationId}?api-version=7.1Create Configuration
POST /{organization}/{project}/_apis/testplan/configurations?api-version=7.1
Content-Type: application/json
{
"name": "Chrome on Windows 10",
"description": "Configuration for Chrome browser on Windows 10",
"values": [
{
"configurationVariableId": "{varId1}",
"value": "Chrome"
},
{
"configurationVariableId": "{varId2}",
"value": "Windows 10"
}
]
}Query Test Results
Analyze test execution history and trends.
Get Test Summary
GET /{organization}/{project}/_apis/test/runs/{runId}/statistics?api-version=7.1Response includes:
- Total tests
- Passed count
- Failed count
- Not executed count
Get Test Trend
Query results over time:
GET /{organization}/{project}/_apis/test/ResultTrendService/QueryResultTrendForBuild?buildId={buildId}&api-version=7.1-previewBest Practices
Test Planning
1. Create comprehensive test plans before development 2. Organize tests logically in suites 3. Link tests to work items/requirements 4. Define clear pass/fail criteria 5. Document test steps explicitly 6. Use configurations for cross-platform testing 7. Keep test data up-to-date
Test Case Design
1. Write clear, concise test names 2. Break tests into logical steps 3. Include expected results for each step 4. Test one thing per test case 5. Avoid test interdependencies 6. Use parameterized tests for variations 7. Link to requirements/user stories
Test Execution
1. Run tests on every build 2. Prioritize critical path testing 3. Use configurations for browsers/OS 4. Capture failure details 5. Include environment information 6. Log execution time for performance tracking 7. Archive results for compliance
Defect Tracking
1. Link failed tests to bugs 2. Include reproduction steps 3. Attach screenshots/logs 4. Document environment details 5. Assign defect priority 6. Track defect resolution 7. Prevent regression with tests
Continuous Integration
1. Run automated tests in pipeline 2. Fail build on test failures 3. Track test coverage trends 4. Run tests in parallel 5. Cache test data 6. Clean up test runs regularly 7. Generate test reports
Reporting & Metrics
1. Track pass/fail rates 2. Monitor test coverage 3. Measure bug escape rate 4. Track defect density 5. Calculate test effectiveness 6. Monitor execution time trends 7. Share metrics with stakeholders