Howto set tracks and implementsWorkItem links via OSLC
Hello,
I am trying to set some links via OSLC API (e.g. Tracks and ImplementsRequirement).
Unfortunately, I did not find any way that works. The response from the server is always something like this:
<rdf:RDF
I am sending the following data to the server
<?xml version='1.0' encoding='utf8'?>
Setting the children works, just as the other attributes work. When I try the implementsRequirement (and tracksWorkItem), it fails. I used calm:implementsRequirement as this is what I get from the server when I "GET" the work item, however I also tried oslc_cm:implementsRequirement as it seems to be in the oslc_cm vocabulary.
The URI, that I am using:
What do I miss here?
I didn't find any information or examples on links beside children/parent.
|
Accepted answer
Ralph Schoon (63.5k●3●36●46)
| answered Nov 26 '21, 9:10 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
When I do a GET at a work item that has such a link like
with
Accept application/rdf+xml
OSLC-Core-Version 2.0
The link looks like
<oslc_cm:implementsRequirement rdf:resource="https://elm.example.com:9443/rm/resources/TX_CVH28lpnEeuIQuHbrNptJw" />
When I PUT the response back with a new link added to the response from the GET, it works.
Arthur Kleer selected this answer as the correct answer
|
2 other answers
David Honey (1.8k●1●7)
| answered Nov 26 '21, 9:11 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I see this for the implements requirement link from an example work item at https://localhost:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/175:
You should be performing an HTTP PUT on that work item URI - it shouldn't need parameters like
oslc.properties
or
oslc.prefix
. You may need to use an
If-match
header whose value is the etag from the previous GET.
|
Thanks for the quick answer. I did not use the OSLC-Core-Version 2.0 header. Adding it fixed the problem. |
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.