2023-08-24 17:28:00 +01:00
|
|
|
# API Docs
|
|
|
|
|
|
|
|
**Description:**
|
|
|
|
|
|
|
|
**Version:** `v0`
|
|
|
|
|
2023-08-24 17:55:59 +01:00
|
|
|
<h2 id='list-of-endpoints'>List of Endpoints</h2>
|
|
|
|
|
2023-08-28 14:43:15 +01:00
|
|
|
* Documents
|
2023-09-25 17:43:30 +01:00
|
|
|
* [Get Documents](#documents-get-documents)
|
2023-09-25 13:08:33 +01:00
|
|
|
* [Get One](#documents-get-one)
|
2023-09-25 17:43:30 +01:00
|
|
|
* [Get a tag](#documents-get-a-tag)
|
|
|
|
* [Get Version](#documents-get-version)
|
2023-08-28 14:43:15 +01:00
|
|
|
* [Update Content](#documents-update-content)
|
2023-10-03 18:27:08 +01:00
|
|
|
* Users
|
|
|
|
* [Get Users](#users-get-users)
|
2023-10-18 18:54:03 +01:00
|
|
|
* [Create User](#users-create-user)
|
2023-08-24 17:28:00 +01:00
|
|
|
|
2023-09-25 17:43:30 +01:00
|
|
|
<h3 id='documents-get-documents'>Get Documents (<a href='#list-of-endpoints'>go to full list</a>)</h3>
|
|
|
|
|
|
|
|
Get the paths to all the documents under the specified paths
|
|
|
|
|
|
|
|
`GET /api/v0/docs/`
|
|
|
|
|
|
|
|
**Response body:**
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
[
|
|
|
|
{
|
|
|
|
id: string // UUID formatted as `00000000-0000-0000-0000-000000000000`
|
|
|
|
path: string
|
|
|
|
date: string // Date timestamp formatted as `2006-01-02T15:00:00Z`
|
|
|
|
metadata: {
|
|
|
|
owner: string
|
|
|
|
tags: [
|
|
|
|
unknown
|
|
|
|
]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
last_retrievals: [
|
|
|
|
{
|
|
|
|
user: string
|
|
|
|
when: string // Date timestamp formatted as `2006-01-02T15:00:00Z`
|
|
|
|
}
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
```
|
|
|
|
|
2023-09-25 13:08:33 +01:00
|
|
|
<h3 id='documents-get-one'>Get One (<a href='#list-of-endpoints'>go to full list</a>)</h3>
|
|
|
|
|
2023-09-25 17:43:30 +01:00
|
|
|
Get the document in the specified path
|
2023-09-25 13:08:33 +01:00
|
|
|
|
|
|
|
`GET /api/v0/docs/{path}`
|
|
|
|
|
|
|
|
**Path Params:**
|
|
|
|
|
|
|
|
| name | type | elaboration |
|
|
|
|
|---|---|---|
|
|
|
|
| `path` | `string` | |
|
|
|
|
|
|
|
|
**Response body:**
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
{
|
|
|
|
id: string // UUID formatted as `00000000-0000-0000-0000-000000000000`
|
|
|
|
date: string // Date timestamp formatted as `2006-01-02T15:00:00Z`
|
|
|
|
pathParam: string
|
|
|
|
body: string
|
2023-09-25 17:43:30 +01:00
|
|
|
version: {
|
|
|
|
date: string // Date timestamp formatted as `2006-01-02T15:00:00Z`
|
|
|
|
number: number
|
|
|
|
}
|
|
|
|
|
2023-09-25 13:08:33 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
```
|
|
|
|
|
2023-09-25 17:43:30 +01:00
|
|
|
<h3 id='documents-get-a-tag'>Get a tag (<a href='#list-of-endpoints'>go to full list</a>)</h3>
|
|
|
|
|
|
|
|
Get the tag of the document in the specified path and tag label
|
|
|
|
|
|
|
|
`GET /api/v0/docs/{path}/tag/{tagName}`
|
|
|
|
|
|
|
|
**Path Params:**
|
|
|
|
|
|
|
|
| name | type | elaboration |
|
|
|
|
|---|---|---|
|
|
|
|
| `path` | `string` | |
|
|
|
|
| `tagName` | `string` | |
|
|
|
|
|
|
|
|
**Response body:**
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
unknown
|
|
|
|
```
|
|
|
|
|
|
|
|
<h3 id='documents-get-version'>Get Version (<a href='#list-of-endpoints'>go to full list</a>)</h3>
|
|
|
|
|
|
|
|
Get all the version of the document in the specified path
|
|
|
|
|
|
|
|
`GET /api/v0/docs/{path}/versions`
|
|
|
|
|
|
|
|
**Path Params:**
|
|
|
|
|
|
|
|
| name | type | elaboration |
|
|
|
|
|---|---|---|
|
|
|
|
| `path` | `string` | |
|
|
|
|
|
|
|
|
**Response body:**
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
[
|
|
|
|
{
|
|
|
|
date: string // Date timestamp formatted as `2006-01-02T15:00:00Z`
|
|
|
|
number: number
|
|
|
|
}
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
```
|
|
|
|
|
2023-08-28 14:43:15 +01:00
|
|
|
<h3 id='documents-update-content'>Update Content (<a href='#list-of-endpoints'>go to full list</a>)</h3>
|
2023-08-24 17:28:00 +01:00
|
|
|
|
2023-09-19 17:12:34 +01:00
|
|
|
Update the content of the document with the specified path and ID if the last update is before the indicated date
|
2023-08-24 17:28:00 +01:00
|
|
|
|
2023-08-28 14:43:15 +01:00
|
|
|
`POST /api/v0/docs/{path}`
|
2023-08-24 17:28:00 +01:00
|
|
|
|
|
|
|
**Query Params:**
|
|
|
|
|
|
|
|
| name | type | elaboration |
|
|
|
|
|---|---|---|
|
|
|
|
| `id` | `string` | UUID formatted as `00000000-0000-0000-0000-000000000000` |
|
|
|
|
| `date` | `string` | Date timestamp formatted as `2006-01-02T15:00:00Z` |
|
|
|
|
|
|
|
|
**Path Params:**
|
|
|
|
|
|
|
|
| name | type | elaboration |
|
|
|
|
|---|---|---|
|
|
|
|
| `path` | `string` | |
|
|
|
|
|
|
|
|
**Request body:**
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
{
|
|
|
|
content: string
|
|
|
|
}
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
**Response body:**
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
{
|
|
|
|
id: string // UUID formatted as `00000000-0000-0000-0000-000000000000`
|
|
|
|
date: string // Date timestamp formatted as `2006-01-02T15:00:00Z`
|
|
|
|
pathParam: string
|
|
|
|
body: string
|
|
|
|
}
|
|
|
|
|
|
|
|
```
|
|
|
|
|
2023-10-03 18:27:08 +01:00
|
|
|
<h3 id='users-get-users'>Get Users (<a href='#list-of-endpoints'>go to full list</a>)</h3>
|
|
|
|
|
|
|
|
Get the list of registered users
|
|
|
|
|
|
|
|
`GET /api/v0/users/`
|
|
|
|
|
|
|
|
**Response body:**
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
[
|
|
|
|
{
|
|
|
|
name: string
|
|
|
|
surname: string
|
|
|
|
email: string
|
|
|
|
}
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
```
|
|
|
|
|
2023-10-18 18:54:03 +01:00
|
|
|
<h3 id='users-create-user'>Create User (<a href='#list-of-endpoints'>go to full list</a>)</h3>
|
|
|
|
|
|
|
|
Create a user
|
|
|
|
|
|
|
|
`POST /api/v0/users/`
|
|
|
|
|
|
|
|
**Request body:**
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
[
|
|
|
|
{
|
|
|
|
name: string
|
|
|
|
surname: string
|
|
|
|
email: string
|
|
|
|
}
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
```
|
|
|
|
|