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
167
docs/api/v1-routes/basic.mdx
Normal file
167
docs/api/v1-routes/basic.mdx
Normal file
|
@ -0,0 +1,167 @@
|
|||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
# Basic
|
||||
The basic routes of the API
|
||||
|
||||
## GET /v1/help
|
||||
Get a help message.
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
Please refer to the wiki at https://wiki.jonasjones.dev/Api/
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="500" label="500">
|
||||
```json
|
||||
{
|
||||
"status": 500,
|
||||
"statusText": "Internal Server Error"
|
||||
}
|
||||
```
|
||||
| Parameter | Type | Description |
|
||||
| ---------- | ------ | ---------------------------- |
|
||||
| status | Number | The status code of the error |
|
||||
| statusText | String | The status text of the error |
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
| Parameter | Type | Description |
|
||||
| ---------- | ------ | ---------------------------- |
|
||||
| status | Number | The status code of the error |
|
||||
| statusText | String | The status text of the error |
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
|
||||
## GET /v1/ping
|
||||
Get a ping back from the API
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
pong
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="500" label="500">
|
||||
```json
|
||||
{
|
||||
"status": 500,
|
||||
"statusText": "Internal Server Error"
|
||||
}
|
||||
```
|
||||
| Parameter | Type | Description |
|
||||
| ---------- | ------ | ---------------------------- |
|
||||
| status | Number | The status code of the error |
|
||||
| statusText | String | The status text of the error |
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
| Parameter | Type | Description |
|
||||
| ---------- | ------ | ---------------------------- |
|
||||
| status | Number | The status code of the error |
|
||||
| statusText | String | The status text of the error |
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
## GET /v1/version
|
||||
Get the version of the Rust api back-end
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
["0.0.1+alpha-build01"]
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="500" label="500">
|
||||
```json
|
||||
{
|
||||
"status": 500,
|
||||
"statusText": "Internal Server Error"
|
||||
}
|
||||
```
|
||||
| Parameter | Type | Description |
|
||||
| ---------- | ------ | ---------------------------- |
|
||||
| status | Number | The status code of the error |
|
||||
| statusText | String | The status text of the error |
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
| Parameter | Type | Description |
|
||||
| ---------- | ------ | ---------------------------- |
|
||||
| status | Number | The status code of the error |
|
||||
| statusText | String | The status text of the error |
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
||||
|
||||
## GET /v1/debug/headers
|
||||
Get the incoming headers of the request
|
||||
|
||||
:::tip[**Example** Response]
|
||||
<Tabs>
|
||||
<TabItem value="200" label="200">
|
||||
```json
|
||||
{
|
||||
"Origin": "...",
|
||||
"Referer": "...",
|
||||
"User-Agent": "...",
|
||||
"...": "..."
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="500" label="500">
|
||||
```json
|
||||
{
|
||||
"status": 500,
|
||||
"statusText": "Internal Server Error"
|
||||
}
|
||||
```
|
||||
| Parameter | Type | Description |
|
||||
| ---------- | ------ | ---------------------------- |
|
||||
| status | Number | The status code of the error |
|
||||
| statusText | String | The status text of the error |
|
||||
</TabItem>
|
||||
<TabItem value="503" label="503">
|
||||
```json
|
||||
API is down
|
||||
{
|
||||
"status": 503,
|
||||
"statusText": "Service Unavailable"
|
||||
}
|
||||
```
|
||||
| Parameter | Type | Description |
|
||||
| ---------- | ------ | ---------------------------- |
|
||||
| status | Number | The status code of the error |
|
||||
| statusText | String | The status text of the error |
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
:::
|
Loading…
Add table
Add a link
Reference in a new issue