Appearance
用户组管理接口 #
创建用户组 #
创建一个空的用户组 如果用户组已存在 则返回错误
- 请求路径
/face-api/v3/group/add
- Header:
参数 | 值 |
---|---|
Content-Type | application/json |
token | 令牌 |
- Body请求参数
参数 | 必选 | 类型 | 说明 |
---|---|---|---|
group_id | 是 | string | group标识 (由数字、字母、下划线组成),长度限制40B |
- 请求示例
{
"group_id": "group1"
}
- 返回结果 通过返回的error_code判断是否成功如失败则查看error_msg获得具体错误信息
{
"error_code": 0,
"error_msg": "SUCCESS",
"log_id": 1234567890123,
"timestamp": 1533094781,
"cached": 0,
"result": null
}
删除用户组 #
删除用户组下所有的用户信息及人脸信息
- 路径
/face-api/v3/group/delete
- Header:
参数 | 值 |
---|---|
Content-Type | application/json |
token | 令牌 |
- Body请求参数
请求参数 | 必选 | 类型 | 说明 |
---|---|---|---|
group_id | 是 | string | group标识 (由数字、字母、下划线组成),长度限制40B |
- 返回结果 通过返回的error_code判断是否成功 如失败则查看error_msg获得具体错误信息
{
"error_code": 0,
"error_msg": "SUCCESS",
"log_id": 1234567890123,
"timestamp": 1533094791,
"cached": 0,
"result": null
}
组列表 #
获取人脸库中用户组的列表
- 请求路径
/face-api/v3/group/list
- Header:
参数 | 值 |
---|---|
Content-Type | application/json |
token | 令牌 |
- Body请求参数
参数 | 必选 | 类型 | 说明 |
---|---|---|---|
start | 否 | uint32 | 默认值0,起始序号 |
length | 否 | uint32 | 返回数量,默认值100,最大值1000 |
- 请求示例
{
"start": 0,
"length": 100
}
- 返回结果
字段 | 必选 | 类型 | 说明 |
---|---|---|---|
group_id_list | 是 | array | group |
- 返回示例
{
"error_code": 0,
"error_msg": "SUCCESS",
"log_id": 1234567890123,
"timestamp": 1533094000,
"cached": 0,
"result": {
"group_id_list": [
"gid1",
"gid2"
]
}
}
查询人脸组数量 #
请求路径:
/face-api/facehub/statapp
Header:
参数 | 值 |
---|---|
Content-Type | application/json |
token | 令牌 |
- Body请求参数
请求参数 | 类型 | 说明 |
---|---|---|
- 返回结果
{
"appid1": {
"group_num": 1
}
}
批量获取组统计信息 #
请求路径
/face-api/facehub/statgroup
Header:
参数 | 值 |
---|---|
Content-Type | application/json |
token | 令牌 |
- Body请求参数
请求参数 | 类型 | 说明 |
---|---|---|
group_id_list | string | groupid列表 多个按, 分隔 |
- 返回结果
{
"group6": {
"user_num": 2,
"face_num": 2,
"ctime": "2020-06-05 14:18:38"
},
"group2": {
"user_num": 2,
"face_num": 2,
"ctime": "2020-06-05 09:17:04"
}
}