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

Exporting Topics

Function

This API is used to export topics.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. For details about the required permissions, see Permissions Policies and Supported Actions.

URI

GET /v2/{project_id}/mqs/instances/{instance_id}/topics/export

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain a project ID, see "Appendix" > "Obtaining a Project ID" in this document.

instance_id

Yes

String

Instance ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

name

No

String

Topics to export. Multiple topics are separated by commas (,). By default, all topics are exported.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token, which can be obtained by calling the IAM API (value of X-Subject-Token in the response header).

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

-

File

OK

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 403

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Requests

GET https://{endpoint}/v2/{project_id}/mqs/instances/{instance_id}/topics/export?name=topic-mqs-test

Example Responses

Status code: 400

Bad Request

{
  "error_code" : 400,
  "error_msg" : "Bad Request"
}

Status code: 403

Forbidden

{
  "error_code" : 403,
  "error_msg" : "Forbidden"
}

Status Codes

Status Code

Description

200

Topic exported.

400

Bad Request

403

Forbidden

Error Codes

See Error Codes.