Stu
Stu

Reputation: 2446

VSTS View of build status by branch

I'd like to create a report which is the build status of each of our builds by branch for all the current branches in my Git repository - much like on the right hand side of the the summary page but spanning all build definitions. I'm happy to use the API and create the report myself but I can't seem to find any way to filter the information by branch in the API. Here's the sort of query I want to perform:

https://(instance).visualstudio.com/(Project)/_apis/build/builds?definitions=(definitionID)&sourceBranch=(BranchID)

but sourceBranch doesn't seem to be a valid parameter

Upvotes: 2

Views: 1005

Answers (1)

starian chen-MSFT
starian chen-MSFT

Reputation: 33738

You need to specify branchName (replace / to %2F). For example (Dev-v1 branch):

https://XXX.visualstudio.com/[team project name]/_apis/build/Builds?branchName=refs%2Fheads%2FDev-v1&definitions=17

Upvotes: 4

Related Questions