---
# System prepended metadata

title: 首頁
tags: [共通]

---

# 首頁

**API 修改紀錄**
|版本|日期|備註|
| ------------ |------------ |------------ |
| v1 |2024/03/06| 發佈 |

**首頁**


#### 網址
https://{domain}/api/v1/dashboard/index

#### Http Method
GET

#### HTTP Header
accept-language : language code
apikey : apk key

#### HTTP Body 傳入參數

|欄位名稱|必填|型態|欄位|備註|
| ------------ | :-----------: |:-----------: |------------ |------------ |


#### HTTP Response 回傳參數

|Name|Type|說明|
| ------------ | ------------ |------------ |
|new_dive  |Array |最近一次潛水紀錄 |
|free_dive  |Array |自潛 |
|scuba  |Array |水肺 |


#### Request Header Authoriztion
```json
{
    "accept-language" : "en",     //or 'zh_tw'
    "apikey" : "api key string"
}
```

#### Json Example
Request Json
```json
```

Response Json Success
```json
{
    "status": true,
    "code": 200,
    "message": "success",
    "result": {
        "new_dive": { //同潛水紀錄列表
            "serial_number": "SPR23450003",
            "device_name": "SHERWOOD-Logic",
            "dive_date": "2024-02-27",
            "start_time": "16:48:22",
            "end_time": "16:48:40",
            "dive_mode": "scuba",
            "dive_time": "00:00:17",
            "dive_mode_id": 0,
            "low_temp": "23.7",
            "max_depth": "8.58",
            "dive_place": null
        },
        "free_dive": {
            "count": 潛水次數,
            "total_time": 累積潛水時間,
            "avg_time": 平均潛水時間,
            "max_depth": 最深紀錄
        },
        "scuba": {
            "count": 5,//潛水次數
            "total_time": "00:22:33",//累積潛水時間
            "avg_time": "00:04:31",//平均潛水時間
            "max_depth": "8.58"//最深紀錄
        }
    }
}

沒資料
{
    "status": true,
    "code": 200,
    "message": "success",
    "result": {
        "new_dive": null,
        "free_dive": null,
        "scuba": null
    }
}
```

Response Json Error
```json
{
    "status": false,
    "message": "No Data",
    "code": 400
}
```
