Provides a super simple REST API for build and code stats by integrating with Visual Studio Team Services (VSTS) using vsts-node-api. Written in TypeScript for Node.js.
Run npm install first
Set environment variables using set or export:
API_URL=https://fabrikam.visualstudio.com/defaultcollection
// use your token
API_TOKEN=cbdeb34vzyuk5l4gxc4qfczn3lko3avfkfqyb47etahq6axpcqha
API_PROJECT=myProject Build:
$ npm run buildTest:
$ npm run testStart server in dev mode:
$ npm run devVerify the service, for example using httpie:
$ http localhost:3000/api/v1/pingGet all git repositories with id, name and description:
$ http localhost:3000/api/v1/reposGet all git commits for a give repo:
$ http localhost:3000/api/v1/commits repo=="MY_REPO_ID"Get top N latest builds:
$ http localhost:3000/api/v1/builds top==50Or use the browser to test:
http://localhost:3000/api/v1/builds?top=50