员工管理API
获取员工权限列表
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 项目ID |
| page_size | Integer | Body | 是 | 每页数量 |
| page_index | Integer | Body | 是 | 当前页数 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| staff_access_id | String | Body | 员工权限ID |
| staff_access_name | String | Body | 员工权限名称 |
| created_time | String | Body | 创建时间,UTC |
| faces | []Object<face> | Body | 人脸信息 |
| pin_codes | []Object<pin_code> | Body | PIN码信息 |
| rf_cards | []Object<rf_card> | Body | 射频卡信息 |
| access_groups | []Object<access_group> | Body | 权限组信息 |
| floor_accesses | []Object<floor_access> | Body | 楼层权限信息 |
face说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| face_id | String | Body | 人脸ID |
pin_code说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| pin_code_id | String | Body | PIN码ID |
| number | String | Body | 号码 |
rf_card说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| rf_card_id | String | Body | 射频卡ID |
| number | String | Body | 号码 |
access_group说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| access_group_name | String | Body | 权限组名称 |
floor_access说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| building_name | String | Body | 楼栋名称 |
| floor_access | []String | Body | 楼层权限 |
请求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_staff_access_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"page_size": 1,
"page_index": 1,
"project_id": "pr31adc223cc4b3bedb6bd4742dedcfa5"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": [
{
"staff_access_id": "sx9a621c1ae77040d697bd2134700f57e",
"staff_access_name": "test",
"created_time": "2024-02-19 17:02:23",
"faces": [
{
"face_id": "fbr2c4b070cc928496198944858b344fc"
}
],
"pin_codes": [
{
"pin_code_id": "pbr2c4b070cc928496198944858b344fc",
"number": "123456"
}
],
"rf_cards": [
{
"rf_card_id": "rbr2c4b070cc928496198944858b344fc",
"number": "123456"
}
],
"access_groups": [
{
"access_group_name": "test"
}
],
"floor_accesses": [
{
"building_name": "AB01",
"floor_access": [
"1",
"2"
]
}
]
}
]
}
失败返回示例
见 接口失败返回
获取员工权限信息
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 项目ID |
| staff_access_id | String | Body | 是 | 员工权限ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| staff_access_name | String | Body | 员工权限名称 |
| created_time | String | Body | 创建时间,UTC |
| faces | []Object<face> | Body | 人脸信息 |
| pin_codes | []Object<pin_code> | Body | PIN码信息 |
| rf_cards | []Object<rf_card> | Body | 射频卡信息 |
| access_groups | []Object<access_group> | Body | 权限组信息 |
| floor_accesses | []Object<floor_access> | Body | 楼层权限信息 |
face说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| face_id | String | Body | 人脸ID |
pin_code说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| pin_code_id | String | Body | PIN码ID |
| number | String | Body | 号码 |
rf_card说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| rf_card_id | String | Body | 射频卡ID |
| number | String | Body | 号码 |
access_group说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| access_group_id | String | Body | 权限组ID |
| access_group_name | String | Body | 权限组名称 |
| access_group_type | String | Body | 权限组类型 system:系统 customized:定制 |
floor_access说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| building_id | String | Body | 楼栋ID |
| building_name | String | Body | 楼栋名称 |
| floor_access | []String | Body | 楼层权限 |
请求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_staff_access_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"staff_access_id": "sx9a621c1ae77040d697bd2134700f57e",
"project_id": "pr31adc223cc4b3bedb6bd4742dedcfa5"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": {
"staff_access_name": "test",
"created_time": "2024-02-19 17:02:23",
"faces": [
{
"face_id": "fbr2c4b070cc928496198944858b344fc"
}
],
"pin_codes": [
{
"pin_code_id": "pbr2c4b070cc928496198944858b344fc",
"number": "123456"
}
],
"rf_cards": [
{
"rf_card_id": "rbr2c4b070cc928496198944858b344fc",
"number": "123456"
}
],
"access_groups": [
{
"access_group_name": "test",
"access_group_id": "arbr2c4b070cc928496198944858b344f",
"access_group_type": "system"
}
],
"floor_accesses": [
{
"building_id": "b1a621c1ae77040d697bd2134700f57ee",
"building_name": "AB01",
"floor_access": [
"1",
"2"
]
}
]
}
}
失败返回示例
见 接口失败返回
创建员工权限信息
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 项目ID |
| staff_access_name | String | Body | 是 | 员工权限名称 |
| faces | []Object<face> | Body | 否 | 人脸信息 |
| pin_codes | []Object<pin_code> | Body | 否 | PIN码信息 |
| rf_cards | []Object<rf_card> | Body | 否 | 射频卡信息 |
| access_groups | []Object<access_group> | Body | 是 | 权限组信息 |
| floor_accesses | []Object<floor_access> | Body | 否 | 楼层权限信息 |
face说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| face_picture_url | String | Body | 是 | 人脸图片地址 |
pin_code说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| number | String | Body | 是 | 号码 |
rf_card说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| number | String | Body | 是 | 号码 |
access_group说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| access_group_id | String | Body | 是 | 权限组ID |
floor_access说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| building_id | String | Body | 是 | 楼栋ID |
| floor_access | []String | Body | 是 | 楼层权限 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| staff_access_id | String | Body | 员工权限ID |
请求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "create_staff_access_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"project_id": "p31adc223cc4b3bedb6bd4742dedcfa52",
"staff_access_name": "test",
"faces": [
{
"face_picture_url": "https://akcs.akubela.com/test"
}
],
"pin_codes": [
{
"number": "123456"
}
],
"rf_cards": [
{
"number": "123456"
}
],
"access_groups": [
{
"access_group_id": "arbr2c4b070cc928496198944858b344f"
}
],
"floor_accesses": [
{
"building_id": "b1a621c1ae77040d697bd2134700f57ee",
"floor_access": [
"1",
"2"
]
}
]
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"staff_access_id": "s2a621c1ae77040d697bd2134700f57ea"
}
}
失败返回示例
见 接口失败返回
更新员工权限信息
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 项目ID |
| staff_access_id | String | Body | 是 | 员工权限ID |
| staff_access_name | String | Body | 是 | 员工权限名称 |
| faces | []Object<face> | Body | 否 | 人脸信息 |
| pin_codes | []Object<pin_code> | Body | 否 | PIN码信息 |
| rf_cards | []Object<rf_card> | Body | 否 | 射频卡信息 |
| access_groups | []Object<access_group> | Body | 是 | 权限组信息 |
| floor_accesses | []Object<floor_access> | Body | 否 | 楼层权限信息 |
face说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| face_picture_url | String | Body | 是 | 人脸图片地址 |
| is_deleted | Boolean | Body | 是 | 判断图片是否删除 true:已删除 false:未删除 |
pin_code说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| number | String | Body | 是 | 号码 |
rf_card说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| number | String | Body | 是 | 号码 |
access_group说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| access_group_id | String | Body | 是 | 权限组ID |
floor_access说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| building_id | String | Body | 是 | 楼栋ID |
| floor_access | []String | Body | 是 | 楼层权限 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "update_staff_access_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"project_id": "p31adc223cc4b3bedb6bd4742dedcfa52",
"staff_access_id": "s2a621c1ae77040d697bd2134700f57ea",
"staff_access_name": "test",
"faces": [
{
"face_picture_url": "https://akcs.akubela.com/test",
"is_deleted": false
}
],
"pin_codes": [
{
"number": "123456"
}
],
"rf_cards": [
{
"number": "123456"
}
],
"access_groups": [
{
"access_group_id": "arbr2c4b070cc928496198944858b344f"
}
],
"floor_accesses": [
{
"building_id": "b1a621c1ae77040d697bd2134700f57ee",
"floor_access": [
"1",
"2"
]
}
]
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
删除员工权限信息
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 项目ID |
| staff_access_id | String | Body | 是 | 员工权限ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_staff_access_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"project_id": "p31adc223cc4b3bedb6bd4742dedcfa52",
"staff_access_id": "srbr2c4b070cc928496198944858b344f"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
批量删除员工权限信息
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 项目ID |
| staff_accesses | []Object<staff_access> | Body | 是 | 员工权限信息 |
staff_access说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| staff_access_id | String | Body | 是 | 员工权限ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_delete_staff_access_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"project_id": "p01adc223cc4b3bedb6bd4742dedcfa52",
"staff_accesses": [
{
"staff_access_id": "s8b5a73f8dd84abaa94dcs248be49b0d1"
}
]
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
导入员工权限信息
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 项目ID |
| file_name | String | Body | 是 | 文件名称 |
| file_url | String | Body | 是 | 文件地址 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| task_id | String | Body | 任务ID |
请求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "import_staff_access_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"project_id": "pr31adc223cc4b3bedb6bd4742dedcfa5",
"file_name": "test",
"file_url": "https://test.akubela.com/test-staff"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"task_id": "tpr31adc223cc4b3bedb6bd4742dedcfa"
}
}
失败返回示例
见 接口失败返回