Azure DevOps Client for Node.js
Installations
npm install azure-devops-node-api
Developer Guide
Typescript
Yes
Module System
CommonJS
Min. Node Version
>= 16.0.0
Node Version
16.20.2
NPM Version
8.19.4
Score
97.9
Supply Chain
99
Quality
85.6
Maintenance
100
Vulnerability
98.9
License
Releases
Contributors
Languages
TypeScript (99.48%)
JavaScript (0.52%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
Microsoft
Download Statistics
Total Downloads
67,384,967
Last Day
38,007
Last Week
621,075
Last Month
2,279,291
Last Year
24,560,600
GitHub Statistics
NOASSERTION License
472 Stars
301 Commits
231 Forks
102 Watchers
69 Branches
133 Contributors
Updated on Feb 14, 2025
Package Meta Information
Latest Version
14.1.0
Package Id
azure-devops-node-api@14.1.0
Unpacked Size
4.47 MB
Size
552.54 kB
File Count
164
NPM Version
8.19.4
Node Version
16.20.2
Published on
Sep 27, 2024
Total Downloads
Cumulative downloads
Total Downloads
67,384,967
Last Day
3.4%
38,007
Compared to previous day
Last Week
8.4%
621,075
Compared to previous week
Last Month
34%
2,279,291
Compared to previous month
Last Year
29.5%
24,560,600
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
2
Azure DevOps Client for Node.js
Integrate with Azure DevOps from your Node.js apps.
Install the library
npm install azure-devops-node-api --save
News
vso-node-api has been renamed and released as azure-devops-node-api
Get started
Samples
See samples for complete coding examples
Install the library
npm install azure-devops-node-api --save
Create a connection
1import * as azdev from "azure-devops-node-api"; 2 3// your collection url 4let orgUrl = "https://dev.azure.com/yourorgname"; 5 6let token: string = process.env.AZURE_PERSONAL_ACCESS_TOKEN; 7 8let authHandler = azdev.getPersonalAccessTokenHandler(token); 9let connection = new azdev.WebApi(orgUrl, authHandler);
Please note that some API's (e.g. ProfileApi) can't be hit at the org level, and has to be hit at the deployment level, so url should be structured like https://vssps.dev.azure.com/{yourorgname}
Get an instance of a client
1import * as ba from "azure-devops-node-api/BuildApi"; 2 3let build: ba.IBuildApi = await connection.getBuildApi();
Available clients
These clients are available:
- Advanced Security Alert
- Advanced Security Management
- Build
- Core
- Dashboard
- ExtensionManagement
- FeatureManagement
- FileContainer
- Git
- Locations
- Notification
- Policy
- Profile
- ProjectAnalysis
- Release
- SecurityRoles
- TaskAgent
- Task
- Test
- TestPlan
- TestResults
- Tfvc
- Wiki
- Work
- WorkItemTracking
- WorkItemTrackingProcess
- WorkItemTrackingProcessDefinitions
Use the client
Coding is easy using linear coding with async/await in TypeScript
1import * as bi from "azure-devops-node-api/interfaces/BuildInterfaces"; 2 3async function run() { 4 let project: string = "myProject"; 5 let defs: bi.DefinitionReference[] = await build.getDefinitions(project); 6 7 defs.forEach((defRef: bi.DefinitionReference) => { 8 console.log(`${defRef.name} (${defRef.id})`); 9 }); 10} 11 12run();
APIs
To see what APIs are available, see the appropriate client interface. For example, GitApi.ts
More detailed information for the endpoints of each API can be found at https://docs.microsoft.com/en-us/rest/api/vsts/?view=vsts-rest-4.1
Running Samples
Pre-reqs: Node >= 16 and typescript (tsc) >= 4
Run npm install
first
Set environment variables using set or export:
1API_URL=https://dev.azure.com/yourorgname 2 3// use your token 4API_TOKEN=cbdeb34vzyuk5l4gxc4qfczn3lko3avfkfqyb47etahq6axpcqha 5 6API_PROJECT=myProject
Run samples:
1$ npm run samples
Run a specific sample:
1$ npm run samples -- projectAnalysis
Node support
v14 and above - [current, maintained] - Supports node 16 and above
v13 and below - End Of Life, for Node < 16, contains security vulnerabilities, use at your own risk
API and TFS Mapping
Below you'll find a quick mapping of azure-devops-node-api versions and their corresponding TFS releases. All API versions will work on the TFS version mentioned as well as later TFS versions.
TFS Version | Node API VERSION |
---|---|
Azure DevOps Server vNext | 8.0.0 |
Azure DevOps Server 2019 | 7.0.0 |
TFS 2018 Update 2 | 6.6.2 |
TFS 2017 Update 2 | 6.2.8-preview |
TFS 2017 Update 1 | 5.1.2 |
TFS 2017 RTW | 5.0.0 |
TFS 2015 Update 2 | 0.7.0 |
Contributing
To contribute to this repository, see the contribution guide
Issues
Feel free to file an issue in this repo.
Do you think there might be a security issue? Have you been phished or identified a security vulnerability? Please don't report it here - let us know by sending an email to secure@microsoft.com.
Code of Conduct
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

No vulnerabilities found.
Reason
security policy file detected
Details
- Info: security policy file detected: SECURITY.md:1
- Info: Found linked content: SECURITY.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1
- Info: Found text in security policy: SECURITY.md:1
Reason
no dangerous workflow patterns detected
Reason
all changesets reviewed
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Warn: project license file does not contain an FSF or OSI license.
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/autoAssignABTT.yml:1
- Warn: no topLevel permission defined: .github/workflows/stale.yml:1
- Info: no jobLevel write permissions found
Reason
2 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 3
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/autoAssignABTT.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/microsoft/azure-devops-node-api/autoAssignABTT.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/autoAssignABTT.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/microsoft/azure-devops-node-api/autoAssignABTT.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/stale.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/microsoft/azure-devops-node-api/stale.yml/master?enable=pin
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 third-party GitHubAction dependencies pinned
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 30 are checked with a SAST tool
Score
6.7
/10
Last Scanned on 2025-02-17
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to azure-devops-node-api
azure-devops-node-utilities
Utilities for use with azure-devops-node-api and azure-pipelines-task-lib.
@xiaoxu_dev/azure-devops-node-api
Node client for Azure DevOps and TFS REST APIs
@starkmsu/azure-devops-node-api
Node client for Azure DevOps and TFS REST APIs
@axosoft/azure-devops-node-api
Node client for Azure DevOps and TFS REST APIs