azure-devops-node-api

Microsoft's official Node.js client for the Azure DevOps and TFS REST APIs

SDK
npm
v15.1.2
502stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
69/100Good
Development Activity68
Maintenance40
Community88
Maturity60
Momentum20

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
56/100Fair
Architecture65
Code Quality60
Innovation45
Learning Curve55

azure-devops-node-api is Microsoft’s official Node.js/TypeScript client for the Azure DevOps Services and Team Foundation Server REST APIs. A single WebApi entry point wires together per-service clients — Git, Build, Release, Work Item Tracking, Test, Pipelines, Wiki, Task Agent, and dozens more — each generated from the same API surface used internally at Microsoft, with pluggable auth handlers for basic credentials, bearer tokens, NTLM, and personal access tokens. It’s the standard way to script or automate Azure DevOps organizations, projects, pipelines, and work items from Node.js instead of calling the REST endpoints directly.

What You Get

  • A WebApi root client that authenticates via a pluggable handler (PAT, basic, bearer token, or NTLM) and constructs per-service clients from one place
  • Dozens of typed service clients (GitApi, BuildApi, WorkItemTrackingApi, ReleaseApi, PipelinesApi, TestApi, WikiApi, and more) covering nearly the full Azure DevOps REST surface
  • TypeScript interfaces for every request/response shape, generated to stay in sync with the underlying Azure DevOps API contracts
  • Runnable samples under samples/ demonstrating common operations against real Azure DevOps organizations

Common Use Cases

  • Automating Azure DevOps work item creation, updates, and queries from CI/CD scripts or bots
  • Building custom tooling that reads or triggers Azure Pipelines builds and releases programmatically
  • Writing integrations that sync Git repository, pull request, or wiki data between Azure DevOps and external systems
  • Scripting bulk administrative operations across Azure DevOps projects (permissions, service endpoints, dashboards)

Under The Hood

Architecture - api/WebApi.ts is the composition root: it imports every per-service API module (GitApi, BuildApi, WorkItemTrackingApi, PipelinesApi, and roughly 30 others), each of which extends a shared ClientApiBases/AdoHttpClientBases layer built on typed-rest-client’s RestClient, and exposes factory methods like getGitApi() that lazily construct and cache each service client using the handler passed to the top-level WebApi constructor; a separate VsoClient resolves Azure DevOps’ versioned, location-based routing (API endpoints are looked up by GUID via the LocationsApi rather than hardcoded URLs). Tech Stack - TypeScript compiled to CommonJS, built on Microsoft’s own typed-rest-client HTTP layer plus tunnel for proxy support; auth handlers in api/handlers/ (basiccreds.ts, bearertoken.ts, ntlm.ts, personalaccesstoken.ts) implement a common IRequestHandler interface so any client can swap credential types without code changes elsewhere. Code Quality - Roughly 73,000 lines across ~35 generated API modules under api/, with a test/units/tests.ts unit suite and a separate samples/ directory of runnable scripts serving as executable documentation; the bulk of the code is machine-generated from Azure DevOps’ internal API definitions, so hand-written logic is concentrated in WebApi.ts, the handlers, and VsoClient/RestClient base classes rather than spread evenly across the generated service files. API Design - The single WebApi entry point with per-service getter methods (getGitApi(), getBuildApi(), etc.) gives a consistent, discoverable surface across dozens of services, though the generated nature of most clients means method names and parameter shapes mirror the raw REST API closely rather than offering higher-level, hand-tuned ergonomics.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search