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