How to retrieve allowed values for custom enumeration attribute using RTC REST APIs?
![]()
Hello,
I can retrieve a resource shape, which will display all my attributes for the task type, with something like the following: https://my.rtc.com:9443/ccm/oslc/context/_02g42kavb_VvoZ4IKA/shapes/workitems/task I have a custom single select (enumeration) attribute that looks like this in the resource shape: <rdf:Description rdf:about="https://my.rtc.com:9443/ccm/oslc/context/_02g42kavb_VvoZ4IKA/shapes/workitems/task/property/customSingleSelect"> <rdf:type rdf:resource="http://open-services.net/ns/core#Property"/> <oslc:valueType rdf:resource="http://open-services.net/ns/core#Resource"/> <oslc:representation rdf:resource="http://open-services.net/ns/core#Either"/> <oslc:readOnly rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</oslc:readOnly> <oslc:propertyDefinition rdf:resource="http://jazz.net/xmlns/prod/jazz/rtc/ext/1.0/customSingleSelect"/> <oslc:occurs rdf:resource="http://open-services.net/ns/core#Zero-or-many"/> <oslc:name rdf:datatype="http://www.w3.org/2001/XMLSchema#string">customSingleSelect</oslc:name> <oslc:defaultValue>[]</oslc:defaultValue> <dcterms:title rdf:parseType="Literal">Custom Single Select</dcterms:title> </rdf:Description> That attribute uses a custom enumeration with ID 'customEnumeration'. I know I can see the enumeration values with: https://my.rtc.com:9443/ccm/oslc/context/_02g42kavb_VvoZ4IKA/shapes/workitems/task/property/customEnumeration but I don't know how I would know to look that up given that I only know the ID of the attribute (customSingleSelect). Other built in enumeration attributes like priority and severity show the allowedValues in the resource shape, but they don'y seem to appear for custom enumeration attributes. Is there any way to look up the enumeration used for a custom enumeration attribute with the REST APIs? Note: this is using RTC 5.0.1 Thanks. |
2 answers
![]()
It looks if the custom enumeration or attribute ID contains non-Latin characters or certain symbols, then it won't show up in the resource shape. I recreated the enumeration and attribute using only Latin characters, then the 'allowedValues' element appeared in the resourhce shape where I expected.
|