# BodyCompositionInformationIntegration API ## API接口 ### 身體數據 #### **取單筆資料** **Request methods:** GET **route:** /api/BodyComposition/:id #### **查詢資料** **Request methods:** GET **route**: /api/BodyComposition | 參數 | 必 須 | 類型 | 說明 | 資料範例 | |:-------------- |:----- |:-------- |:------------ | -------- | | UUId | o | string | 使用者編號 | | | Unit | | string | 計量單位 | | | SourcePlatform | | string | 來源平台 | | | SampleType | | int | 數據類型 | | | StartDate | | datetime | 起始時間範圍 | | | EndDate | | datetime | 起始時間範圍 | | | PageNumber | | int | 分頁 | | | PageSize | | int | 單頁數量 | | #### **新增** **Request methods:** POST **route**: /api/BodyComposition | 參數 | 類型 | 說明 | 資料範例 | |:-------------- |:--------- |:----------------- |:------------------------------------- | | Uid | string | 使用者識別碼 | SEC6S84DF-AESD-16SD-B9FD-080664ASFF9D | | Unit | string | 資料計量單位 | BPM | | StartDate | timestamp | 紀錄時間/起始時間 | 2022-11-26 15:17 | | EndDate | timestamp | 結束時間 | | | SampleType | string | 資料類型 | heart_rate | | SourcePlatform | string | 來源平台 | apple_health | | Quantity | numeric | 量 | 60 | | Description | string | 註記 | | #### **修改** **Request methods:** PATCH **route**: /api/BodyComposition | 欄位名稱 | 欄位類型 | 說明 | 資料範例 | |:-------------- |:--------- |:----------------- |:------------------------------------- | | UUId | string | 對外唯一識別編號 | 21EC2020-3AEA-1069-A2DD-08002B30309D | | Uid | string | 使用者識別碼 | SEC6S84DF-AESD-16SD-B9FD-080664ASFF9D | | Unit | string | 資料計量單位 | BPM | | StartDate | timestamp | 紀錄時間/起始時間 | 2022-11-26 15:17 | | EndDate | timestamp | 結束時間 | | | SampleType | string | 資料類型 | heart_rate | | SourcePlatform | string | 來源平台 | apple_health | | Quantity | numeric | 量 | 60 | | Description | string | 註記 | | #### **刪除** **Request methods:** DELETE **route:** /api/BodyComposition/:id --- ### 來源平台 #### **取單筆資料** **Request methods:** GET **route:** /api/Platform/:id #### **查詢資料** **Request methods:** GET **route**: /api/Platform #### **新增** **Request methods:** POST **route**: /api/Platform | 參數 | 類型 | 說明 | 資料範例 | |:----------- |:------ |:------------ |:------------------------------------- | | Codename | string | 平台代碼 | | | Name | string | 名稱 | | | Description | string | 說明/描述 | | | CreatedBy | string | 建立人 | | #### **修改** **Request methods:** PATCH **route**: /api/Platform | 欄位名稱 | 欄位類型 | 說明 | 資料範例 | |:----------- |:-------- |:---------------- |:------------------------------------ | | UUId | string | 對外唯一識別編號 | 21EC2020-3AEA-1069-A2DD-08002B30309D | | Name | string | 名稱 | Apple Health | | Description | string | 說明/描述 | 說明文字 | | UpdatedBy | string | 最後編輯者 | Staff02 | #### **刪除** **Request methods:** DELETE **route:** api/Platform/:id --- ### 資料類型 #### **取單筆資料** **Request methods:** GET **route:** /api/Sampletype/:id #### **查詢資料** **Request methods:** GET **route**: /api/Sampletype #### **新增** **Request methods:** POST **route**: /api/Sampletype | 參數 | 類型 | 說明 | 資料範例 | |:----------- |:------ |:--------- |:---------- | | Codename | string | 類型代碼 | heart_rate | | Name | string | 名稱 | 心率 | | Description | string | 說明/描述 | 說明文字 | | CreatedBy | string | 建立人 | Staff01 | #### **修改** **Request methods:** PATCH **route**: /api/Sampletype | 欄位名稱 | 欄位類型 | 說明 | 資料範例 | |:----------- |:-------- |:---------------- |:------------------------------------ | | UUId | string | 對外唯一識別編號 | 21EC2020-3AEA-1069-A2DD-08002B30309D | | Name | string | 名稱 | Apple Health | | Description | string | 說明/描述 | 說明文字 | | UpdatedBy | string | 最後編輯者 | Staff02 | #### **刪除** **Request methods:** DELETE **route:** api/Sampletype/:id --- ### 平台支援資料類型 #### **取單筆資料** **Request methods:** GET **route:** /api/PlatformSupportType/:id #### **查詢資料** **Request methods:** GET **route**: /api/PlatformSupportType | 參數 | 類型 | 說明 | 資料範例 | |:---------- | ------ | -------- | ------------ | | Sampletype | string | 類型代碼 | heart_rate | | Platform | string | 平台代碼 | apple_health | | PageNumber | | | | | PageSize | | | | #### **新增** **Request methods:** POST **route**: /api/PlatformSupportType | 參數 | 類型 | 說明 | 資料範例 | |:----------- |:------ |:--------- |:---------- | | SampleType | string | 類型代碼 | heart_rate | | Platform | string | 平台代碼 | apple_health | | CreatedBy | string | 建立人 | Staff01 | #### **修改** **Request methods:** PATCH **route**: /api/PlatformSupportType | 欄位名稱 | 欄位類型 | 說明 | 資料範例 | |:----------- |:-------- |:---------------- |:------------------------------------ | | UUId | string | 對外唯一識別編號 | 21EC2020-3AEA-1069-A2DD-08002B30309D | | Sampletype | string | 類型代碼 | heart_rate | | Platform | string | 平台代碼 | apple_health | | UpdatedBy | string | 最後編輯者 | Staff02 | #### **刪除** **Request methods:** DELETE **route:** api/PlatformSupportType/:id --- ### 資料類型使用單位 #### **取單筆資料** **Request methods:** GET **route:** /api/SampletypeSupportUnit/:id #### **查詢資料** **Request methods:** GET **route**: /api/SampletypeSupportUnit | 參數 | 類型 | 說明 | 資料範例 | |:---------- | ------ | -------- | ------------ | | Sampletype | string | 類型代碼 | heart_rate | | Platform | string | 平台代碼 | apple_health | | Unit | string | 單位 | BPM | #### **新增** **Request methods:** POST **route**: /api/SampletypeSupportUnit | 參數 | 類型 | 說明 | 資料範例 | |:----------- |:------ |:--------- |:------------ | | Sampletype | string | 類型代碼 | heart_rate | | Platform | string | 平台代碼 | apple_health | | Unit | string | 單位 | BPM | | Description | string | 說明/描述 | 說明文字 | | CreatedBy | string | 建立人 | Staff01 | #### **修改** **Request methods:** PATCH **route**: /api/SampletypeSupportUnit | 欄位名稱 | 欄位類型 | 說明 | 資料範例 | |:---------- |:-------- |:---------------- |:------------------------------------ | | UUId | string | 對外唯一識別編號 | 21EC2020-3AEA-1069-A2DD-08002B30309D | | Sampletype | string | 類型代碼 | heart_rate | | Platform | string | 平台代碼 | apple_health | | UpdatedBy | string | 最後編輯者 | Staff02 | #### **刪除** **Request methods:** DELETE **route:** api/SampletypeSupportUnit/:id --- ## 資料表結構 ### 身體數據資料表 資料表名稱:body_composition | 欄位名稱 | 欄位類型 | 說明 | 資料範例 | |:-------------- |:--------- |:----------------- |:------------------------------------- | | id | bigint | 資料表內部編號 | 1 | | uuid | string | 對外唯一識別編號 | 21EC2020-3AEA-1069-A2DD-08002B30309D | | uid | string | 使用者識別碼 | SEC6S84DF-AESD-16SD-B9FD-080664ASFF9D | | unit | string | 資料計量單位 | BPM | | startdate | timestamp | 紀錄時間/起始時間 | 2022-11-26 15:17 | | enddate | timestamp | 結束時間 | | | sampletype | string | 資料類型 | heart_rate | | sourceplatform | string | 來源平台 | apple_health | | quantity | numeric | 量 | 60 | | description | string | 註記 | | ### 來源平台列表 資料表名稱:platform | 欄位名稱 | 欄位類型 | 說明 | 資料範例 | |:------------ |:--------- |:---------------- |:------------------------------------ | | id | bigint | 資料表內部編號 | 1 | | uuid | string | 對外唯一識別編號 | 21EC2020-3AEA-1069-A2DD-08002B30309D | | codename | string | 平台代碼 | apple_health | | name | string | 名稱 | Apple Health | | description | string | 說明/描述 | data source from apple health kit | | created_by | string | 建立人 | Staff01 | | created_time | timestamp | 建立時間 | 2021-11-26 15:17 | | updated_by | string | 最後編輯者 | Staff02 | | updated_time | timestamp | 最後編輯時間 | 2022-11-26 15:17 | | is_deleted | boolean | 是否刪除 | false | ### 資料類型列表 資料表名稱:sampletype | 欄位名稱 | 欄位類型 | 說明 | 資料範例 | |:------------ |:--------- |:---------------- |:------------------------------------ | | id | bigint | 資料表內部編號 | 1 | | uuid | string | 對外唯一識別編號 | 21EC2020-3AEA-1069-A2DD-08002B30309D | | codename | string | 類型代碼 | heart_rate | | name | string | 名稱 | 心率 | | description | string | 說明/描述 | 說明文字 | | created_by | string | 建立人 | Staff01 | | created_time | timestamp | 建立時間 | 2021-11-26 15:17 | | updated_by | string | 最後編輯者 | Staff02 | | updated_time | timestamp | 最後編輯時間 | 2022-11-26 15:17 | | is_deleted | boolean | 是否刪除 | false | ### 平台支援資料類型列表 資料表名稱:platform_support_type | 欄位名稱 | 欄位類型 | 說明 | 資料範例 | |:------------ | --------- | ---------------- |:------------------------------------ | | id | bigint | 資料表內部編號 | 1 | | uuid | string | 對外唯一識別編號 | 21EC2020-3AEA-1069-A2DD-08002B30309D | | sampletype | string | 類型代碼 | heart_rate | | platform | string | 平台代碼 | apple_health | | created_by | string | 建立人 | Staff01 | | created_time | timestamp | 建立時間 | 2021-11-26 15:17 | | updated_by | string | 最後編輯者 | Staff02 | | updated_time | timestamp | 最後編輯時間 | 2022-11-26 15:17 | | is_deleted | boolean | 是否刪除 | false | ### 資料類型使用單位列表 資料表名稱:sampletype_support_unit | 欄位名稱 | 欄位類型 | 說明 | 資料範例 | |:------------ |:--------- | ---------------- |:------------------------------------ | | id | bigint | 資料表內部編號 | 1 | | uuid | string | 對外唯一識別編號 | 21EC2020-3AEA-1069-A2DD-08002B30309D | | sampletype | string | 類型代碼 | heart_rate | | platform | string | 平台代碼 | apple_health | | unit | string | 單位 | BPM | | description | string | 說明/描述 | 說明文字 | | created_by | string | 建立人 | Staff01 | | created_time | timestamp | 建立時間 | 2021-11-26 15:17 | | updated_by | string | 最後編輯者 | Staff02 | | updated_time | timestamp | 最後編輯時間 | 2022-11-26 15:17 | | is_deleted | boolean | 是否刪除 | false | POST:新增 GET:讀取 PUT:修改(修改整份文件) PATCH:修改(修改其中幾個欄位) DELETE:刪除