更新 1018_體態API_測試
parent
8fb0fba765
commit
76286cfeeb
@ -1,11 +1,29 @@
|
|||||||
# API相關
|
# API相關
|
||||||
## 上傳資料
|
## 上傳資料
|
||||||
```
|
|
||||||
|
### 上傳暫存資料(演算法抓完之後就進行刪除了)
|
||||||
|
```
|
||||||
URL : http://140.125.20.183:7700//api/Postural_Analysis_1
|
URL : http://140.125.20.183:7700//api/Postural_Analysis_1
|
||||||
Method : POST
|
Method : POST
|
||||||
Content-Type: application/json
|
Content-Type: application/json
|
||||||
data:{
|
data:{
|
||||||
"img_name": img_name,
|
"img_name": 120241019105623,
|
||||||
|
"test_id": user_id,
|
||||||
|
"test_analyst": " ",
|
||||||
|
"test_time": " ",
|
||||||
|
"test_date": " ",
|
||||||
|
"img": img_base64,
|
||||||
|
"data_creat_time": "2023-01-11T12:53:25.381Z"
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
### 上傳永久資料(上傳後會永久保存)
|
||||||
|
```
|
||||||
|
URL : http://140.125.20.183:7700//api/Postural_Analysis
|
||||||
|
Method : POST
|
||||||
|
Content-Type: application/json
|
||||||
|
data:{
|
||||||
|
"img_name": 120241019105623,
|
||||||
"test_id": user_id,
|
"test_id": user_id,
|
||||||
"test_analyst": " ",
|
"test_analyst": " ",
|
||||||
"test_time": " ",
|
"test_time": " ",
|
||||||
@ -16,3 +34,47 @@ data:{
|
|||||||
|
|
||||||
```
|
```
|
||||||
img需要轉base64的格式
|
img需要轉base64的格式
|
||||||
|
如以下操作
|
||||||
|
|
||||||
|
![](http://140.125.21.65:8418/TCM/Posture/raw/branch/master/img/%E5%9C%96%E7%89%871.png)
|
||||||
|
|
||||||
|
轉換完成後,並將數據打包成JSON
|
||||||
|
如下圖所示
|
||||||
|
|
||||||
|
![](http://140.125.21.65:8418/TCM/Posture/raw/branch/master/img/%E5%9C%96%E7%89%872.png)
|
||||||
|
|
||||||
|
要有圖片(base64格式)、圖片名稱、及使用者ID
|
||||||
|
|
||||||
|
等待演算法完成,再進行抓取資料
|
||||||
|
|
||||||
|
![](http://140.125.21.65:8418/TCM/Posture/raw/branch/master/img/%E5%9C%96%E7%89%873.png)
|
||||||
|
|
||||||
|
由於有正視圖與側視圖,所以必須2個都抓看看,有無資料
|
||||||
|
|
||||||
|
```
|
||||||
|
正視圖
|
||||||
|
URL : http://211.22.135.143:7200/api/Postural_Analysis_detail/img_name-120241019105623.jpg
|
||||||
|
Method : GET
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
側視圖
|
||||||
|
URL : http://211.22.135.143:7200/api/Postural_Analysis_detail_2/img_name-120241019105623.jpg
|
||||||
|
Method : GET
|
||||||
|
Content-Type: application/json
|
||||||
|
|
||||||
|
```
|
||||||
|
記得在img_name後加上".jpg"
|
||||||
|
|
||||||
|
若有資料後,即可直接去獲取資料
|
||||||
|
```
|
||||||
|
URL : http://211.22.135.143:7200/api/Postural_Analysis_detail/120241019105623.jpg
|
||||||
|
Method : GET
|
||||||
|
Content-Type: application/json
|
||||||
|
```
|
||||||
|
|
||||||
|
![](http://140.125.21.65:8418/TCM/Posture/raw/branch/master/img/%E5%9C%96%E7%89%875.png)
|
||||||
|
|
||||||
|
以下是測試時使用到的API
|
||||||
|
|
||||||
|
![](http://140.125.21.65:8418/TCM/Posture/raw/branch/master/img/%E5%9C%96%E7%89%874.png)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user