It's all about the answers!

Ask a question

Query build definitions by project area using REST interface

Adam Cheney (2525) | asked Oct 29 '15, 6:00 a.m.
Hi there,

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:

But if I try

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

permanent link
Rafik Jaouani (5.0k16) | answered Oct 29 '15, 9:24 a.m.
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/[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/[processArea/projectArea/name='Project Area Name']/*

The above should could give all build definitions owned directly or indirectly by a project area.

Adam Cheney selected this answer as the correct answer

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.