用户搜索
1 功能说明
搜索用户
2 接口调用说明
2.1 URL
http://yourdomain.kf5.com/api/v1/user/search2.2 格式
JSON
2.3 HTTP请求方式
GET, POST
2.4 IP限制
无
2.5 输入参数说明
| 参数名称 | 是否必须 | 类型 | 描述 | 
| name | 否 | string | 用户昵称(参数name和role不能同时为空) | 
| role | 否 | string | 角色。end_user:普通用户,agent:客服,admin:管理员 | 
| currentpage | 否 | integer | 当前显示的数据页数,默认为1,表示第一页 | 
| pagesize | 否 | integer | 每页显示的记录条数,默认为10条 | 
2.6 请求示例
http://yourdomain.kf5.com/api/v1/user/search?name=22&role=end_user&pagesize=15&sign=12d45c66523dd069d7c64c22fea10f34
2.7 返回参数说明
| 参数名称 | 说明 | 
| err | 返回码。0:执行成功,1:有错误 | 
| msg | 如果错误,返回错误信息。 | 
| count | 查询到的记录总数 | 
| currentpage | 当前显示的第几页 | 
| pagesize | 分页大小 | 
| datas | 返回数据 | 
| id | 用户ID编号 | 
| username | 用户邮箱 | 
| name | 昵称 | 
| role | 角色 | 
| organization_id | 所属组织编号 | 
| photo | 头像 | 
| phone | 电话 | 
| details | 详细信息 | 
| notes | 注释 | 
| signature | 用户签名 | 
| status | 帐号状态 | 
2.8 正确返回示例
Content-type: text/html; charset=utf-8
{
	"err":0,
	"msg":"",
	"count":"3",
	"currentpage":"1",
	"pagesize":"15",
	"datas":{
		"0" : {
			"username":"your@126.com",
			"name":"222",
			"role":"end_user",
			...
		}
		...
	}
}2.9 错误返回示例
Content-type: text/html; charset=utf-8
{
 	"err":1,
	"msg":"参数错误"
}3 备注
无
