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 |
4 answers
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 |
Thanks for your answer!
With the option ..workitem/workItem/allExtensions/ it has worked perfectly! |
Hi pere,I met the same problem with you,can you give me an example how to get the custom attribute value?
|
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? |
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.