Q:

Get Work items from build Visual Studio Online API

I'm using Visual Studio Online API to get all the work items from an specific build. The problem is that the build numbers I have - because I customize them - have a dot inside the value, for example 112321.3, so it seems that it does not reconize that in the query. 
My query es the following:
https://xxxx.visualstudio.com/DefaultCollection/xxxSoft/_apis/build/builds/20161101.2/workitems?api-version=2.0
but it returns page not found eventhough the build exits.
Any clue?
Best Regards

A:

https://{instance}/DefaultCollection/{project}/_apis/build/builds/{buildId}/workitems?api-version={version}

It is based on the buildId to get workitems per build, instead of build number.

So Steps for your requirement:

Based on the build number to get corresponding build
https://{instance}/DefaultCollection/{project}/_apis/build/builds?api-version={version}[&definitions={string}][&queues={string}][&buildNumber={string}][&type={string}][&minFinishTime={DateTime}][&maxFinishTime={DateTime}][&requestedFor={string}][&reasonFilter={string}][&statusFilter={string}][&tagFilters={string}][&propertyFilters={string}][&$top={int}][&continuationToken={string}]

For example:
https://XXX.visualstudio.com/DefaultCollection/Scrum2015/_apis/build/builds?buildNumber=20161117.17&api-version=2.0

Get workitems per build id.

