attachments/{attachment}
Description
An attachment of the specified entity.
Limitations
On a PUT operation, the ref-subtype cannot be changed from the value passed when the file was uploaded.
URL
/qcbin/rest/domains/{domain}/projects/{project}/{entity collection}/{Entity ID}/attachments/{Attachment ID}?by-id=true
/qcbin/rest/domains/{domain}/projects/{project}/{entity collection}/{Entity ID}/attachments/{file name}
Remarks
If the file name is not in English, use /attachments/{file name}
to GET an attachment with media type application/octet-stream
.
Otherwise, use /attachments/{Attachment ID}?by-id=true
.
HTTP Methods
GET: Retrieves the attachment.
PUT: Updates the attachment.
DELETE: Deletes the attachment.
POST: N/A
Media Type |
GET
|
PUT
|
DELETE
|
POST
|
---|---|---|---|---|
application/xml |
![]() |
![]() |
![]() |
- |
application/json |
![]() |
![]() |
![]() |
-
|
application/octet-stream |
![]() |
![]() |
- | - |
Returns
One of the HTTP Return Codes.
With an Accept header or alt clause of application/json or application/xml, returns a descriptor of the attachment entity.
With an Accept header or alt clause of application/octet-stream, returns the file. The Content-Type header reflects the type of file.
A PUT operation with a content type of application/octet-stream replaces the file. PUT with other content types updates the metadata.