Attach Files to Defect

Applies to QAComplete 14.4, last modified on May 20, 2024

To attach a file to a defect in your project, you call the …/project/{ProjectId}/Bugs/{EntityId}/files (POST) method. The EntityId parameter specifies the ID of the item to which you want to attach the file.

You attach files to items of other types (tests or requirements) in a similar way. Use the corresponding entity code (Tests or Requirements respectively) instead of the Bugs entity code.


curl -v -i -u [email protected]:p@ssword POST -F file=@attachment.txt -F title="New Attachment" -F comments="New Comment" -H "Content-Type: application/json" -H "Accept: application/json"

This will attach the attachment.txt file to the specified defect.


The server will return information on the attached file:

  "attachment_type_code": "File",
  "file_name": "attachment.txt",
  "title": "New Attachment",
  "comments": "New Comment",
  "data_created": "2015-08-27T11:48:26.9370000",
  "data_updated": "2015-08-27T11:48:26.9370000",
  "entity_code": "Bugs",
  "entity_id": 12,
  "update_user_id": "24663",
  "user_name": "Smith, John"

See Also

/projects/{ProjectId}/{EntityCode}/{EntityId}/files (POST)

Highlight search results