How to make a requirement collection using rest API
Hi
How do I make a requirement collection using rest API?
I've tried to follow the workshop notes and am able to get the services.xml. My question is now, if I should use the link under the "Collection Creation Factory"? Should I use the oslc:creation rdf:resource link or the oslc:resourceShape rdf:resource link? When trying to access the oslc:creation rdf:resource link i get the response 404 Not Found.
When these questions are answered... then what should I write to make the collection? I suppose I should use PUT but what else?
Thank you in advance for you help.
One answer
Artifact creation in RM Application using OSLC is described in https://jazz.net/library/article/1197.
PLS take a look and add a comment if you have further questions.
Comments
Hi Gabriel
Thank you for your answer, it helped me a bit, but now I have a 400 Bad Request problem when I try to PUT my changes (I've just tried to update the title of an existing requirement).
PUT <the requirement URI>
OSLC-Core-Version: 2.0
accept: application/xml
If-Match: <the requirement etag>
Content-Type: application/rdf+xml
The response
400 Bad Request
Content-Type: application/rdf+xml; charset=UTF-8
...
the errormessage
https/1.1 400 (more info found at entry [b6027e3840337de9] in the RM application server log)
I can't fint this entry in the RM application server log?
Sorry, I was looking at the wrong RM application server log. What it states in the end is:
Error 400: CRJZS5039E The ETag specified for If-Match is not legally formed (see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html)
Hi, are you including the complete ETAG in the IF-MATCH header?