功能描述
用于查询指定媒体库下的用户列表,支持多条件过滤和游标分页
接口说明
多个过滤参数同时传入时取交集(AND 逻辑);
若需按 userId 查询,请使用查询用户详情接口;
分页使用
marker + limit 游标分页,首次请求不传 marker,后续传上次响应的 nextMarker;请求
请求示例
GET /api/v1/user/{LibraryId}?access_token={AccessToken}&user_name={UserName}&nick_name={NickName}&phone={Phone}&email={Email}&role={Role}&status={Status}&marker={Marker}&limit={Limit}
请求参数
请求参数 | 描述 | 类型 | 是否必选 |
LibraryId | 媒体库 ID,必选参数; | String | 是 |
AccessToken | 访问令牌,必选参数; | String | 是 |
UserName | 精确过滤用户名,可选参数; | String | 否 |
NickName | 精确过滤昵称,可选参数; | String | 否 |
Phone | 精确过滤手机号,可选参数; | String | 否 |
Email | 精确过滤邮箱,可选参数; | String | 否 |
Role | 精确过滤角色,取值: user / admin / superadmin,可选参数; | String | 否 |
Status | 精确过滤状态,取值: enabled / disabled,可选参数; | String | 否 |
Marker | 游标,首次请求不传,后续传上次响应的 nextMarker,可选参数; | String | 否 |
Limit | 每页数量,默认 20,最大 100,可选参数; | Integer | 否 |
请求体
无
响应
响应码
获取成功,返回 HTTP 200 OK
响应体
application/json
响应体示例:
{"nextMarker": "xxx","contents": [{"libraryId": "lib_xxx","userId": "user_001","nickName": "张三","userName": "zhangsan","role": "user","status": "enabled","countryCode": "+86","phone": "18888888888","email": "test@qq.com","avatar": "https://example.com/avatar.jpg","description": "描述信息","userData": {},"creator": "admin_001","creationTime": "2024-01-01T10:00:00.000Z","modifyTime": "2024-01-01T10:00:00.000Z"}]}
响应体字段说明:
节点名称(关键字) | 描述 | 类型 |
nextMarker | 字符串,下一页游标,最后一页为空字符串 ""; | String |
contents | 数组,用户信息列表; | Array |
contents[].libraryId | 字符串,媒体库 ID; | String |
contents[].userId | 字符串,用户唯一标识; | String |
contents[].nickName | 字符串,昵称; | String |
contents[].userName | 字符串,用户名; | String |
contents[].role | 字符串,角色: user / admin / superadmin; | String |
contents[].status | 字符串,状态: enabled / disabled; | String |
contents[].countryCode | 字符串,国家/地区电话区号,带 + 前缀(如 +86); | String |
contents[].phone | 字符串,手机号(不含国家区号); | String |
contents[].email | 字符串,邮箱; | String |
contents[].avatar | 字符串,头像地址; | String |
contents[].description | 字符串,描述; | String |
contents[].userData | 对象,用户自定义数据; | Object |
contents[].creator | 字符串,创建者用户 ID; | String |
contents[].creationTime | 字符串,创建时间,ISO 8601 格式,例如 2024-01-01T10:00:00.000Z; | String |
contents[].modifyTime | 字符串,最后修改时间,ISO 8601 格式; | String |