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

Access custom attribute value through Rest API

Hi,

I'm trying to acces the value of a custom attribute through the Rest Api but I can't find how. I've doing some test based on:
https://jazz.net/wiki/bin/view/Main/ReportsRESTAPI#workitem

I've been able to to acces some data from the custom attribute with:

...workitem/workItem/customAttributes|(identifier|attributeType )

but still can't get the value itself.

Any idea? Thanks!

Pere

0 votes



4 answers

Permanent link
Hi Pere,

In the Reportable REST API, there are two ways you can access those values. Either use the type-specific properties

...workitem/workItem/booleanExtensions/(key|value)
...workitem/workItem/integerExtensions/(key|value)
...workitem/workItem/doubleExtensions/(key|value)
...workitem/workItem/smallStringExtensions/(key|value)
...workitem/workItem/mediumStringExtensions/(key|value)
...workitem/workItem/largeStringExtensions/(key|value)
...workitem/workItem/timestampExtensions/(key|value)

or the allExtensions property which returns all types in a single call.

...workitem/workItem/allExtensions/(key| type| booleanValue| integerValue| longValue| doubleValue| smallStringValue| mediumStringValue| largeStringValue| timestampValue| decimalValue)

The API doesn't seem to provide a way to access all values; as far as I can tell it's limited to enumerations and attributes of the data types listed above.

Jon

0 votes


Permanent link
Thanks for your answer!

With the option ..workitem/workItem/allExtensions/ it has worked perfectly!

0 votes


Permanent link
Hi pere,I met the same problem with you,can you give me an example how to get the custom attribute value?

0 votes


Permanent link
Hi Pere/Ying,
I met the same problem... is there a way how I can get the value of a specific custom attribute in a workitem?

0 votes

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,941

Question asked: Nov 17 '11, 6:10 a.m.

Question was seen: 7,923 times

Last updated: Apr 16 '13, 4:45 a.m.

Confirmation Cancel Confirm