From 54218c760082cd50e62758ce579a7e6293822064 Mon Sep 17 00:00:00 2001 From: xiaozhou233 Date: Mon, 29 Jun 2026 18:51:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0API=E6=96=87=E6=A1=A3(?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E7=94=9F=E6=88=90)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api-server/api.md | 138 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 api-server/api.md diff --git a/api-server/api.md b/api-server/api.md new file mode 100644 index 0000000..687ccd4 --- /dev/null +++ b/api-server/api.md @@ -0,0 +1,138 @@ +--- +title: 默认模块 +language_tabs: + - shell: Shell + - http: HTTP + - javascript: JavaScript + - ruby: Ruby + - python: Python + - php: PHP + - java: Java + - go: Go +toc_footers: [] +includes: [] +search: true +code_clipboard: true +highlight_theme: darkula +headingLevel: 2 +generator: "@tarslib/widdershins v4.0.30" + +--- + +# 默认模块 + +Base URLs: + +# Authentication + +# Default + +## GET 上传数据 + +GET /data/upload + +### 请求参数 + +|名称|位置|类型|必选|说明| +|---|---|---|---|---| +|token|query|string| 否 |none| +|ph|query|number| 否 |none| +|tds|query|number| 否 |none| +|turbidity|query|number| 否 |none| + +> 返回示例 + +> 200 Response + +```json +{"status":"ok","message":"data_received"} +``` + +### 返回结果 + +|状态码|状态码含义|说明|数据模型| +|---|---|---|---| +|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|none|Inline| + +### 返回数据结构 + +## GET 获取全部数据 + +GET /data/all + +### 请求参数 + +|名称|位置|类型|必选|说明| +|---|---|---|---|---| +|token|query|string| 否 |none| + +> 返回示例 + +> 200 Response + +```json +{"status":"ok","message":"data_received"} +``` + +### 返回结果 + +|状态码|状态码含义|说明|数据模型| +|---|---|---|---| +|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|none|Inline| + +### 返回数据结构 + +## GET 获取最新数据 + +GET /data/last + +### 请求参数 + +|名称|位置|类型|必选|说明| +|---|---|---|---|---| +|token|query|string| 否 |none| + +> 返回示例 + +> 200 Response + +```json +{"status":"ok","message":"data_received"} +``` + +### 返回结果 + +|状态码|状态码含义|说明|数据模型| +|---|---|---|---| +|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|none|Inline| + +### 返回数据结构 + +## GET 获取最新数据评分 + +GET /data/score + +### 请求参数 + +|名称|位置|类型|必选|说明| +|---|---|---|---|---| +|token|query|string| 否 |none| + +> 返回示例 + +> 200 Response + +```json +{"status":"ok","message":"data_received"} +``` + +### 返回结果 + +|状态码|状态码含义|说明|数据模型| +|---|---|---|---| +|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|none|Inline| + +### 返回数据结构 + +# 数据模型 +