It's all about the answers!

Ask a question

RTC OSLC API work item creation factory responding with 403 forbidden


Brennen Sprimont (134) | asked Apr 25 '17, 2:57 p.m.
edited Apr 30 '18, 10:01 a.m.

 Hi,


I am trying to make API calls to the RTC OSLC API workitem creation factory endpoints but am receiving a 403 Forbidden response on every attempt. I am able to make other api calls such as retrieving individual work items or accessing the catalog or project services. I have made sure the user I am using is a team member and administrator of the project area and is logged in properly with a verified session cookie. I was wondering if anyone has ran into this before and knows how to fix it.

Any help/insight would be greatly appreciated.


Example Request:
Method: POST
URL: https://{redacted}/ccm/oslc/contexts/_D2Y2Aa3IEea75PoXVkA0zg/workitems/defect

Headers:
"OSLC-Core-Version", "2.0"
"content-type", "application/rdf+xml"

Body:
(omitted because it appears any XML in a question description marks the question as spam)


Response:
StatusCode: 403, ReasonPhrase: 'Forbidden', Version: 1.1, Headers:
  Cache-Control: must-revalidate, max-age=0, private
  Date: Tue, 25 Apr 2017 18:49:38 GMT
  Server: Apache-Coyote/1.1
  Content-Length: 0
  Expires: Tue, 25 Apr 2017 18:49:38 GMT


Comments
Brennen Sprimont commented Apr 30 '18, 11:10 a.m.

Turns out RTC adds a decent error message if you have the "Accept" header turned on. Specifically, setting accept to "application/xml" gets some useful data. In my case, I was missing the required field "FiledAgainst" in my posted data. I'm not sure why this returns a 403 though, seems like a poor choice of a response code.

Be the first one to answer this question!


Register or to post 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.