API for Attachment

Get List of Linked Attachments

POST /rest/attachments/list

Request

Content-Type: application/json

Parameters

Name

Located in

Required

Description

Default

Schema

Name

Located in

Required

Description

Default

Schema

entityId

body

yes

entity ID

-

string

entityType

body

yes

entityType

-

string

start

body

yes

start index of records

-

integer

limit

body

yes

number of records per page

-

integer

page

body

yes

page number to be displayed

-

integer

Response

Content-Type: application/json

Status Code

Reason

Response Model

Status Code

Reason

Response Model

200

Linked attachments shown successfully

ResponseEntity

400

Invalid json object or mandatory fields missing

-

401

Unauthorised or session expired

-

500

Returned when server connection times out

-

Download Attachment

GET /rest/attachments/{id}

Request

Content-Type: application/json

Parameters

Name

Located in

Required

Description

Default

Schema

Name

Located in

Required

Description

Default

Schema

body

body

no



-

string

Response

Content-Type: application/json

Status Code

Reason

Response Model

Status Code

Reason

Response Model

200

Attachment downloaded successfully

-

401

Unauthorised or session expired

-

500

Returned when server connection times out

-

Upload Attachment

POST /rest/attachments

Request

Parameters

Name

Located in

Required

Description

Default

Schema

Name

Located in

Required

Description

Default

Schema

file[]

formData

yes

file to upload

-

string

entityType

body

yes

Entity type of the attachment.

-

string

Response

Content-Type: application/json

Status Code

Reason

Response Model

Status Code

Reason

Response Model

200

Attachment added successfully

ResponseEntity

400

Invalid json object or mandatory fields missing

-

401

Unauthorised or session expired

-

500

Returned when server connection times out

-

Upload Test Logs to Test Case on Execution

POST /rest/attachments/testLog

Request

Content-Type: multipart/form-data

Parameters

Name

Located in

Required

Description

Default

Schema

Name

Located in

Required

Description

Default

Schema

entityId

formData

yes

entityId

-

integer

type

formData

yes

type

-

string

file[]

formData

yes

file to upload

-

string

Response

Content-Type: application/json

Status Code

Reason

Response Model

Status Code

Reason

Response Model

200

Testlog upload successfull

ResponseEntity

400

Invalid file type or file size exceeds the limit

-

401

Unauthorised or session expired

-

500

Returned when server connection times out

-

POST /rest/attachments/link

Request

Content-Type: application/json

Parameters

Name

Located in

Required

Description

Default

Schema

Name

Located in

Required

Description

Default

Schema

entityId

body

yes

Unique Identifier of Entity

-

integer

attachmentIds

body

yes

Id of attachments to upload

-

string

entityType

body

yes

Abbreviated EntityType

-

string

Response

Content-Type: application/json

Status Code

Reason

Response Model

Status Code

Reason

Response Model

200

Attachment(s) linked successfully

ResponseEntity

400

Invalid json object or mandatory fields missing

-

401

Unauthorised or session expired

-

500

Returned when server connection times out

-

POST /rest/attachments/unlink

Request

Content-Type: application/json

Parameters

Name

Located in

Required

Description

Default

Schema

Name

Located in

Required

Description

Default

Schema

entityId

body

yes

Unique Identifier of Entity

-

integer

attachmentIds

body

yes

Id of attachments to upload

-

string

entityType

body

yes

Abbreviated EntityType

-

string

Response

Content-Type: application/json

Status Code

Reason

Response Model

Status Code

Reason

Response Model

200

Attachment(s) unlinked successfully.

ResponseEntity

400

Invalid json object or mandatory fields missing

-

401

Unauthorised or session expired

-

500

Returned when server connection times out

-

List of linked attachments for Detail View

POST /rest/attachments/listForDetailView

Description

API to list attachments linked with an entity.

Request

Content-Type: application/json

Parameters

Name

Located in

Required

Description

Default

Schema

Name

Located in

Required

Description

Default

Schema

entityId

body

Yes

Id of an entity to list the associated attachments

-

string

entityType

body

Yes

entity type

-

string

limit

body

No

Number of records per page

-

integer

page

body

No

page number to be displayed

-

integer

start

body

No

Start index of records

-

integer

Response

Content-Type: application/json

Status Code

Reason

Response Model

Status Code

Reason

Response Model

200

Linked attachments shown successfully

ResponseEntity

400

Invalid json object or mandatory fields missing

-

401

Unauthorised or session expired

-

500

Returned when server connection times out

-

 

Definitions

ResponseEntity

name

type

required

description

example

name

type

required

description

example

headers

object

optional

-



body

object

optional

-



statusCode

string

optional

-