Updated on 2022-12-29 GMT+08:00

Querying an Alarm Notification Topic

Function

This API is used to query alarm notification topics. The default topic, number of confirmed topics, and list are returned.

URI

GET /v1/{project_id}/sdg/smn/topics

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

Page number

limit

No

Integer

Page limit

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

default_topic_urn

String

Unique resource identifier of the default SMN topic

topic_count

Integer

Number of confirmed SMN topics

topics

Array of TopicBean objects

List of confirmed SMN topics

Table 4 TopicBean

Parameter

Type

Description

name

String

SMN topic name

topic_urn

String

Unique resource identifier of an SMN topic

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error Code

error_msg

String

Error Message

Example Requests

Query an alarm notification topic.

GET /v1/{project_id}/sdg/smn/topics

Example Responses

Status code: 200

Request sent

{
  "default_topic_urn" : "xxxxxx",
  "topic_count" : 1,
  "topics" : [ {
    "name" : "xxxxxx",
    "topic_urn" : "xxxxxx"
  } ]
}

Status code: 400

Invalid request

{
  "error_code" : "dsc.40000011",
  "error_msg" : "Invalid parameter"
}

Status Codes

Status Code

Description

200

Request sent

400

Invalid request

Error Codes

See Error Codes.