Updated on 2025-10-24 GMT+08:00

Downloading Attachments

Function

The attachment download operation is based on the uploaded attachment resources. When uploading an attachment, you need to call the /v1/{ticket_type}/attachments API. After the upload is successful, you can obtain the doc_id parameter from the API response. When downloading an attachment, you can call the /v1/{ticket_type}/attachments API again based on the doc_id parameter to obtain the uploaded attachment resource, implementing full lifecycle management of the attachment.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    coc:ticket:downloadFile

    Read

    -

    -

    -

    -

URI

GET /v1/{ticket_type}/attachments/{doc_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

ticket_type

Yes

String

Definition:

Service ticket type. The value is fixed to incident.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

doc_id

Yes

String

Definition:

Unique ID of the file to be downloaded.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

Request Parameters

None

Response Parameters

Status code: 200

The request is successful. The value of Content-Type in the response header is application/octet-stream, indicating that the interface returns a file stream.

For more status codes, see Status Codes.

Status code: 400

Table 2 Response body parameters

Parameter

Type

Description

provider_code

String

Definition:

Service ID.

Value range:

N/A

Default value:

049

error_code

String

Definition:

Request response code.

Value range:

GOM.00000000~GOM.00009999999

Default value:

GOM.00000000

error_msg

String

Definition:

Response description for a request.

Value range:

N/A

Example Requests

Request example for downloading an attachment.

GET https://{Endpoint}/v1/incident/attachments/c70d6b38-3783-4d62-9c4a-c6924925e848

Example Responses

Status code: 400

The server failed to process the request.

For more status codes, see Status Codes.

{
  "error_code" : "GOM.00007256",
  "error_msg" : "Invalid parameter",
  "provider_code" : 4,
  "data" : null
}

Status Codes

Status Code

Description

200

The request is successful. The value of Content-Type in the response header is application/octet-stream, indicating that the interface returns a file stream.

For more status codes, see Status Codes.

400

The server failed to process the request.

For more status codes, see Status Codes.

Error Codes

See Error Codes.