How to upload attachments in CQ using OSLC queries

308 Views Asked by At

Can anyone guide me in uploading the attachment to the Clearquest tool using OSLC queries.

I am new to OSLC. so , it would be great help, if anyone provides the steps to perform for uploading an attachment.

2

There are 2 best solutions below

0
Amsaveni Natarajan On BEST ANSWER

To upload an attachment , i used the below URL

URL : https://CQURL/oslc/repo/repo_name/db/db_name/record/Record_Type-record_identifier/field/AttachedDocuments/attachment?rcm.action=modify"

It does not allow PUT method, use POST Method and pass multipart Input, to upload an attachment.

Status will be 201, if attachment is uploaded successfully.

1
berezovskyi On

From IBM docs (emphasis mine):

You can use the ClearQuest OSLC 2.0 CM REST API to programmatically perform all Rational ClearQuest 8.0 functions except adding an attachment to a record.