查询用户限制列表
查询用户对话限制列表,批量查看哪些用户被限制使用指定 Agent。
请求方法
POST:https://数据中心域名/v3/agent/user/restriction/query.json
签名规则:所有服务端 API 请求均需要进行规则校验,详见 API 请求签名。
请求参数
HTTP 请求正文数据格式为 application/json
,支持以下参数:
参数 | 类型 | 必传 | 说明 |
---|---|---|---|
page | Int | 否 | 页码,从 1 开始,默认 1 。 |
size | Int | 否 | 每页大小,默认 20 。 |
agentId | String | 否 | Agent 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"
}
返回结果
参数 | 类型 | 说明 |
---|---|---|
code | Int | 返回码,200 表示处理成功。 |
message | String | 返回消息。 |
restrictions | Array<Object> | 用户限制记录列表。 |
restrictions[].agentId | String | Agent ID。 |
restrictions[].userId | String | 用户 ID。 |
restrictions[].type | Int | 限制类型,1 表示黑名单。 |
restrictions[].createdAt | Long | 创建时间戳(毫秒)。 |
restrictions[].updatedAt | Long | 更新时间戳(毫秒)。 |
total | Int | 数据总条数。 |
hasNext | Boolean | 是否有下一页。 |
返回示例
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
}
错误码
详见 错误码说明。