Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

HTTP POST images RQM

Hello,

I am currently developping a script that take as an input a .docx file (Word), which parses it as an understandable XML in order to POST it as a Test Case and/or Test Script in RQM.

My method works great, I can create Test Case and Test Script doing HTTP POST. The thing is I am having trouble to find how I can create a TC or TS containing images in the first place (in the docx file). So far my script just ignore them.

My HTTP POST Headers :
  • oslc-core-version: 2.0
  • Accept: application/rdf+xml
  • configuration-context: url of GC configuration
URL for Test Case : {RQM_HOST}/oslc_qm/contexts/{PA_ID}/resources/com.ibm.rqm.planning.VersionedTestCase?oslc.select=dcterms:title,dcterms:identifier

With a body in XML :
<?xml version='1.0' encoding='utf-8'?>
<ns0:testcase xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ns0="http://jazz.net/xmlns/alm/qm/v0.1/" xmlns:ns2="http://open-services.net/ns/config#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
   <dc:title>Test_001</dc:title>
   <dc:description>Description of Test Case</dc:description>
   <ns0:weight>100</ns0:weight>
   <ns0:category term="Safety Related" value="True" />
   <ns0:category term="Security Related" value="False" />
   <ns0:category term="Test Category" value="Unit Testing" />
   <ns0:category term="Type Of Test" value="Formal" />
   <ns0:customAttributes>
   </ns0:customAttributes>
</ns0:testcase>



As I said it is working great, but I cannot find how to insert images in this XML, if anyone knows how to proceed ?

Kind regards,
Hugo TROYAN

0 votes



One answer

Permanent link

Hi Hugo,


The OSLC API does not support creating an attachment. This can be achieved by using the REST API. Please check wiki Resources and their Supported Operations

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938
× 11
× 7
× 6
× 3

Question asked: May 20 '21, 10:11 a.m.

Question was seen: 1,256 times

Last updated: Jun 01 '21, 6:09 a.m.

Confirmation Cancel Confirm