63 lines
820 B
Markdown
63 lines
820 B
Markdown
## GET /api/v1/user/{id}
|
|
|
|
_Requires an authorization header_
|
|
|
|
Returns a user with id = {id}
|
|
|
|
### Response:
|
|
|
|
```json
|
|
{
|
|
"id": "string",
|
|
"username": "string",
|
|
"email": "string",
|
|
"description": "string",
|
|
"admin": false,
|
|
"registerDate": 0,
|
|
"lastLogin": 0
|
|
}
|
|
```
|
|
|
|
## GET /api/v1/user/{id}/sessions
|
|
|
|
_Requires an authorization header_
|
|
|
|
Returns all sessions for a user with id = {id}
|
|
|
|
### Response:
|
|
|
|
```json
|
|
{
|
|
"sessions": [
|
|
{
|
|
"id": "string",
|
|
"userId": "string"
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
## PATCH /api/v1/user/{id}
|
|
|
|
_Requires an authorization header_
|
|
|
|
### Request:
|
|
|
|
```json
|
|
{
|
|
"email": "string?",
|
|
"description": "string?"
|
|
}
|
|
```
|
|
|
|
Updates a user with id = {id}
|
|
|
|
### Response:
|
|
|
|
```json
|
|
{
|
|
"id": "string",
|
|
"email": "string",
|
|
"description": "string"
|
|
}
|
|
```
|