ALM 12.5x REST API Reference

An attachment is a file that is associated with another resource, such as a defect.


Attachments are specified by their numerical ID. The file name cannot be used as the attachment ID. To get a file by name, use a query. See the example under Query Parameters.

The query parameter by-id is not valid.

To GET the binary file content, use header Accept: application/octet-stream.

To GET the binary file content and the meta-data, use header Accept: multipart/mixed.

Example of return value using header Accept: multipart/mixed

To POST a new file, use header content-type: multipart/form-data header.

The body of the POST request has these parts:

Post example:





Header Parameters

Query Parameters

The valid query parameters are:

For a GET operation, if the file name is used in a filter, the entity.type and parameters are required. More than one can be specified.

Example: /qcbin/api/domains/my-domain/projects/my-project/attachments/?query={entity.type[requirement];[2 or 4];name[my-file.txt]}

Header Parameters


GET with an Accept header of application/json returns a descriptor of the attachment entity.

GET with an Accept header of application/octet-stream, returns the file. The Content-Type header reflects the type of file.

See Return Values

See Also