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

How to get custom enumeration value of RTC with REST using java http client .

I am writing program  to get custom  enumeration values by http client using OSLC-CM 2.0 (REST) in java language.  RTC-SDK is not allowed to be used.

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.

0 votes

Comments

 no advise???

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.



2 answers

Permanent link
 Hello,

Hope it helps,
Eric

0 votes

Comments

he was looking for REST methods, not java code.


Permanent link

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:

https://server:port/ccm/rpt/repository/workitem?fields=workitem/projectArea[name='Test']/enumerations/(id|literals/*)

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.

0 votes

Comments

I found Reportable REST API should be RTC3.0.11.But my RTC only RTC3.0, it is not appliable.

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
× 10,927

Question asked: Dec 29 '13, 11:28 a.m.

Question was seen: 6,635 times

Last updated: Jan 06 '14, 11:47 a.m.

Confirmation Cancel Confirm