# XZNSH后台接口文档
查询 - 请求方式:GET - 请求链接:/api/ - 请求参数: | 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 | | ----------- | ------------------- | -------- | -------- | ---------- | | record_time | 2023-05-26 13:09:05 | 否 | string | 记录仪时间 | | | | | | | | event_type | 工作人员操作按键 | 否 | string | 事件类型 | - 可选参数: | 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 | | --------- | ------ | -------- | -------- | -------------------- | | page | 1 | 否 | string | 页码 | | page_size | 20 | 否 | string | 页面大小(每页条数) | - 返回值: | 参数名 | 参数值 | 参数类型 | 描述说明 | | ---------------- | ------------------------------------------------- | -------- |--------------| | uid | 1 | int | 自增 | | video_hash | 38fb463b135fa12534104f85492cc6f1 | string | 视频哈希值 | | record_time | 2023-05-26 13:09:05 | string | 视频显示时间 | | event_type | 工作人员操作按键 | string | 事件类型 | | is_violation | true | bool | 是否违规 | | violation_reason | | string | 违规原因 | | thumbnail | http://192.168.0.47:8000/media/images/0000609.jpg | string | 缩略图 | | scene | atm机器操作 | string | 场景 | | video_path | http://192.168.0.47:8000/media/video/B1.MP4 | string | 视频地址 | | ai_analysis | | string | 分析结果 | | insert_time | 2023-05-31 18:42:15 | string | 记录添加时间(自动添加) | | update_time | 2023-05-31 18:42:15 | string | 记录更新时间(自动添加) | | is_display | true | bool | 是否展示(自动添加) |
新增数据 - 请求方式:POST - 请求链接:/api/ - 请求body: ```json { "video_hash": "vbhdrbvcw", "record_time": "2023-05-26 13:09:05", "scene": "atm机器操作", "event_type": "工作人员操作按键", "is_violation": true, "violation_reason": "", "thumbnail": "nvikefrooiwer", "video_path": "/d/test", "ai_analysis": "" } ``` | 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 | | ------------- |---------------------| -------- |----------| ------ | | video_hash | vbhdrbvcw | 是 | string | 视频哈希 | | record_time | 2023-05-26 13:09:05 | 是 | datetime | 视频显示时间 | | scene | atm机器操作 | 是 | string | 场景 | | event_type | 工作人员操作按键 | 是 | string | 事件类型 | | is_violation | true | 是 | bool | 是否违规 | | violation_reason | | string | 违规原因 | | thumbnail | nvikefrooiwer | 是 | string | 缩略图 | | video_path | /d/test | 是 | string | 视频路径 | | ai_analysis | | 是 | string | 分析结果 | - 返回值 | 参数名 | 参数值 | 参数类型 | 描述说明 | | ---------------- | ------------------------------------------------- | -------- |--------------| | uid | 1 | int | 自增 | | video_hash | 38fb463b135fa12534104f85492cc6f1 | string | 视频哈希值 | | record_time | 2023-05-26 13:09:05 | string | 视频显示时间 | | event_type | 工作人员操作按键 | string | 事件类型 | | is_violation | true | bool | 是否违规 | | violation_reason | | string | 违规原因 | | thumbnail | http://192.168.0.47:8000/media/images/0000609.jpg | string | 缩略图 | | scene | atm机器操作 | string | 场景 | | video_path | http://192.168.0.47:8000/media/video/B1.MP4 | string | 视频地址 | | ai_analysis | | string | 分析结果 | | insert_time | 2023-05-31 18:42:15 | string | 记录添加时间(自动添加) | | update_time | 2023-05-31 18:42:15 | string | 记录更新时间(自动添加) | | is_display | true | bool | 是否展示(自动添加) |
修改数据 - 请求方式:put - 请求链接:/api// - 请求body: ```json { "video_hash": "vbhdrbvcw", "record_time": "2023-05-26 13:09:05", "scene": "atm机器操作", "event_type": "工作人员操作按键", "is_violation": true, "thumbnail": "nvikefrooiwer", "video_path": "/d/test", "ai_analysis": "" } ``` | 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 | | ------------- |---------------------| -------- |----------| ------ | | video_hash | vbhdrbvcw | 是 | string | 视频哈希 | | record_time | 2023-05-26 13:09:05 | 是 | datetime | 视频显示时间 | | scene | atm机器操作 | 是 | string | 场景 | | event_type | 工作人员操作按键 | 是 | string | 事件类型 | | is_violation | true | 是 | bool | 是否违规 | | violation_reason | | string | 违规原因 | | thumbnail | nvikefrooiwer | 是 | string | 缩略图 | | video_path | /d/test | 是 | string | 视频路径 | | ai_analysis | | 是 | string | 分析结果 | - 返回值 | 参数名 | 参数值 | 参数类型 | 描述说明 | | ---------------- | ------------------------------------------------- | -------- |--------------| | uid | 20 | int | 自增 | | video_hash | vbhdrbvcw | string | 视频哈希值 | | record_time | 2023-05-26 13:09:05 | string | 视频显示时间 | | event_type | 工作人员操作按键 | string | 事件类型 | | is_violation | true | bool | 是否违规 | | violation_reason | | string | 违规原因 | | thumbnail | http://192.168.0.47:8000/media/images/0000609.jpg | string | 缩略图 | | scene | atm机器操作 | string | 场景 | | video_path | http://192.168.0.47:8000/media/video/B1.MP4 | string | 视频地址 | | ai_analysis | | string | 分析结果 | | insert_time | 2023-05-31 18:42:15 | string | 记录添加时间(自动添加) | | update_time | 2023-05-31 18:42:15 | string | 记录更新时间(自动添加) | | is_display | true | bool | 是否展示(自动添加) |
删除数据 - 请求方式:delete - 请求链接:/api// - 备注:操作会删除uid为20的数据 - 返回值:
登录 - 请求方式:POST - 请求链接:/api/login - 请求body: ```json { "username": "xfc", "password": "Xfc980516" } ``` | 参数名 | 参数值 | 是否必填 | 参数类型 | 描述说明 | |----------|------------| -------- |--------|------| | username | xfc | 是 | string | 用户名 | | password | Xfc980516 | 是 | string | 密码 | - 备注:无 - 返回值: | 参数名 | 参数值 | 参数类型 | 描述说明 | |-------------|-----------------------------------------|--------|--------------| | success | True | bool | 成功 | | msg | 登录成功 | string | 返回信息 | | data | | dict | 返回数据 | | username | xfc | string | 用户名 | | roles | [] | list | 角色列表 | | accessToken | eyJhbGciOiJIUzI1NiIsInR5cCI6 | string | token值 | | expires | Wed Jul 5 16:03:31 2023 | string | token过期时间 |