|
|
# Basics
|
|
|
|
|
|
The Status-API server is configured via a single JSON file. It must be mounted at `/config.json` into the container and can be set read-only. Take a look at [config.example.json](https://git.leon.wtf/leon/status-api/-/blob/master/config.example.json) for an example configuration.
|
|
|
|
|
|
# Structure
|
|
|
|
|
|
The basic structure of the config file is:
|
|
|
```json
|
|
|
{
|
|
|
"<service name>": {
|
|
|
"friendly_url": "https://some-website.de",
|
|
|
"protocol": {
|
|
|
"type": "<some type>",
|
|
|
"config": {...}
|
|
|
}
|
|
|
},
|
|
|
"<service name>": {
|
|
|
"friendly_url": "https://some-other-website.de/something",
|
|
|
"protocol": {
|
|
|
"type": "<some type>",
|
|
|
"config": {...}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
```
|
|
|
|
|
|
The keys in the first level must be the service names. They can be choosen freely and are displayed in the API response.
|
|
|
Under every key, there must be another JSON object containing the `"friendy_url":` and `"protocol":` keys. The friendly URL is always displayed in the API response. Depending on the test protocol and it's configuration, this URL is taken as the URL which will be used to determine if the service is up. But mostly, a seperate test URL can be set, which is not displayed in the API response.
|
|
|
|
|
|
|
|
|
# Protocol that is used to test the service (`"protocol":` key)
|
|
|
|
|
|
The `"protocol":` key must always contain the `"type":` key. Currently, it can be set to `"http"`, `"teamspeak"`, or `"minecraft"` (take a look at #1 for updates on protocol support). The also mandatory `"config":` key must be configured depending on the protocol type. See [Configuration/Protocol Modules](Configuration/Protocol Modules) for documentation for them. Most of the options under the `"config":` key are optional. If none of them are set, the `"config":` key can be empty (`{}`) but **not** omitted. |
|
|
\ No newline at end of file |