It's all about the answers!

Ask a question

Using Reportable Rest API to query build defintion using


Praveen Kumar (371822) | asked Mar 27 '13, 7:53 a.m.
edited Mar 27 '13, 2:30 p.m. by Spencer Murata (2.3k115971)
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


permanent link
Brian Fleming (1.6k11928) | answered Mar 27 '13, 3:46 p.m.
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
Praveen Kumar commented Mar 28 '13, 6:44 a.m.

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) 

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.