Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Where are Reportable REST API queryable fields documented?

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.



1 vote



One answer

Permanent link

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.

0 votes

Comments

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. 

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)

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)

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?

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.

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.

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"


Forget the last comment, I mistakenly used the name.

showing 5 of 8 show 3 more comments

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,014
× 137

Question asked: Mar 20 '13, 3:24 p.m.

Question was seen: 6,228 times

Last updated: Mar 21 '13, 11:10 a.m.

Confirmation Cancel Confirm