2 Volation_API
leo edited this page 2024-05-13 14:33:28 +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/Violation_car_table
Method : GET
Content-Type: application/json
Authorization : token

回傳:

[
  {
    "violation_location_name": "工院路口",
    "license_plate_number": "AAA1111",
    "car_start_img": null,
    "car_end_img": null,
    "create_data_time": "2024-05-13T13:44:11.864091"
  },
  {
    "violation_location_name": "工院路口",
    "license_plate_number": "BBB2222",
    "car_start_img": null,
    "car_end_img": null,
    "create_data_time": "2024-05-13T13:27:08.730471"
  },
  {
    "violation_location_name": "圖書館路口",
    "license_plate_number": "CCC3333",
    "car_start_img": null,
    "car_end_img": null,
    "create_data_time": "2024-05-13T11:48:52.834442"
  },
  .
  .
  .
]
欄位名稱 型態 說明
violation_location_name String 違規位置
license_plate_number String 車牌號碼
car_start_img String 違規起始圖片
car_end_img String 違規圖片
create_data_time Date 違規時間

透過指定時間獲取違規資料

位置名稱:工院路口
開始時間:2024-04-01
結束時間:2024-04-02
URL : http://140.125.20.183:7700/api/Violation_car_table/location_name_1_位置名稱-start_time-開始時間-end_time-結束時間
Method : GET
Content-Type: application/json
Authorization : token

回傳:

[
  {
    "violation_location_name": "工院路口",
    "license_plate_number": "AAA1111",
    "create_data_time": "2024-04-01T01:06:26.879025"
  },
  {
    "violation_location_name": "工院路口",
    "license_plate_number": "BBB1234",
    "create_data_time": "2024-04-01T03:19:45.347512"
  },
  {
    "violation_location_name": "工院路口",
    "license_plate_number": "AAA1234",
    "create_data_time": "2024-04-01T07:45:18.610529"
  },
  .
  .
  .
]

透過指定車牌獲取違規資料

車牌號碼:AAA1111 
URL : http://140.125.20.183:7700/api/Violation_car_table/license_plate_number-車牌號碼
Method : GET
Content-Type: application/json
Authorization : token

回傳:

[
  {
    "violation_location_name": "工院路口",
    "license_plate_number": "AAA1111",
    "create_data_time": "2024-05-13T03:22:58.171957"
  },
  {
    "violation_location_name": "工院路口",
    "license_plate_number": "AAA1111",
    "create_data_time": "2024-05-10T01:02:49.948195"
  },
  {
    "violation_location_name": "工院路口",
    "license_plate_number": "AAA1111",
    "create_data_time": "2024-05-09T02:48:28.973465"
  },
  .
  .
  .
]