M48 API 开发文档
tip
点击如下链接,可直接进行api调用 https://s.apifox.cn/1ad43eac-ee78-4bb3-b532-67818f536b14
API的鉴权
- HTTP Authentication, scheme: bearer
-
API Key (Access-Id)
- Parameter Name: Access-Id, in: header.
-
API Key (Access-Secret)
- Parameter Name: Access-Secret, in: header.
MYT BMC
GET 获取设备类型
GET /type
返回示例
200 Response
{
"code": 200,
"msg": "success",
"time": 1766982723799,
"data": {
"type": "m48"
}
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
返回数据结构
状态码 200
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » code | integer | true | none | none | |
| » msg | string | true | none | none | |
| » time | integer | true | none | none | |
| » data | object | true | none | none | |
| »» type | string | true | none | none |
GET 健康监测
GET /health
返回示例
200 Response
{
"code": 200,
"msg": "success",
"time": 1766570264287,
"data": null
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
返回数据结构
MYT BMC/通用接口/用户接口
POST 用户登录
POST /user/login
Body 请求参数
{
"username": "admin",
"password": "123456"
}
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| body | body | object | 是 | none |
返回示例
{
"code": 200,
"msg": "success",
"time": 1766569105100,
"data": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJhZG1pbiIsImV4cCI6MTc2NjY1NTUwNSwibmJmIjoxNzY2NTY5MTA1LCJpYXQiOjE3NjY1NjkxMDV9.J9Z9Vm1uk3a89OfrcUpPbvFwv0IEj6QXXQ7VwgxscQ4"
}
}
{
"code": 400,
"msg": "账号或密码错误",
"time": 1765954691054,
"data": null
}
返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |