跳到主要内容

查询开发环境用户列表

本接口用于分页查询应用开发环境中已注册的测试用户列表。

适用范围

请求方法

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

频率限制:每秒钟限 100 次

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

正文参数

HTTP 请求正文数据格式为 application/x-www-form-urlencoded,支持以下 HTTP 表单参数:

参数类型必传说明
pageint页码数,默认为 1。
pageSizeint每页数量,默认为 20,最大不超过 100 条。
orderint排序规则,根据注册时间排序,0 为正序,1 为倒序,默认正序。

请求示例

HTTP
POST user/query.json HTTP/1.1
Host: api.rong-api.com
App-Key: uwd1c0sxdlx2
Nonce: 14314
Timestamp: 1408710653491
Signature: 45beb7cc7307889a8e711219a47b7cf6a5b000e8
Content-Type: application/x-www-form-urlencoded

pageSize=2&page=1&order=0

返回结果

HTTP 响应正文包含具有以下结构的 JSON 对象:

返回值返回类型说明
codeInt返回码,200 为正常。
totalInt用户总数。
usersArray用户列表。
users[i].userIdString用户 ID。
users[i].userNameString用户名称。
users[i].userPortraitString用户头像。
users[i].regTimeString注册时间,格式为 yyyy-MM-dd HH:mm:ss

返回结果示例

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

{
"code": 200,
"total": 10,
"users": [
{
"regTime": "2018-08-31 14:39:15",
"userPortrait": "http://abc.com/mynewportrait.jpg",
"userName": "name_0429",
"userId": "13100000429"
},

{
"regTime": "2018-08-31 14:40:01",
"userPortrait": "http://abc.com/mynewportrait.jpg",
"userName": "name_0250",
"userId": "13100000250"
}
]
}