RQM - Uploading Attachment via REST API/RQMUrlUtility
![](http://jazz.net/_images/myphoto/35c6df45ccd7d41e94dfda4a8e24e299.jpg)
CLM 5.0.2
Following RQMUrlUtility, I have issued the next command to upload an attachment:
java -jar RQMUrlUtility -command POST -user build -password build -filepath C:\temp\importing.log -url https://server:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/JKE%20Banking%20(Quality%20Management)/attachment
The output seems like the command succeeded:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<<<<<----- [ RQMUrlUtility ] ---->>>>>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Default cookie policy RFC_2109 is used.
RQMUrlUtility: Connected to https://server:9443 using project "JKE+Banking+(Quality+Management)"
Attempting to create SSL_TLS context
RQMUrlUtility: Calling [ HTTP POST ] method to upload XML from a specified file to URL
RQMUrlUtility: Server Response code: 201
RQMUrlUtility: [ SUCCESS ] File : "C:\temp\importing.log" successfully posted to URL : "https://server:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/JKE+Banking+(Quality+Management)/attachment "
Slug: Content-Location: slug__3ZpDkJV-EeS778qLKYfUqw
Disconnecting from the IBM Rational Quality Manager server.
BUT, I can't see the attachment in the attachment feed, nor I can attach it to a specific resource.
Is there something wrong with the command above?
Liora
4 answers
![](http://jazz.net/_images/myphoto/35c6df45ccd7d41e94dfda4a8e24e299.jpg)
Hi Liora, nice that you were able to resolve the issue, however, I am struggling with a similar issue so maybe you can share the solution with the community? Thanks!
Comments
![](http://jazz.net/_images/myphoto/35c6df45ccd7d41e94dfda4a8e24e299.jpg)
Long time passed since than. Don't really remember.
BUT, I was able to add the attachment.
Let me add my customer to this discussion and he might find you the relevant code.
![](http://jazz.net/_images/myphoto/0925ed174b552a90f09b1acfa7604f59.jpg)
When you say "I was able to add the attachment" do you mean you were able to add a link to the attachment to another artifact (e.g. an execution result) via REST API? I have been told it would not be possible because attachment and contribution elements are defined as read-only.
![](http://jazz.net/_images/myphoto/35c6df45ccd7d41e94dfda4a8e24e299.jpg)
Yes. I was able to do it. I have received my customer approval to publish the code snippet. He will do that later on.
![](http://jazz.net/_images/myphoto/0925ed174b552a90f09b1acfa7604f59.jpg)
Great, thanks in advance!