How can I get result for a specific build request using REST api?
Hi,
I'm looking for a way to get a specific build result through REST api. The scenario is: I launch a build using REST api, and then get the RequestUUID. I'd like to query this single build request result.
Currently I'm requesting all the build results for a single build definition and then parsing it using regex. But I've problem with this exception:
Build result handles array can not exceed 512 elements
512 build results is not enough for my client so reducing purge policy is not a way I can use.
Is it possible to query single request results?
Thanks,
Michele.
Accepted answer
Hi Michele. The REST interface should really return both the build request UUID and the build result UUID. Feel free to open an enhancement request for this. Also, please file an item for the 'cannot exceed 512 elements' and we can follow up on that separately.
One workaround is to fetch the BuildRequest item via the .../itemOid/... URL, e.g.
https://jazzdev.torolab.ibm.com:9443/jazz/resource/itemOid/com.ibm.team.build.BuildRequest/_MXgfIMdvEeO185rLDU7C-w?_mediaType=text/json&_prettyPrint=true
returns:
"buildResult": {
"com.ibm.team.repository.typeName": "com.ibm.team.build.BuildResult",
"itemId": "_MXhtQcdvEeO185rLDU7C-w",
"uri": "itemOid\/com.ibm.team.build.BuildResult\/_MXhtQcdvEeO185rLDU7C-w"
},