Workitem creation problem via rest api HTTP 405
Hello,
I am send a POST message to my facroty uri which is https://server:9443/ccm/oslc/contexts/_Kw3GkmJHEeODZojFwTfvdw/workitems My workitem's JSON representation is { "dc:title":"My first new work item", "dc:description":"A description for the new work item", "dc:type": { "rdf:resource":"https:\/\/server:9443\/ccm\/oslc\/types\/_Kw3GkmJHEeODZojFwTfvdw\/task" }, } I have "application/x-oslc-cm-changerequest+json" as "Content-Type" and "text/json" as Accept I am using RTC 4.0.4 I got this error { "oslc_cm:message": null, "oslc_cm:status": 405 } I am not POSTing something that Rest api cant handle like changing a time sheet entry. What could be wrong? |
Accepted answer
Hello,
based on https://jazz.net/wiki/bin/view/Main/WorkItemAPIsForOSLCCM20#Appendix_C_JSON_Representation_o
I would say that dc should not be used here - verified - it does not work -
but you may rather use dcterms
{
"dcterms:title":"My first new work item",
"dcterms:description":"A description for the new work item",
"dcterms:type":
{
"rdf:resource":"https:\/\/9.37.26.38:9443\/ccm\/oslc\/types\/_WRViEGfXEeOUe6HHrM5Jkw\/task"
},
}
worked for me
Hope it helps,
Eric
Canberk Akduygu selected this answer as the correct answer
|
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.