How to get custom enumeration value of RTC with REST using java http client .
For example:
I have custom define a new type bugtype.
<enumeration attributeTypeId="bugtype" name="bugproblemtype">
<literal id="bugtype.literal.l1" name="CA-用例缺陷"/>
<literal id="bugtype.literal.l2" name="DOC-文档错误"/>
<literal id="bugtype.literal.l3" name="EC-编码错误"/>
</enumeration>
1. I want to get a map <id, name=""> of enumeration.
AttributeTypeId ="bugtype" or name ="bugproblemtype" as argument. I want to get the map as below:
<bugtype.literal.l1, CA-用例缺陷="">, <bugtype.literal.l2, DOC-文档错误="">, <bugtype.literal.l3, EC-编码错误="">
2. I want to get a id by name
Input CA-用例缺陷 as argument, the id bugtype.literal.l1 will be return.
Please give me some advise.
2 answers
The Reportable REST API can give you such data. Please refer to this WIKI for info and examples about the API:
https://jazz.net/wiki/bin/view/Main/ReportsRESTAPI
Here is an example:
The get an XSD schema describing the data exposed by the API:
https://server:port/ccm/rpt/repository/workitem?metadata=schema
But of course if the Work Items OSLC API can also give you the data, that would be the better choice.
The Reportable REST API is supposed to be used by ETLs and Reports and not a WEB UI as it is heavy on caching and could be slow.
Comments
silencehill wu
Jan 01 '14, 11:41 a.m.no advise???
Geoffrey Clemm
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Jan 01 '14, 11:42 a.m.Most of the regular contributors to the forum are on vacation for Christmas and New Years, so it probably will be a few days before you get a response.