Azure DevOps Client for Node.js
Installations
npm install @starkmsu/azure-devops-node-api
Developer Guide
Typescript
Yes
Module System
CommonJS
Node Version
10.24.1
NPM Version
5.10.0
Score
78.1
Supply Chain
98.9
Quality
74.9
Maintenance
100
Vulnerability
99.3
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
TypeScript (99.41%)
JavaScript (0.59%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
starkmsu
Download Statistics
Total Downloads
342
Last Day
1
Last Week
3
Last Month
22
Last Year
76
GitHub Statistics
NOASSERTION License
1 Stars
277 Commits
3 Branches
1 Contributors
Updated on May 10, 2023
Package Meta Information
Latest Version
11.3.1
Package Id
@starkmsu/azure-devops-node-api@11.3.1
Unpacked Size
4.29 MB
Size
530.04 kB
File Count
139
NPM Version
5.10.0
Node Version
10.24.1
Total Downloads
Cumulative downloads
Total Downloads
342
Last Day
0%
1
Compared to previous day
Last Week
200%
3
Compared to previous week
Last Month
266.7%
22
Compared to previous month
Last Year
-38.7%
76
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
2
Dev Dependencies
7
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:
- Build
- Core
- Dashboard
- ExtensionManagement
- FeatureManagement
- FileContainer
- Git
- Locations
- Notification
- Policy
- Profile
- ProjectAnalysis
- Release
- SecurityRoles
- TaskAgent
- Task
- Test
- 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 >= 4.4.7 LTS and typescript (tsc) >= 1.8
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
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.

No security vulnerabilities found.