Query build definitions by project area using REST interface
Hi there jazz.net,
Using RTC 4.0.7, hoping you can help me with the REST interface. We're trying to implement some dynamic, live reporting of our RTC use using the REST interface and wget. We're already got jobs that track work items, but I'm looking for something that will track build information. The first thing I'm after is information about all the build definitions under our project area.
For work items, I can use:
https://rtcserver/jazz/rpt/repository/workitem?fields=workitem/workItem[projectArea/name='ourProject']
But if I try
https://rtcserver/jazz/rpt/repository/build?fields=build/buildDefinition[projectArea/name='ourProject']
I get: 'Error 500: CRRED8022E: Non Queryable Field: projectArea/name'
Is something like this possible? The web client can do it, so I assume there is a way...
Thanks - Adam...
Using RTC 4.0.7, hoping you can help me with the REST interface. We're trying to implement some dynamic, live reporting of our RTC use using the REST interface and wget. We're already got jobs that track work items, but I'm looking for something that will track build information. The first thing I'm after is information about all the build definitions under our project area.
For work items, I can use:
https://rtcserver/jazz/rpt/repository/workitem?fields=workitem/workItem[projectArea/name='ourProject']
But if I try
https://rtcserver/jazz/rpt/repository/build?fields=build/buildDefinition[projectArea/name='ourProject']
I get: 'Error 500: CRRED8022E: Non Queryable Field: projectArea/name'
Is something like this possible? The web client can do it, so I assume there is a way...
Thanks - Adam...
Accepted answer
Both the projectArea and teamArea attributes of a BuildDefinition item in the reportable REST API are computed fields. So you cannot query on them. The Reportable REST API is used by the ETLs. The Build WEB UI uses its own internal non-documented REST API.
You can try this:
https://server:port/ccm/rpt/repository/generic?fields=generic/com.ibm.team.build.BuildDefinition[processArea/name='Project or Process Area Name']/*
The generic schema exposes the raw structure of an artifact and is not guaranteed to stay supported in future releases. The process area field could either be a project area or team area depending on who owns the build definition.
this might work better for you:
https://server:port/ccm/rpt/repository/generic?fields=generic/com.ibm.team.build.BuildDefinition[processArea/projectArea/name='Project Area Name']/*
The above should could give all build definitions owned directly or indirectly by a project area.
You can try this:
https://server:port/ccm/rpt/repository/generic?fields=generic/com.ibm.team.build.BuildDefinition[processArea/name='Project or Process Area Name']/*
The generic schema exposes the raw structure of an artifact and is not guaranteed to stay supported in future releases. The process area field could either be a project area or team area depending on who owns the build definition.
this might work better for you:
https://server:port/ccm/rpt/repository/generic?fields=generic/com.ibm.team.build.BuildDefinition[processArea/projectArea/name='Project Area Name']/*
The above should could give all build definitions owned directly or indirectly by a project area.