3 City_API_V2
leo edited this page 2024-06-26 16:30:41 +08:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

雲科大大門口資料串接API

獲取資料

身分驗證

URL : http://140.125.20.183:7700/Users/authenticate	
Method : POST
Content-Type: application/json
data:{  "username": "yuntech",
		"password": "yuntech"}

回傳:

{
  "id": 2,
  "firstName": "root",
  "lastName": "manager",
  "username": "yuntech",
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjIiLCJuYmYiOjE3MTU1NzkwMzIsImV4cCI6MTcxNjE4MzgzMiwiaWF0IjoxNzE1NTc5MDMyfQ.83ipsy0s456_puo_alpAAVtav2hed8UC2fR-yFXZteQ"
}

將獲得的token存放之後呼叫API都需要攜帶 每7天過期一次記得重新獲取token

新增進入大門口的車輛資料

URL : http://140.125.20.183:7700/api/Yuntech_in_car_table/city_parking_in_car_data	
Method : POST
Content-Type: application/json
data:{  "license_plate_number": "string",
        "car_img": "string",
        "location": "string"}

因為都是串即時的資料,時間會根據上傳進行觸發,因此內容不需包含時間

欄位名稱 型態 說明
license_plate_number string 車牌號碼
car_img string 無須填入
location string 進入位置

如以下操作

輸出結果

新增出去大門口的車輛資料

出去車輛會根據資料庫內部比對車牌的進入名單的最新一筆進行匹配,上傳即可直接找到相關資料,並將時間一併帶入

URL : http://140.125.20.183:7700/api/Yuntech_in_car_table/city_parking_out_car_data		
Method : POST
Content-Type: application/json
data:{  "license_plate_number": "string",
        "car_img": "string",
        "location": "string"}
欄位名稱 型態 說明
license_plate_number string 車牌號碼
car_img string 無須填入
location string 出去位置

如以下操作

輸出結果