mirror of
https://github.com/JonasunderscoreJones/docs.jonasjones.dev.git
synced 2025-10-23 11:09:18 +02:00
moved stuff around to fix slug system
This commit is contained in:
parent
31a1419cb4
commit
1f96b8fde1
11 changed files with 6 additions and 4 deletions
58
docs/api/intro.mdx
Normal file
58
docs/api/intro.mdx
Normal file
|
@ -0,0 +1,58 @@
|
|||
---
|
||||
slug: /api
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
# Introduction
|
||||
|
||||
The API aims to provide a foundation for the different parts of the [Jonas_Jones Ecosystem](/jj_ecosystem) to interact with each other.
|
||||
|
||||
## Composition
|
||||
|
||||
The APi features 2 parts, the [front-end](#front-end) and the [back-end](#back-end)
|
||||
|
||||
### Front-End
|
||||
|
||||
A cloudflare worker available on [Github](https://github.com/JonasunderscoreJones/api-worker/) that routes the traffic to the [back-end](#back-end) and has a route for the API's uptime status:
|
||||
|
||||
- GET **/status** - Get API uptime status
|
||||
:::tip[Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
API is up and running
|
||||
{
|
||||
"status": 200,
|
||||
"statusText": "Ok"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
### Back-End
|
||||
|
||||
:::info
|
||||
|
||||
The Back-End is only available when the `/status` route returns code `200`
|
||||
|
||||
In theory this should always be the case but it is not guaranteed. Downtime can occur from time to time.
|
||||
|
||||
:::
|
||||
|
||||
A Rust back-end available on [Github](https://github.com/JonasunderscoreJones/jonas_jones-api) that handles all the forwarded requests from the [front-end](#front-end). The API is currently in it's first version therefore all routes start with `/v1/`. The routes are referenced on the [v1 Routes](/category/v1-routes) page.
|
||||
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue