-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add API for checking
casaos-*
service status (#852)
Signed-off-by: Tiger Wang <tigerwang@outlook.com>
- Loading branch information
Showing
18 changed files
with
746 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
openapi: 3.0.3 | ||
|
||
info: | ||
title: CasaOS API | ||
version: v2 | ||
description: | | ||
<picture> | ||
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/IceWhaleTech/logo/main/casaos/casaos_banner_dark_night_800px.png"> | ||
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/IceWhaleTech/logo/main/casaos/casaos_banner_twilight_blue_800px.png"> | ||
<img alt="CasaOS" src="https://raw.githubusercontent.com/IceWhaleTech/logo/main/casaos/casaos_banner_twilight_blue_800px.png"> | ||
</picture> | ||
CasaOS API provides miscellaneous methods for different scenarios. | ||
For issues and discussions, please visit the [GitHub repository](https://github.com/IceWhaleTech/CasaOS) or join [our Discord](https://discord.gg/knqAbbBbeX). | ||
servers: | ||
- url: /v2/casaos | ||
|
||
tags: | ||
- name: Health methods | ||
description: |- | ||
(TODO) | ||
x-tagGroups: | ||
- name: Methods | ||
tags: | ||
- Health methods | ||
|
||
security: | ||
- access_token: [] | ||
|
||
paths: | ||
/health/services: | ||
get: | ||
tags: | ||
- Health methods | ||
summary: Get service status | ||
description: |- | ||
Get running status of each `casaos-*` service. | ||
operationId: getHealthServices | ||
responses: | ||
"200": | ||
$ref: "#/components/responses/GetHealthServicesOK" | ||
"500": | ||
$ref: "#/components/responses/ResponseInternalServerError" | ||
|
||
components: | ||
securitySchemes: | ||
access_token: | ||
type: apiKey | ||
in: header | ||
name: Authorization | ||
|
||
responses: | ||
ResponseOK: | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "#/components/schemas/BaseResponse" | ||
|
||
ResponseInternalServerError: | ||
description: Internal Server Error | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "#/components/schemas/BaseResponse" | ||
|
||
GetHealthServicesOK: | ||
description: OK | ||
content: | ||
application/json: | ||
schema: | ||
allOf: | ||
- $ref: "#/components/schemas/BaseResponse" | ||
- properties: | ||
data: | ||
$ref: "#/components/schemas/HealthServices" | ||
|
||
schemas: | ||
BaseResponse: | ||
properties: | ||
message: | ||
readOnly: true | ||
description: message returned by server side if there is any | ||
type: string | ||
example: "" | ||
|
||
HealthServices: | ||
properties: | ||
running: | ||
type: array | ||
items: | ||
type: string | ||
example: "casaos-gateway.service" | ||
not_running: | ||
type: array | ||
items: | ||
type: string | ||
example: "casaos.service" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<title>CasaOS | Developers</title> | ||
|
||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet"> | ||
|
||
<style> | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<redoc spec-url='casaos/openapi.yaml' expandResponses='all' jsonSampleExpandLevel='all'></redoc> | ||
<script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"> </script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.