mirror of
https://github.com/acepanel/panel.git
synced 2026-02-05 00:39:32 +08:00
374 lines
11 KiB
JSON
374 lines
11 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"description": "耗子面板的 API 信息",
|
|
"title": "耗子面板 API",
|
|
"contact": {
|
|
"name": "耗子科技",
|
|
"email": "admin@haozi.net"
|
|
},
|
|
"license": {
|
|
"name": "GNU Affero General Public License v3"
|
|
},
|
|
"version": "2"
|
|
},
|
|
"basePath": "/api",
|
|
"paths": {
|
|
"/info/checkUpdate": {
|
|
"get": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"信息服务"
|
|
],
|
|
"summary": "检查更新",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/service.SuccessResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/info/countInfo": {
|
|
"get": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"信息服务"
|
|
],
|
|
"summary": "统计信息",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/service.SuccessResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/info/homePlugins": {
|
|
"get": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"信息服务"
|
|
],
|
|
"summary": "首页应用",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/service.SuccessResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/info/installedDbAndPhp": {
|
|
"get": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"信息服务"
|
|
],
|
|
"summary": "已安装的数据库和PHP",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/service.SuccessResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/info/nowMonitor": {
|
|
"get": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"信息服务"
|
|
],
|
|
"summary": "实时监控",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/service.SuccessResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/info/panel": {
|
|
"get": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"信息服务"
|
|
],
|
|
"summary": "面板信息",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/service.SuccessResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/info/restart": {
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"信息服务"
|
|
],
|
|
"summary": "重启面板",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/service.SuccessResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/info/systemInfo": {
|
|
"get": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"信息服务"
|
|
],
|
|
"summary": "系统信息",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/service.SuccessResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/info/update": {
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"信息服务"
|
|
],
|
|
"summary": "更新面板",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/service.SuccessResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/info/updateInfo": {
|
|
"get": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"信息服务"
|
|
],
|
|
"summary": "版本更新信息",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/service.SuccessResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user/info/{id}": {
|
|
"get": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"用户服务"
|
|
],
|
|
"summary": "用户信息",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/service.SuccessResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user/isLogin": {
|
|
"get": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"用户服务"
|
|
],
|
|
"summary": "是否登录",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/service.SuccessResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user/login": {
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"用户服务"
|
|
],
|
|
"summary": "登录",
|
|
"parameters": [
|
|
{
|
|
"description": "request",
|
|
"name": "data",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/request.UserLogin"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/service.SuccessResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/user/logout": {
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"用户服务"
|
|
],
|
|
"summary": "登出",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/service.SuccessResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"request.UserLogin": {
|
|
"type": "object",
|
|
"required": [
|
|
"password",
|
|
"username"
|
|
],
|
|
"properties": {
|
|
"password": {
|
|
"type": "string",
|
|
"maxLength": 255,
|
|
"minLength": 6
|
|
},
|
|
"username": {
|
|
"type": "string",
|
|
"maxLength": 255,
|
|
"minLength": 3
|
|
}
|
|
}
|
|
},
|
|
"service.SuccessResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {},
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"securityDefinitions": {
|
|
"BearerToken": {
|
|
"type": "apiKey",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
}
|
|
}
|
|
} |