API for Attachment

Get List of Linked Attachments

POST /rest/attachments/list

Request

Content-Type: application/json

Parameters

NameLocated inRequiredDescriptionDefaultSchema
entityIdbodyyesentity ID-string
entityTypebodyyesentityType-string
startbodyyesstart index of records-integer
limitbodyyesnumber of records per page-integer
pagebodyyespage number to be displayed-integer

Response

Content-Type: application/json

Status CodeReasonResponse Model
200Linked attachments shown successfullyResponseEntity
400Invalid json object or mandatory fields missing-
401Unauthorised or session expired-
500Returned when server connection times out-

Download Attachment

GET /rest/attachments/{id}

Request

Content-Type: application/json

Parameters

NameLocated inRequiredDescriptionDefaultSchema
bodybodyno
-string

Response

Content-Type: application/json

Status CodeReasonResponse Model
200Attachment downloaded successfully-
401Unauthorised or session expired-
500Returned when server connection times out-

Upload Attachment

POST /rest/attachments

API to upload attachment

Request

Parameters

NameLocated inRequiredDescriptionDefaultSchema
file[]formDatayesfile to upload-string

Response

Content-Type: application/json

Status CodeReasonResponse Model
200Attachment added successfullyResponseEntity
400Invalid json object or mandatory fields missing-
401Unauthorised or session expired-
500Returned when server connection times out-

Upload Test Logs to Test Case on Execution

POST /rest/attachments/testLog

Request

Content-Type: multipart/form-data

Parameters

NameLocated inRequiredDescriptionDefaultSchema
entityIdformDatayesentityId-integer
typeformDatayestype-string
file[]formDatayesfile to upload-string

Response

Content-Type: application/json

Status CodeReasonResponse Model
200Testlog upload successfull

ResponseEntity

400Invalid file type or file size exceeds the limit-
401Unauthorised or session expired-
500Returned when server connection times out-

Attach URL

POST /rest/attachments/reference [Deprecated]

Request

Content-Type: application/json

Parameters

NameLocated inRequiredDescriptionDefaultSchema
urlbodyyesprovide url-string
descriptionbodyyesprovide description-string

Response

Content-Type: application/json

Status CodeReasonResponse Model
200URL attached successfully

ResponseEntity

400Invalid json object or mandatory fields missing-
401Unauthorised or session expired-
500Returned when server connection times out-


Attach URL

POST /rest/attachments

Request

Content-Type: application/json

Parameters

NameLocated inRequiredDescriptionDefaultSchema
file[]formDatayesfile to upload-string

Response

Content-Type: application/json

Status CodeReasonResponse Model
200Attachment added successfullyResponseEntity
400Invalid json object or mandatory fields missing-
401Unauthorised or session expired-
500Returned when server connection times out-

Link Attachment to an Entity

Request

Content-Type: application/json

Parameters

NameLocated inRequiredDescriptionDefaultSchema
entityIdbodyyesUnique Identifier of Entity-integer
attachmentIdsbodyyesId of attachments to upload-string
entityTypebodyyesAbbreviated EntityType-string

Response

Content-Type: application/json

Status CodeReasonResponse Model
200Attachment(s) linked successfully

ResponseEntity

400Invalid json object or mandatory fields missing-
401Unauthorised or session expired-
500Returned when server connection times out-

Unlink Attachment

Request

Content-Type: application/json

Parameters

NameLocated inRequiredDescriptionDefaultSchema
entityIdbodyyesUnique Identifier of Entity-integer
attachmentIdsbodyyesId of attachments to upload-string
entityTypebodyyesAbbreviated EntityType-string

Response

Content-Type: application/json

Status CodeReasonResponse Model
200Attachment(s) unlinked successfully.

ResponseEntity

400Invalid json object or mandatory fields missing-
401Unauthorised or session expired-
500Returned when server connection times out-

Definitions

ResponseEntity
nametyperequireddescriptionexample
headersobjectoptional-
bodyobjectoptional-
statusCodestringoptional-