跳到主要内容

查询用户限制列表

查询用户对话限制列表,批量查看哪些用户被限制使用指定 Agent。

请求方法

POST:https://数据中心域名/v3/agent/user/restriction/query.json

签名规则:所有服务端 API 请求均需要进行规则校验,详见 API 请求签名

请求参数

HTTP 请求正文数据格式为 application/json,支持以下参数:

参数类型必传说明
pageInt页码,从 1 开始,默认 1
sizeInt每页大小,默认 20
agentIdStringAgent ID 过滤条件。

请求示例

HTTP
POST /v3/agent/user/restriction/query.json HTTP/1.1
Host: api.rong-api.com
App-Key: e0x9wycfx7flq
Nonce: 1068826355
Timestamp: 1741248603
Signature: 5c6b3f0deb891623b2e8bcef577bc4782a067ea8
Content-Type: application/json

{
"page": 1,
"size": 10,
"agentId": "agent_123"
}

返回结果

参数类型说明
codeInt返回码,200 表示处理成功。
messageString返回消息。
restrictionsArray<Object>用户限制记录列表。
restrictions[].agentIdStringAgent ID。
restrictions[].userIdString用户 ID。
restrictions[].typeInt限制类型,1 表示黑名单。
restrictions[].createdAtLong创建时间戳(毫秒)。
restrictions[].updatedAtLong更新时间戳(毫秒)。
totalInt数据总条数。
hasNextBoolean是否有下一页。

返回示例

HTTP
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
X-Request-ID: XXXXXXXXXXXXXXXXXXXXXXXXXXXX

{
"code": 200,
"message": "success",
"restrictions": [
{
"agentId": "agent_123",
"userId": "user_001",
"type": 1,
"createdAt": 1694467200000,
"updatedAt": 1694467200000
},
{
"agentId": "agent_123",
"userId": "user_002",
"type": 1,
"createdAt": 1694467200000,
"updatedAt": 1694467200000
}
],
"total": 2,
"hasNext": false
}

错误码

详见 错误码说明