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

Is it possible to use the REST URI tool for attaching files when submitting a new record?

Short version: Is it possible to use the REST URI tool for attaching files when submitting a new record?

We have found that there is a tool in ClearQuest that's called REST URI, which makes it possible to prefill  a TR by adding parameters in the GET URI. In order to use this in a better way we would like to add file.zip attachment as well. However, it didnt work. 

We used a form:
method="POST" target="_blank"
enctype="multipart/form-data" action="https://our_host/cqweb/restapi/our_repo/our_database/RECORD?format=HTML&recordType=Defect&fieldsXml=<Field><Name>Attachments</Name><Value><![CDATA[file.zip]]></Value></Field>&autoSave=false&noframes=true">
       
       input type="file" name="attachment"
       input type="submit" value="click me!"                          


Error message was: 

No object could be found that allows the requested operation.

Details

problem converting 'cq.record:[ "file.zip" ]' into server resource for 'FLD:Attachments'.  No object could be found that allows the requested operation.


Does anybody knows if that is possible? Using POST somehow?

0 votes



One answer

Permanent link
The request is definitely incorrect. I'm not familiar with the tool that you mentioned, and not sure whether it uses OSLC 2.0 only. If OSLC 2.0 only, you cannot do it at all, as working with attachments is only available in OSLC 1.0.
https://jazz.net/wiki/bin/view/Main/RcmRestCmApi
https://jazz.net/wiki/bin/view/Main/CqOslcV2

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
× 11,078

Question asked: Mar 03 '16, 3:04 a.m.

Question was seen: 4,730 times

Last updated: Mar 03 '16, 4:41 a.m.

Confirmation Cancel Confirm