2023-05-12 16:53:21 +08:00
|
|
|
|
# 边缘设备标注服务
|
|
|
|
|
|
|
|
|
|
## API
|
|
|
|
|
|
|
|
|
|
### 获取目录文件列表
|
|
|
|
|
|
|
|
|
|
- 访问地址
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
POST /api/directory/list
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
- 请求头参数
|
|
|
|
|
|
|
|
|
|
Content-Type : application/json
|
|
|
|
|
|
|
|
|
|
- 请求参数
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
{
|
|
|
|
|
"path":"/home/goroot/hpds_annotation/logs/"
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
- 返回值
|
|
|
|
|
|
|
|
|
|
主题包含的字段result 中的数据结构体,当前返回的是数组类型
|
|
|
|
|
|
|
|
|
|
| 序号 | 字段名称 | 数据类型 | 说明 |
|
|
|
|
|
|-----|--------|---------|------|
|
|
|
|
|
| 1 | name | string | 文件名 |
|
|
|
|
|
| 2 | path | string | 文件所在的路径 |
|
|
|
|
|
| 3 | isDir | bool | 是否文件夹 |
|
|
|
|
|
| 4 | size | int | 文件大小 |
|
|
|
|
|
| 5 | modTime | int | 文件最后修改日期 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### 获取目录文件详情
|
|
|
|
|
|
|
|
|
|
- 访问地址
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
POST /api/directory/info
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
- 请求头参数
|
|
|
|
|
|
|
|
|
|
Content-Type : application/json
|
|
|
|
|
|
|
|
|
|
- 请求参数
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
{
|
|
|
|
|
"path":"/home/goroot/hpds_annotation/logs/hpds-edge-web-error.log"
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
- 返回值
|
|
|
|
|
|
|
|
|
|
主题包含的字段result 中的数据结构体,当前返回的是对象
|
|
|
|
|
|
|
|
|
|
| 序号 | 字段名称 | 数据类型 | 说明 |
|
|
|
|
|
|-----|--------|---------|------|
|
|
|
|
|
| 1 | name | string | 文件名 |
|
|
|
|
|
| 2 | path | string | 文件所在的路径 |
|
|
|
|
|
| 3 | isDir | bool | 是否文件夹 |
|
|
|
|
|
| 4 | size | int | 文件大小 |
|
|
|
|
|
| 5 | modTime | int | 文件最后修改日期 |
|
|
|
|
|
| 6 | contentBase | string | 文件内容,用base64进行编码 |
|
|
|
|
|
| 7 | labelStatus | int | 标注状态,0:未进行标注;1:有病害;2:无病害; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### 提交标注数据
|
|
|
|
|
|
|
|
|
|
- 访问地址
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
POST /api/label/submit
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
- 请求头参数
|
|
|
|
|
|
|
|
|
|
Content-Type : application/json
|
|
|
|
|
|
|
|
|
|
- 请求参数
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
{
|
|
|
|
|
"fileList": ["/home/data/bridge_capture/crack/0001.tif", "/home/data/bridge_capture/crack/0002.tif"],
|
|
|
|
|
"labelStatus": true,
|
|
|
|
|
"bizType": 3
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
+ 说明
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 序号 | 字段名称 | 数据类型 | 说明 |
|
|
|
|
|
|-----|--------|-------|-------------------------------------|
|
|
|
|
|
| 1 | fileList | 字符串数组 | 文件的全路径组成的数组 |
|
|
|
|
|
| 2 | labelStatus | 布尔值 | 标注状态,true: 有病害; false: 无病害 |
|
2023-06-09 17:43:08 +08:00
|
|
|
|
| 3 | bizType | 整型 | 1: 道路; 2: 桥梁; 3: 隧道; 4: 边坡; |
|
|
|
|
|
|
|
|
|
|
- 返回值
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
{
|
|
|
|
|
"code": 200,
|
|
|
|
|
"message": "成功",
|
|
|
|
|
"type": "OK"
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
2023-06-09 21:17:31 +08:00
|
|
|
|
### 提交采集数据
|
2023-06-09 17:43:08 +08:00
|
|
|
|
|
|
|
|
|
- 访问地址
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
POST /api/capture/submit
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
- 请求头参数
|
|
|
|
|
|
|
|
|
|
Content-Type : application/json
|
|
|
|
|
|
|
|
|
|
- 请求参数
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
{
|
|
|
|
|
"fileList": ["/home/data/bridge_capture/crack/0001.tif", "/home/data/bridge_capture/crack/0002.tif"],
|
|
|
|
|
"datasetName": "2023年06月09日17点40分数据集,
|
|
|
|
|
"bizType": 3
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
+ 说明
|
|
|
|
|
|
|
|
|
|
+ | 序号 | 字段名称 | 数据类型 | 说明 |
|
|
|
|
|
|-----|--------|-------|-----------------------------|
|
|
|
|
|
| 1 | fileList | 字符串数组 | 文件的全路径组成的数组 |
|
|
|
|
|
| 2 | datasetName | 字符串 | 数据集名称,如果不存在将会自动创建 |
|
|
|
|
|
| 3 | bizType | 整型 | 1: 道路; 2: 桥梁; 3: 隧道; 4: 边坡; |
|
2023-05-12 16:53:21 +08:00
|
|
|
|
|
|
|
|
|
- 返回值
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
{
|
|
|
|
|
"code": 200,
|
|
|
|
|
"message": "成功",
|
|
|
|
|
"type": "OK"
|
|
|
|
|
}
|
|
|
|
|
```
|