forked from kongfp/TP_Admin
31
0
Fork 1
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
TP_API/TP_PROJECT/TP后台接口文档.md

5.3 KiB

TP后台接口文档

查询单个
  • 请求方式GET

  • 请求链接:http://127.0.0.1:8002/api/

  • 请求参数:

    参数名 参数值 是否必填 参数类型 描述说明
    record_time 2023-05-26T13:09:05 datetime 记录仪时间
    police_id 00000001 string 警号
    event_type 0 int 事件类型
  • 可选参数:

    参数名 参数值 是否必填 参数类型 描述说明
    page 1 string 页码
    page_size 20 string 页面大小(每页条数)
  • 结果示例:

查询所有
  • 请求方式GET

  • 请求链接:http://127.0.0.1:8002/api/

  • 可选参数:

    参数名 参数值 是否必填 参数类型 描述说明
    page 1 string 页码
    page_size 20 string 页面大小(每页条数)
  • 结果示例:

新增数据
  • 请求方式POST

  • 请求链接:http://127.0.0.1:8002/api/

  • 请求body

    {
    "video_hash": "vbhdrbvcw",
    "record_time": "2023-05-26T13:09:05",
    "police_id": "00000002",
    "event_type": 1,
    "is_violation": true,
    "small_image": "nvikefrooiwer",
    "relative_time": 4,
    "video_dir": "/d/test",
    "car_number": "苏a045689",
    "ai_analysis": "违规",
    "add_time": "2023-05-26T13:09:03",
    "update_time": "2023-05-26T13:09:01",
    "is_display": true
    }
    
    参数名 参数值 是否必填 参数类型 描述说明
    video_hash vbhdrbvcw string 视频哈希
    record_time 2023-05-26T13:09:05 datetime 记录仪时间
    police_id 00000002 string 警号
    event_type 1 int 事件类型
    is_violation true bool 是否违规
    small_image nvikefrooiwer string 缩略图
    relative_time 4 int 视频时长
    video_dir /d/test string 视频路径
    car_number 苏a045689 string 车牌号
    ai_analysis 违规 string 分析结果
    add_time 2023-05-26T13:09:03 datetime 添加时间
    update_time 2023-05-26T13:09:03 datetime 更新时间
    is_display true bool 是否展示
  • 结果示例:

修改数据
  • 请求方式put

  • 请求链接:http://127.0.0.1:8002/api/20/

  • 请求body

    {
    "video_hash": "vbhdrbvcw",
    "record_time": "2023-05-26T13:09:05",
    "police_id": "00000002",
    "event_type": 1,
    "is_violation": true,
    "small_image": "nvikefrooiwer",
    "relative_time": 4,
    "video_dir": "/d/test",
    "car_number": "苏a045689",
    "ai_analysis": "违规",
    "add_time": "2023-05-26T13:09:03",
    "update_time": "2023-05-26T13:09:01",
    "is_display": true
    }
    
    参数名 参数值 是否必填 参数类型 描述说明
    video_hash vbhdrbvcw string 视频哈希
    record_time 2023-05-26T13:09:05 datetime 记录仪时间
    police_id 00000002 string 警号
    event_type 1 int 事件类型
    is_violation true bool 是否违规
    small_image nvikefrooiwer string 缩略图
    relative_time 4 int 视频时长
    video_dir /d/test string 视频路径
    car_number 苏a045689 string 车牌号
    ai_analysis 违规 string 分析结果
    add_time 2023-05-26T13:09:03 datetime 添加时间
    update_time 2023-05-26T13:09:03 datetime 更新时间
    is_display true bool 是否展示
  • 备注操作会修改uid为20的数据

  • 结果示例:

删除数据