Navigation: Home > API Reference > Integration Patterns
Integration Patterns provide guidance on how to effectively combine multiple Azure DevOps APIs to solve common real-world scenarios. While individual API documentation focuses on specific methods and their usage, integration patterns demonstrate how these APIs work together to create comprehensive solutions.
The Integration Patterns documentation is designed to:
This documentation covers key integration patterns between the most commonly used Azure DevOps APIs:
Integration patterns address several common scenarios in Azure DevOps workflows:
Link work items to code changes, builds, and releases to maintain a complete history of how requirements are implemented and deployed.
Trigger actions in one service based on events in another, such as creating a build when code is pushed or updating a work item when a build completes.
Gather data across multiple services to create comprehensive reports that provide insights across the entire development lifecycle.
Keep information consistent across different systems, ensuring that changes in one system are reflected in others.
Coordinate complex processes across multiple services to implement end-to-end workflows that span the entire development lifecycle.
To use these integration patterns, you'll need:
To implement these integration patterns, first establish a connection to your Azure DevOps organization and obtain the necessary API clients:
import * as azdev from "azure-devops-node-api";
// Connection setup
const orgUrl = "https://dev.azure.com/yourorganization";
const token = "your-personal-access-token";
const authHandler = azdev.getPersonalAccessTokenHandler(token);
const connection = new azdev.WebApi(orgUrl, authHandler);
// Get API clients for integration
const workItemTrackingApi = await connection.getWorkItemTrackingApi();
const gitApi = await connection.getGitApi();
const buildApi = await connection.getBuildApi();
// Now you can implement the integration patterns
// using these API clients together
The following describes the relationships between the primary APIs covered in these integration patterns:
API Relationship Structure:
For a detailed breakdown of how specific methods relate to each other, see the API Cross-Reference Table.
The Work Item Tracking API provides methods for managing work items:
The Git API provides methods for working with repositories and code:
The Build API provides methods for managing build pipelines:
When implementing integration patterns, consider these best practices:
Implement robust error handling that accounts for failures in any of the integrated APIs. Consider how to handle partial failures and ensure your application can recover gracefully.
Consider how to maintain consistency when operations span multiple services. Implement compensating transactions or idempotent operations to handle failures.
Minimize API calls by batching operations where possible. Use efficient querying patterns and cache results when appropriate to reduce load on the server.
Be aware of API rate limits, especially when making many cross-service calls. Implement retry logic with exponential backoff to handle rate limiting gracefully.
Ensure your authentication token has all necessary scopes for the APIs you're integrating. Use the principle of least privilege to minimize security risks.
Design integrations to be safely retryable in case of failures. Ensure that operations can be repeated without causing unintended side effects.