Updated on 2022-12-05 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 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.