Using Reportable Rest API to query build defintion using
![](http://jazz.net/_images/myphoto/6fc9b17b0574cb59b7b5f60a3bb716e3.jpg)
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)
https://server/ccm/rpt/repository/build?buildDefinition/buildDefinition[projectArea/name='MyProject']/(buildDefinition/name)
Accepted answer
![](http://jazz.net/_images/myphoto/6fc9b17b0574cb59b7b5f60a3bb716e3.jpg)
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.
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.
Comments
![](http://jazz.net/_images/myphoto/6fc9b17b0574cb59b7b5f60a3bb716e3.jpg)
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)