Skill 詳細
azure-devops
Relevant for Azure DevOps API automation, but vendor-specific and integration-focused.
使用前に確認
自動レビューは関連性のみを確認し、安全性や推奨を保証しません。使用前に出典の説明を読んでください。
SKILL.md
これはレビュー時に保存された抜粋です。完全で最新の内容は外部ソースを確認してください。
---
name: azure-devops
description: Comprehensive skill for working with Azure DevOps REST API across all services including Boards (work items, queries, backlogs), Repos (Git, pull requests, commits), Pipelines (builds, releases, deployments), Test Plans, Artifacts, organizations, projects, security, extensions, and more. Use when implementing Azure DevOps integrations, automating DevOps workflows, or building applications that interact with Azure DevOps services.
version: 1.0
---
# 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
```http
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
```http
GET https://dev.azure.com/{organization}/{project}/_apis/{resource}?api-version=7.1
Authorization: Basic {encoded-PAT}
Content-Type: application/json
```
## Core Services
Azure DevOps is organized into major service areas. Each area has its own set of REST APIs:
### Azure Boards - Work Item Tracking
**Work Items**
- **Create work item:** `POST /{organization}/{project}/_apis/wit/workitems/${type}?api-version=7.1`
- **Get work item:** `GET /{organization}/{project}/_apis/wit/workitems/{id}?api-version=7.1`
- **Update work item:** `PATCH /{organization}/{project}/_apis/wit/workitems/{id}?api-version=7.1`
- **Delete work item:** `DELETE /{organization}/{project}/_apis/wit/workitems/{id}?api-version=7.1`
Request body uses JSON Patch format:
```json
[
{
"op": "add",
"path": "/fields/System.Title",
"value": "New bug report"
},
{
"op": "add",
"path": "/fields/System.AssignedTo",
"value": "[email protected]"
}
]
```
**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`
```json
{
"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}/{pGitHub で全文を読む (外部ページ)