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?
|
One answer
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 |
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.