It's all about the answers!

Ask a question

Where are Reportable REST API queryable fields documented?


Donald Mason (5155) | asked Mar 20 '13, 3:24 p.m.
I am trying to use the Reportable REST API, but it seems extremely simplistic.   I would like to find all open work items assigned to a given Team Area.

I have been using the following reference: https://jazz.net/wiki/bin/view/Main/ReportsRESTAPI

This looks from the documentation like it should work:  https://rtdserver.com:9443/jazz/rpt/repository/workitem?fields=workitem/workItem[teamArea/name=%27myTeam%27%20%20and%20projectArea/name=%27ProjectArea%27]/%28id|summary|target/name|state/name%20|creator/name|owner/name|type/name|resolution/name|parent%29

But I get the following error:

HTTP Status 500 - CRRED8022E: Non Queryable Field: teamArea/name

It looks like only certain fields are queryable, but I cannot find which fields are queryable and which are not.



One answer



permanent link
Rafik Jaouani (5.0k16) | answered Mar 20 '13, 3:57 p.m.
JAZZ DEVELOPER

Hi Donald,

The team area field of a work item is a computed field and not a real field in the database. I would suggest using the Work Item category field instead. Currently we do not have doc that documents which fields are queryable and which are not.


Comments
Donald Mason commented Mar 20 '13, 4:25 p.m.

Thanks for the category field suggestion.  That will work for this query.  How do I find all active versus all resolved work items?  I thought about using the 'resolutionDate' field, but I cannot find any way to query if the field is set or not. 


Rafik Jaouani commented Mar 20 '13, 4:45 p.m.
JAZZ DEVELOPER

You can use the workItem/state/id field to find work items of a prticular state.

Here is an example:

https://server:port/ccm/rpt/repository/workitem?fields=workitem/workItem[state/id=5 or state/id=4]/(id|summary|state/name)

The ids of the states can found int the project area process specification source page in the Eclipse client.

Or you could write the following URL to discover tall the possible states:

https://server:port/ccm/rpt/repository/workitem?fields=workitem/projectArea[name='Some Project Area']/states/(id|name)


Rafik Jaouani commented Mar 20 '13, 4:48 p.m.
JAZZ DEVELOPER

You can also select the group of the state to find out which ones are open or in_progress states: https://server:port/ccm/rpt/repository/workitem?fields=workitem/projectArea[name='Some Project Area']/states/(id|name|group)


Donald Mason commented Mar 21 '13, 9:20 a.m.

Rafik, I will give this a try, though it seems more complicated than testing for NULL values.  Is there no way to test for values that are not set?


Donald Mason commented Mar 21 '13, 9:56 a.m.

Ok, it looked like the group would be the easiest route, but it appears to be a Non Queryable Field as well:

https://rtcserver.com:9443/jazz/rpt/repository/workitem?fields=workitem/workItem[state/group=%27open%27%20and%20projectArea/name=%27ProjectArea%27]/%28id|summary|target/name|state/name%20|creator/name|owner/name|type/name|resolution/name|parent%29

Is the only way to query by state id? If so, this would mean listing all (about 60) in a big or statement.


Donald Mason commented Mar 21 '13, 10:08 a.m.

Rafik,  the example of getting states with id,name, and group looks like it works, but it looks like the id that is returned is very wrong and gives errors when used in other querries:

<projectArea><states><group>inprogress</group><id>com.ibm.team.apt.storyWorkflow.state.s2</id><name>Ready</name></states><states><group>inprogress</group><id>com.ibm.team.apt.story.defined</id><name>In Progress</name></states><states><group>inprogress</group><id>workflow.fis.state.s10</id><name>Sort Orders Required</name></states><states>

Look at the ids, they all look wrong.  I am using your querry above.


Donald Mason commented Mar 21 '13, 10:53 a.m.

I have found that these long text looking ids work, to a point.  I am now having issues with the ids that contain a : (colon) in them.  I tried to escape them with %3A but I still get the following error:

HTTP Status 500 - CRRED0125E: Invalid value: SME. Expected "and" or "or"



Donald Mason commented Mar 21 '13, 11:10 a.m.

Forget the last comment, I mistakenly used the name.

showing 5 of 8 show 3 more comments

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.