It's all about the answers!

Ask a question

Filtering RTC Custom Attributes from REST API


Daniel Garcia (491013) | asked Nov 19 '12, 4:17 a.m.

Hi there!

I've a Rational Insight report that displays weekly workitem data. We've a huge data volume, so the ETL process takes a high amount of time. That's not a problem importing Workitem information, so I can filter through 'MODIFIED' field and retrieve only the elements I need, but I can't do the same with the Custom Attributes information (WORKITEM_CCM.CustomAttrs), because the only relational information it has is the workitem itemId, and it hasn't any time or data information to guess which time it was modified.

As a workaround, I can get the recently modified workitems and I get their 'itemId' field. Then, I build (manually) a SQL sentence with 'or' clauses to retrieve the associated custom attributes, because REST API doesn't support the SQL 'in' clause. Alas, that's can't be automatized on Data Manager, so I'd like to know if there is some way to retrieve a set of custom attributes which  have been modified from a given date.

Any help will be appreciated. Thank you so much.


Daniel.

Accepted answer


permanent link
Brian Fleming (1.6k11828) | answered Nov 20 '12, 9:23 p.m.
I don't believe the data model stores a timestamp for every single attribute.  The Insight ETL (the RTC_CustomAttr3 job) uses a REST call such as this, which will return the custom attributes from workitems that have been updated since the modifiedsince value. 

https://<server:port>/ccm/rpt/repository/workitem?size=10&fields=workitem/workItem[projectArea/archived=false]/(allExtensions/(key|type|booleanValue|decimalValue|doubleValue|integerValue|longValue|timestampValue|smallStringValue|mediumStringValue|largeStringValue)|projectArea/archived|itemId)&modifiedsince=2012-11-20T19:10:53.000-0500

I realize this is not strictly what you need but it should be easier than your current workaround.

Note that not all custom attribute types are currently supported via the REST API but RFE 184675 is open to track this:

https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWorkItem&id=184675
Daniel Garcia selected this answer as the correct answer

One other answer



permanent link
Daniel Garcia (491013) | answered Nov 21 '12, 4:16 a.m.

Hi, Brian.

It worked! It was exactly what I needed! 

Thank you so much for your help.

Your answer


Register or to post your answer.