查询通道号列表
功能介绍
支持查询通道号列表和通道号绑定信息。
URI
GET /v1/aim-sa/ports
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
type |
否 |
Integer |
操作类型。
缺省值:0 最小长度:0 最大长度:1 |
|
port |
否 |
String |
通道号。 最小长度:0 最大长度:21 |
|
port_type |
否 |
Integer |
通道号类型。
最小值:1 最大值:5 |
|
sign_search |
否 |
String |
单个通道号签名。
说明:
不支持多个签名查询,支持模糊搜索。长度要求0-18。 最小长度:0 最大长度:18 |
|
offset |
否 |
Integer |
偏移量,表示从此偏移量开始查询,offset大于等于0。 最小值:0 最大值:2147483647 缺省值:0 |
|
limit |
否 |
Integer |
每页显示的条目数量。 最小值:1 最大值:100 缺省值:10 |
|
start_time |
否 |
String |
开始时间。格式为:yyyy-MM-ddTHH:mm:ssZ。 |
|
end_time |
否 |
String |
结束时间。格式为:yyyy-MM-ddTHH:mm:ssZ。 |
|
pub_name |
否 |
String |
服务号名称。
说明:
最小长度:0 最大长度:64 |
|
is_bind |
否 |
Integer |
绑定状态。
说明:
最小长度:0 最大长度:1 |
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
X-Auth-Token |
是 |
String |
用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 |
响应参数
状态码: 200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
data |
PortSearchResponse object |
查询通道号列表响应体。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
data |
Array of data objects |
请求成功返回的数据,为JSON格式。 数组长度:0 - 50000 |
|
page_info |
PageOffSet object |
包含当前查询分页信息和可查询数据总数。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
id |
String |
主键ID。 |
|
create_time |
String |
创建时间,格式:yyyy-MM-ddTHH:mm:ssZ。 |
|
pub_id |
String |
服务号ID,在通道号列表显示为null。 |
|
port |
String |
通道号。 |
|
sign |
Array of strings |
签名数组。
数组长度:0 - 5 |
|
authorization_files |
Map<String,String> |
授权证明图片,key是上传的图片ID,value是图片对应的URL。 |
|
pub_name |
String |
服务号名称,查询通道号列表时该项为null。 |
|
port_type |
Integer |
通道号类型。
|
|
sign_check |
Integer |
是否需要校验。
|
|
province |
String |
未绑定服务号时该项为null。 |
|
is_bind |
Integer |
是否绑定。
|
|
pub_list |
Array of PortSearchPubDetail objects |
绑定的服务号列表。
说明:
以JSON列表返回,格式: [{"pub_name":"服务号名称","pub_reference":"服务号备注"}]。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
offset |
Integer |
偏移量,表示从此偏移量开始查询,offset大于等于0。 |
|
limit |
Integer |
每页显示的条目数量。 |
|
total |
Integer |
总量。 |
状态码: 400
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码。 |
|
error_msg |
String |
结果详情。 |
状态码: 500
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码。 |
|
error_msg |
String |
结果详情。 |
请求示例
-
查询通道号列表
https://koomessage.myhuaweicloud.cn/v1/aim-sa/ports?type=0&limit=2
-
查询通道号绑定信息列表
https://koomessage.myhuaweicloud.cn/v1/aim-sa/ports?type=1&limit=2
响应示例
状态码: 200
返回信息。
{
"data" : {
"data" : [ {
"id" : "a67928a301364aa38d8cf6f08242cccc",
"create_time" : "2022-08-05T01:45:05Z",
"pub_name" : null,
"pub_id" : null,
"port_type" : 1,
"sign_check" : 0,
"port" : "8822053111111",
"province" : null,
"sign" : [ "华为云KooMessage" ],
"authorization_files" : {
"3d214a61672846f88ad77597f935cccc" : "AimSauploadService/272957b708ac4891a6d5282ccd2175cccc.png"
},
"is_bind" : 1,
"pub_list" : [ {
"pub_name" : "服务号名称1",
"pub_reference" : "服务号备注1"
} ]
}, {
"id" : "fce3da488355458f80ba5407e3c1cccc",
"create_time" : "2022-08-04T09:27:29Z",
"pub_name" : null,
"pub_id" : null,
"port_type" : 1,
"sign_check" : 1,
"port" : "8822053112222",
"province" : null,
"sign" : [ "0804测试测试" ],
"authorization_files" : {
"37fd9a91d5bb4457aae5dd431676cccc" : "AimSauploadService/62dcfe64c95b4635bef2ef76a72bcccc测试3.PNG"
},
"is_bind" : 1,
"pub_list" : [ {
"pub_name" : "服务号名称2",
"pub_reference" : "服务号备注2"
} ]
} ],
"page_info" : {
"offset" : 0,
"limit" : 2,
"total" : 8
}
}
}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
返回信息。 |
|
400 |
非法参数。 |
|
500 |
内部错误。 |
错误码
请参见错误码。