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 build
Test:
$ npm run test
Start server in dev mode:
$ npm run dev
Verify the service, for example using httpie:
$ http localhost:3000/api/v1/ping
Get all git repositories with id, name and description:
$ http localhost:3000/api/v1/repos
Get 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==50
Or use the browser to test:
http://localhost:3000/api/v1/builds?top=50