Attach files to test suite

QMetry 7QMetry 8
  • URL : rest/attachments/testLog/withJson
  • Method : POST
  • URL : /rest/attachments/testLog
  • Method : POST
Request Body
{
	"image": "<Content of file in Base 64 Format>",
	"size": "<Attachment Size in bytes e.g 3683>",
	"type": "<attachment type e.g pdf,text>",
	"name": "<Name of attachment e.g Add test log on execution
	screen as an attachment.pdf>",
	"entityId": "<tcRunID e.g 45650>",
	"entityType": "TCR",
	"desc": "<Attachment Description>"
}
Request Body
{
	"entityId": 3003378,
	"type": TCR,
	"file[]": (binary)
}
Response Body
[
 {
	"data": [
{
	"id": 36057,
	"name": "Add test log on execution
	screen as an attachment.pdf",
	"size": 3683
	}
	]
	}  
]
Response Body
{
    "reason": "",
    "id": 208428,
    "name": "image.png",
    "size": 16181,
    "success": true,
    "code": "CO.LINK_ATTACHMENT_SUCCESS",
    "message": "Attachment(s) linked successfully.",
    "data": [
        {
            "reason": "",
            "id": 208428,
            "name": "image.png",
            "size": 16181
        }
    ]
}