功能描述
用于查询指定用户直接加入的群组列表,支持游标分页。
请求
请求示例
GET /api/v1/user/{LibraryId}/{UserId}/group?access_token={AccessToken}&marker={Marker}&limit={Limit}
请求参数
请求参数 | 描述 | 类型 | 是否必选 |
LibraryId | 媒体库 ID,必选参数; | String | 是 |
UserId | 用户 ID;可传保留字 me 查询当前登录用户自己所属的群组,必选参数; | String | 是 |
AccessToken | 访问令牌,必选参数; | String | 是 |
Marker | 游标,首次请求不传,后续传上次响应的 nextMarker,可选参数; | String | 否 |
Limit | 每页数量,默认 20,最大 100,可选参数; | Integer | 否 |
请求体
无
响应
响应码
获取成功,返回 HTTP 200 OK
响应体
application/json
响应体示例:
{"nextMarker": "xxx","contents": [{"libraryId": "smhxxx","groupId": "a1b2c3d4e5f67890a1b2c3d4e5f67890","groupName": "研发部","description": "研发团队","parentGroupId": "0f1e2d3c4b5a69780f1e2d3c4b5a6978","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[].groupId | 字符串,群组唯一标识; | String |
contents[].groupName | 字符串,群组名称; | String |
contents[].description | 字符串,描述; | String |
contents[].parentGroupId | 字符串,父群组 ID;根群组为空串 ""; | String |
contents[].creator | 字符串,创建者用户 ID; | String |
contents[].creationTime | 字符串,创建时间,ISO 8601 格式,例如 2024-01-01T10:00:00.000Z; | String |
contents[].modifyTime | 字符串,最后修改时间,ISO 8601 格式; | String |
错误码
错误码 | HTTP 状态码 | 说明 |
Forbidden | 403 | 无权查询他人所属群组 |
UserNotFound | 404 | 用户不存在 |