It's all about the answers!

Ask a question

Create new Change Request in RTC 6.0.1 M1 using RestAPI

Dinyo Dinev (3128) | asked Oct 28 '15, 11:08 a.m.
edited Oct 28 '15, 12:16 p.m.
Hi I am using RTC 6.0.1M1 and I want to create change request work item in RTC.
So I made POST request to the creation factory URL, whcih I took from the Service Provider for my project. So the URL for creation is:

so the post is:
Content-Type: application/x-oslc-cm-change-request+xml

and the request body is:
<xmlns:oslc_rm="" >
  <dc:title>A new Bug</dc:title>
  <dc:description>This is new bug</dc:description>
  <dc:type rdf:resource="https://rtc:9443/jazz/oslc/types/_gasc4Ju-Ed6cerS9lb5AWw/defect"/>
  <rtc_cm:filedAgainst rdf:resource="https://rtc:9443/jazz/resource/itemOid/"/>

but instead of the URI of the new workItem I receive:
<html xmlns="">
      <title>Jazz - Permission Denied</title>
      <link type="text/css" rel="stylesheet" href="/ccm/web/"/>
      <h2>Permission Denied</h2>
      <div>Your account does not have the group memberships required to access the requested resource.</div>

Where could be my error?

Now from the log I see and error that put little brightness to the problem. The user has the roles required to perform this operation,
but the permission has been denied because this request might have been forged by a malicious website.
To prove that this request is not part of a CSRF attack add a new HTTP header with the name 'X-Jazz-CSRF-Prevent'
and use the current JSESSIONID value as the value.

The strange here is that in the RDNG 6.0.1M1 this header was not needed.
And if this header needed when try to create workItem with JAva code?

One answer

permanent link
Luis Silva (257) | answered Aug 10 '16, 10:43 a.m.

I'm currently facing the same problem. Did you find a solution to this problem?

Thank you,

Your answer

Register or to post your answer.