api/docs/user/info.md

39 lines
1.0 KiB
Markdown
Raw Permalink Normal View History

# `/user/info` - GET
2023-09-10 15:46:32 +00:00
Returns information about the user.
## Urlencoded Parameters
2023-09-10 15:46:32 +00:00
You have to set one parameter.
Setting none or two parameters will result in a _400 Bad Request_ Response.
2023-09-10 15:46:32 +00:00
| Parameter | Description |
|-----------|--------------------------------------------------------------------|
| name | The username of the user on which the operation will be performed. |
| id | The userid of the user on which the operation will be performed. |
## Responses
2023-09-10 15:46:32 +00:00
### 200 - Success
2023-09-10 15:46:32 +00:00
__Content - JSON:__
| Field | Description |
|----------|-------------------------------------------------------------------|
| id | The users unique id. |
| username | The users unique username. |
| joined | The datetime when the user joined. Represented as UNIX timestamp. |
2023-09-10 15:46:32 +00:00
| is_admin | A boolean if the user is an admin. |
### 400 - Error: Bad Request
2023-09-10 15:46:32 +00:00
The request was malformed.
2023-09-10 15:46:32 +00:00
### 403 - Error: Forbidden
2023-09-10 15:46:32 +00:00
Blocked for security reasons.
2023-09-10 15:46:32 +00:00
### 404 - Error: Not Found
2023-09-10 15:46:32 +00:00
The user wasn't found.