-
Please upgrade to latest version, it does return labels added to specified build.
-
Previous Value Current Value Open
Closed
-
This issue is still there in the new version
-
Previous Value Current Value Closed
Open
-
I have tested this in the latest version v12.0.4 and I get a successful result but no labels returned. Am I missing something? see below. I expect to get the "SyncAll" label returned.

var response = await _client.GetAsync($"/~api/builds/171/labels"); -
-
Hi Robin I realised that I was getting confussed with the buildId and buildNo.
1. In this query I used the "Query Builds" api function and the result returns Id = 606 and No = 178
string query = $"\"Project\" is \"{projectName}\""; string encodedQuery = Uri.EscapeDataString(query); var response = await _client.GetAsync($"/~api/builds?query={encodedQuery}&offset=0&count=1");
2. In this query I used the "Get Build" api function with input parameter = 178 (buildId according to documentation), and the result returns Id = 178 and No = 28
var response = await _client.GetAsync($"/~api/builds/178");
So I am a bit confused about the numbering but if I use 606 as buildId in the "Get Labels" api call, I do get labels returned. I was using 178 before which I think is actually the build number. Could you please clarify this for me, or am I looking at it wrong?
-
Build id and build number is different thing. Build number is what being displayed at the UI and it is only unique inside project. Different projects may have builds with same build number. Build id is used by OneDev internally to identify a build, and it is unique across the whole instance.
The GetBuild api expects build id instead of build number. Build id can be queried with project and build number with below query:
"Number" is "<project path>#<build number>"Or if your project has a key specified, with below query:
"Number" is "PROJKEY-<build number>" -
Thank you for that clarification.
-
Able to query Labels successfully.
-
Previous Value Current Value Open
Closed
| Type |
Question
|
| Priority |
Normal
|
| Assignee | |
| Labels |
No labels
|
Currently I don't seem to be getting any return values when using "/~api/builds/{buildId}/labels"?