Using Reportable Rest API to query build defintion using
![]()
Praveen Kumar (37●16●22)
| asked Mar 27 '13, 7:53 a.m.
edited Mar 27 '13, 2:30 p.m. by Spencer Murata (2.3k●11●59●70)
Hello, I am using reportable rest api to query the build definitions of a project. Unfortunately the query returns empty results even though the project has multiple build definitions. Can some one help to see whether the query is correct.
https://server/ccm/rpt/repository/build?buildDefinition/buildDefinition[projectArea/name='MyProject']/(buildDefinition/name) |
Accepted answer
![]()
Check what attributes are included in the build resource here:
https://jazz.net/wiki/bin/view/Main/ReportsRESTAPI#build "name" is not included in buildDefinition. This query will return all build definition ids: https://jazz.net/jazz/rpt/repository/build?fields=build/buildDefinition/(projectArea/name|id) Unfortunately this query: https://jazz.net/jazz/rpt/repository/build?fields=build/buildDefinition[projectArea/name='Rational Team Concert']/(projectArea/name|id) returns "Error 500: CRRED8022E: Non Queryable Field: projectArea/name" so you may be out of luck filtering on project area name. Praveen Kumar selected this answer as the correct answer
Comments Thanks Brian.
Since querying by project name is not available the only other way I could think for getting build result corresponding to a project was to
1. Query for all build definitions in the ALM instance
2. Then query for all build results corresponding to each build definition using the below query
https://server/ccm/rpt/repository/build?fields=build/buildResult[buildDefinition/id='BldDefLinux']/(buildDefinition/projectArea/name|label|buildStatus|timeTaken)
|