Updated on 2023-06-29 GMT+08:00

Importing Topics

Function

This API is used to import topics.

URI

POST /v2/{project_id}/mqs/instances/{instance_id}/topics/import

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Tenant's project ID.

instance_id

Yes

String

Instance ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

mode

No

String

Mode for importing topics.

  • AddNew: full import.

  • Merge: incremental import.

The default value is AddNew.

prefix

No

String

Prefix of an application name.

If a prefix is carried, the prefix is added to the existing application name to form a new application name. Then, the topic is imported based on the new application name.

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).

Table 4 FormData parameters

Parameter

Mandatory

Type

Description

upload_file_name

Yes

File

List of topics to be imported.

Response Parameters

None

Example Requests

POST https://{endpoint}/v2/{project_id}/mqs/instances/{instance_id}/topics/import

Example Responses

None

Status Codes

Status Code

Description

204

No Content

Error Codes

See Error Codes.