获取用户限制记录
获取用户对话限制记录,查看用户是否被限制使用指定 Agent。
请求方法
POST:https://数据中心域名/v3/agent/user/restriction/get.json
签名规则:所有服务端 API 请求均需要进行规则校验,详见 API 请求签名。
请求参数
HTTP 请求正文数据 格式为 application/json,支持以下参数:
| 参数 | 类型 | 必传 | 说明 | 
|---|---|---|---|
agentId | String | 是 | Agent ID。 | 
userId | String | 是 | 用户 ID。 | 
请求示例
HTTP
POST /v3/agent/user/restriction/get.json HTTP/1.1
Host: api.rong-api.com
App-Key: e0x9wycfx7flq
Nonce: 1068826355
Timestamp: 1741248603
Signature: 5c6b3f0deb891623b2e8bcef577bc4782a067ea8
Content-Type: application/json
{
  "agentId": "agent_123",
  "userId": "user_001"
}
返回结果
| 参数 | 类型 | 说明 | 
|---|---|---|
code | Int | 返回码,200 表示处理成功。 | 
restrictions | Array<Object> | 用户限制记录列表。 | 
restrictions[].agentId | String | Agent ID。 | 
restrictions[].userId | String | 用户 ID。 | 
restrictions[].type | Int | 限制类型,1 表示黑名单。 | 
restrictions[].createdAt | Long | 创建时间戳(毫秒)。 | 
restrictions[].updatedAt | Long | 更新时间戳(毫秒)。 | 
返回示例
HTTP
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
X-Request-ID: XXXXXXXXXXXXXXXXXXXXXXXXXXXX
{
  "code": 200,
  "restrictions": [
    {
      "agentId": "agent_123",
      "userId": "user_001",
      "type": 1,
      "createdAt": 1694467200000,
      "updatedAt": 1694467200000
    }
  ]
}
错误码
详见 错误码说明。