mirror of
https://github.com/zkldi/Tachi.git
synced 2026-09-29 18:37:58 +03:00
* docs: migrate from mkdocs to mdbook - Rename old mkdocs docs/ to old-docs/ for reference - Set up new docs/ with mdbook (book.toml + src/ tree) - Mirror full nav structure from mkdocs.yml into SUMMARY.md - Add Justfile-docs with docs-serve, docs-build, docs-check, docs-install recipes - Import Justfile-docs from root Justfile - Rewrite .github/workflows/docs.yml: build step uses taiki-e/install-action to install mdbook, split into separate build + deploy jobs, PR builds run the check step too * ci(docs): pin actions to SHAs, install mdbook via release binary * ci(docs): install mdbook from apt instead of curling a release binary * dev: replace mkdocs python stack with mdbook in dev image * ci(docs): apt only works on Debian; restore release binary install for Ubuntu CI * docs: fix duplicate file entries in SUMMARY.md * docs: remove docs-install recipe * docs: remove site-url from book.toml to fix asset loading * dev: install mdbook from upstream release binary, not Debian apt The Debian package (0.4.x+ds) strips bundled font assets, leaving the built site without fonts/fonts.css. Use the upstream tarball (same as CI) so the theme is complete. Handles x86_64 and aarch64. * docs: vendor mdbook tarballs in dev/mdbook/, install from there Dockerfile.dev uses COPY + tar to install the right arch at build time. CI extracts the x86_64 tarball directly from the checkout. No network access required for either — and no stripped-fonts Debian package. * fix: unwritten
76 lines
1.8 KiB
Markdown
76 lines
1.8 KiB
Markdown
# Status Checks
|
|
|
|
These endpoints are generally for programmers checking their code works.
|
|
They can also be used to check the status of the server.
|
|
|
|
*****
|
|
|
|
## Check server status.
|
|
|
|
```GET /api/v1/status```
|
|
|
|
This endpoint is a status check for the API and the consumer,
|
|
It's a good way of sanity checking whether your code works.
|
|
|
|
### Parameters
|
|
|
|
| Property | Type | Description |
|
|
| :: | :: | :: |
|
|
| `echo` | String | A string to echo. This is useful for checking whether parameters are sending over properly. |
|
|
|
|
|
|
### Response
|
|
|
|
| Property | Type | Description |
|
|
| :: | :: | :: |
|
|
| `serverTime` | Integer | The current time of the server in Unix Milliseconds. |
|
|
| `startTime` | Integer | The time this server was booted in Unix Milliseconds. |
|
|
| `whoami` | Integer \| null | The userID you are authenticated as. If you are not authenticated, this is null. |
|
|
| `version` | String | The current version of Tachi-Server running. |
|
|
| `permissions` | Array<string> | The permissions this request had. |
|
|
| `echo` (Conditional) | String | If an `echo` parameter was provided, this is that exact parameter. |
|
|
|
|
### Example
|
|
|
|
`GET /api/v1/status?echo=helloworld`
|
|
|
|
```json
|
|
{
|
|
"serverTime": 1623331110661,
|
|
"version": "v2.0.0 (Mysterons)",
|
|
"permissions": ["score_submit", "example_permission"],
|
|
"echo": "helloworld"
|
|
}
|
|
```
|
|
|
|
*****
|
|
|
|
## Check server status with POST.
|
|
|
|
```POST /api/v1/status```
|
|
|
|
This endpoint is identical to `GET /status`, but it responds to POST requests,
|
|
and takes the `echo` parameter from the request body.
|
|
|
|
This is a good way to check whether your code sends JSON
|
|
bodies properly.
|
|
|
|
### Example
|
|
|
|
```json
|
|
POST /api/v1/status
|
|
```
|
|
```
|
|
{
|
|
"echo": "hello world"
|
|
}
|
|
```
|
|
|
|
```json
|
|
{
|
|
"serverTime": 1623331110662,
|
|
"version": "v2.0.0 (Mysterons)",
|
|
"permissions": ["score_submit", "example_permission"],
|
|
"echo": "hello world"
|
|
}
|
|
``` |