From 76286cfeeb09f9ca7e4be843b949e8cfad70cd9f Mon Sep 17 00:00:00 2001 From: leo Date: Sat, 19 Oct 2024 11:42:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=201018=5F=E9=AB=94=E6=85=8BA?= =?UTF-8?q?PI=5F=E6=B8=AC=E8=A9=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...E9%AB%94%E6%85%8BAPI_%E6%B8%AC%E8%A9%A6.md | 66 ++++++++++++++++++- 1 file changed, 64 insertions(+), 2 deletions(-) diff --git a/1018_%E9%AB%94%E6%85%8BAPI_%E6%B8%AC%E8%A9%A6.md b/1018_%E9%AB%94%E6%85%8BAPI_%E6%B8%AC%E8%A9%A6.md index 6589e64..807d8c2 100644 --- a/1018_%E9%AB%94%E6%85%8BAPI_%E6%B8%AC%E8%A9%A6.md +++ b/1018_%E9%AB%94%E6%85%8BAPI_%E6%B8%AC%E8%A9%A6.md @@ -1,11 +1,29 @@ # API相關 ## 上傳資料 -``` + +### 上傳暫存資料(演算法抓完之後就進行刪除了) +``` URL : http://140.125.20.183:7700//api/Postural_Analysis_1 Method : POST Content-Type: application/json 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_analyst": " ", "test_time": " ", @@ -16,3 +34,47 @@ data:{ ``` 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) +