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, only use /attachments/{file name}
with media type application/octet-stream
to GET the attachment.
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 of response 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.
Examples