查询订阅管理信息 - ListNotification
功能介绍
该接口用于查询指定应用订阅管理信息的数据。
授权信息
账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备调用API所需的权限,具体权限要求请参见权限和授权项。
URI
GET /v2/{project_id}/link/instances/{instance_id}/notifications
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
project_id |
是 |
String |
项目ID,获取方式请参见API参考的“附录 > 获取项目ID”章节。 |
|
instance_id |
是 |
String |
实例ID。 |
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
app_id |
否 |
String |
应用ID。 |
|
product_serial |
否 |
String |
产品标识。 |
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
X-Auth-Token |
是 |
String |
用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 |
响应参数
状态码:200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
total |
Integer |
总数。 |
|
size |
Integer |
本次返回数量。 |
|
items |
Array of NotificationResponseBody objects |
订阅管理列表。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
notification_id |
Integer |
订阅ID。 |
|
type |
Integer |
订阅类型,0:设备上线通知类型,1:设备下线通知类型,2:设备添加通知类型, 3:设备删除通知类型,4:设备变更通知类型。 |
|
status |
Integer |
订阅管理状态,0:启用,1:停用。 |
|
topic |
String |
订阅的Topic名称。 |
|
instance_id |
String |
实例ID。 |
|
app_id |
String |
应用ID。 |
|
product_serial |
String |
通知归属的产品标识。 |
状态码:400
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
系统错误码,针对4xx和5xx类HTTP错误码的详细错误码。 |
|
error_msg |
String |
错误描述。 |
|
request_id |
String |
消息ID。 |
状态码:404
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
系统错误码,针对4xx和5xx类HTTP错误码的详细错误码。 |
|
error_msg |
String |
错误描述。 |
|
request_id |
String |
消息ID。 |
状态码:500
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
系统错误码,针对4xx和5xx类HTTP错误码的详细错误码。 |
|
error_msg |
String |
错误描述。 |
|
request_id |
String |
消息ID。 |
请求示例
无
响应示例
状态码:200
OK
{
"total" : 9999999999,
"size" : 999,
"items" : [ {
"notification_id" : 100,
"type" : 0,
"status" : 0,
"topic" : "string",
"instance_id" : "string",
"app_id" : "string"
} ]
}
状态码:400
Bad Request
{
"error_code" : "string",
"error_msg" : "string",
"request_id" : "string"
}
状态码:404
Not Found
{
"error_code" : "ROMA.00110006",
"error_msg" : "The resource does not exist. Check whether the resource ID 1 is correct.",
"request_id" : "624c8be1-39b6-47b7-941d-c159aced368a-1619602544650-cnnorth7a-P-romalink-service01"
}
状态码:500
Internal Server Error
{
"error_code" : "string",
"error_msg" : "string",
"request_id" : "string"
}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
OK |
|
400 |
Bad Request |
|
404 |
Not Found |
|
500 |
Internal Server Error |
错误码
请参见错误码。