How to discover user defined attributes using REST API
![]()
I am trying to create a new workitem following the examples shown in:
https://jazz.net/wiki/bin/view/Main/ResourceOrientedWorkItemAPIv2 In our system there is a new attribute that is required to create the new workitem. when I look an existing workitem using: curl -k -b $COOKIES "$HOST/oslc/workitems/2959.xml" I see it looks like this: <rtc_cm> How do I use this information - or better yet - I do I discover the valid settings - to use in my version of create-simple.json? { When I use a known good value for the discovered_by, it returns the error: { |
2 answers
![]()
I am trying to create a new workitem following the examples shown in:
https://jazz.net/wiki/bin/view/Main/ResourceOrientedWorkItemAPIv2 In our system there is a new attribute that is required to create the new workitem. When I look an existing workitem using: curl -k -b $COOKIES "$HOST/oslc/workitems/2959.xml" I see it looks like this: <rtc_cm:discovered_by rdf:resource="https://localhost:9443/ccm/oslc/enumerations/_iDjGoDuwEeCpC8m1BEftMg/discovered_by/discovered_by.literal.l8"/> How do I use this information - or better yet - I do I discover the valid settings - to use in my version of create-simple.json? { When I use a known good value for the discovered_by, it returns the error: { |
![]()
I found my problems:
1. I was not using the correct context. My sample value came from a different project area, but I did not change it when trying to use the value returned by xml query. <rtc_cm:discovered_by rdf:resource="https://localhost:9443/ccm/oslc/enumerations/_iDjGoDuwEeCpC8m1BEftMg/discovered_by/discovered_by.literal.l8"/> 2. When I did correct the project area, I did not notice the last part of the above is not one-eight, but ell-eight. So, the suggestion to 'figure out a custom attribute: read back a workitem and see what the value is set to' does work. Still not discoverable, but in my case this can be hard coded to one of the four options fairly easily. |
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.