Add more services
This commit is contained in:
parent
91e22ed95d
commit
36c952fe81
7 changed files with 172 additions and 16 deletions
|
|
@ -12,9 +12,39 @@ Returns a user with id = {id}
|
|||
"username": "string",
|
||||
"email": "string",
|
||||
"description": "string",
|
||||
"admin": false,
|
||||
"registerDate": 0,
|
||||
"lastLogin": 0
|
||||
"admin": "boolean",
|
||||
"registerDate": "number",
|
||||
"lastLogin": "number"
|
||||
}
|
||||
```
|
||||
|
||||
## POST /api/v1/user
|
||||
|
||||
_Requires an authorization header_
|
||||
|
||||
### Request:
|
||||
|
||||
```json
|
||||
{
|
||||
"username": "string",
|
||||
"password": "string",
|
||||
"email": "string?",
|
||||
"description": "string?",
|
||||
"admin": "boolean?"
|
||||
}
|
||||
```
|
||||
|
||||
Creates a new user and returns it
|
||||
|
||||
### Response:
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "string",
|
||||
"username": "string",
|
||||
"email": "string",
|
||||
"description": "string",
|
||||
"admin": "boolean"
|
||||
}
|
||||
```
|
||||
|
||||
|
|
@ -43,6 +73,20 @@ Updates a user with id = {id}
|
|||
}
|
||||
```
|
||||
|
||||
## DELETE /api/v1/user/{id}
|
||||
|
||||
_Requires an authorization header_
|
||||
|
||||
Removes a user with id = {id}
|
||||
|
||||
### Response:
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "string"
|
||||
}
|
||||
```
|
||||
|
||||
## GET /api/v1/user/{id}/sessions
|
||||
|
||||
_Requires an authorization header_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue