Gathering detailed insights and metrics for azure-devops-node-api
Gathering detailed insights and metrics for azure-devops-node-api
Gathering detailed insights and metrics for azure-devops-node-api
Gathering detailed insights and metrics for azure-devops-node-api
npm install azure-devops-node-api
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
466 Stars
299 Commits
231 Forks
98 Watching
68 Branches
133 Contributors
Updated on 28 Nov 2024
TypeScript (99.48%)
JavaScript (0.52%)
Cumulative downloads
Total Downloads
Last day
-7%
87,228
Compared to previous day
Last week
2.2%
522,102
Compared to previous week
Last month
5.6%
2,273,030
Compared to previous month
Last year
34%
23,540,738
Compared to previous year
2
Integrate with Azure DevOps from your Node.js apps.
npm install azure-devops-node-api --save
vso-node-api has been renamed and released as azure-devops-node-api
See samples for complete coding examples
npm install azure-devops-node-api --save
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}
1import * as ba from "azure-devops-node-api/BuildApi"; 2 3let build: ba.IBuildApi = await connection.getBuildApi();
These clients are available:
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();
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
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
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
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 |
To contribute to this repository, see the contribution guide
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.
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
all changesets reviewed
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
security policy file detected
Details
Reason
0 existing vulnerabilities detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
license file detected
Details
Reason
3 commit(s) and 6 issue activity found in the last 90 days -- score normalized to 7
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-25
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 More