Download OpenAPI specification:Download
PHP Course (ABV FU Berlin) 2024 Exam
Log in user.
| username required | string |
| password required | string |
{- "username": "string",
- "password": "string"
}{- "user": {
- "id": 0,
- "username": "string",
- "status": 0,
- "email": "string",
- "image": "string",
- "isAdmin": true,
- "memberSince": {
- "date": "2019-08-24T14:15:22Z",
- "timezone_type": 0,
- "timezone": "string"
}, - "postCount": 0
}, - "token": "string"
}Register a new user
| username required | string |
| email required | string |
| password required | string |
{- "username": "string",
- "email": "string",
- "password": "string"
}{- "id": 0,
- "username": "string",
- "status": 0,
- "email": "string",
- "image": "string",
- "isAdmin": true,
- "memberSince": {
- "date": "2019-08-24T14:15:22Z",
- "timezone_type": 0,
- "timezone": "string"
}, - "postCount": 0
}List all users.
| p | integer >= 0 Default: 0 Current page. |
| l | integer [ 0 .. 30 ] Default: 10 The number of items to return. |
{- "pages": 0,
- "data": [
- {
- "id": 0,
- "username": "string",
- "status": 0,
- "email": "string",
- "image": "string",
- "isAdmin": true,
- "memberSince": {
- "date": "2019-08-24T14:15:22Z",
- "timezone_type": 0,
- "timezone": "string"
}, - "postCount": 0
}
]
}Get user by ID.
| id required | integer <int14> User ID |
{- "id": 0,
- "username": "string",
- "status": 0,
- "email": "string",
- "image": "string",
- "isAdmin": true,
- "memberSince": {
- "date": "2019-08-24T14:15:22Z",
- "timezone_type": 0,
- "timezone": "string"
}, - "postCount": 0
}Update user with ID. Fields are updated in order username, password, image. If one fails, subsequent are not updated.
Use special ID self to update logged in user.
Requires logged in user to have admin permissions for any ID other than self.
| id required | integer <int14> User ID |
| username | string |
| password | string |
| image | string <binary> |
{- "username": "string",
- "password": "string",
- "image": "string"
}{- "id": 0,
- "username": "string",
- "status": 0,
- "email": "string",
- "image": "string",
- "isAdmin": true,
- "memberSince": {
- "date": "2019-08-24T14:15:22Z",
- "timezone_type": 0,
- "timezone": "string"
}, - "postCount": 0
}Delete user with ID.
| id required | integer <int14> User ID |
{- "id": 0,
- "username": "string",
- "status": 0,
- "email": "string",
- "image": "string",
- "isAdmin": true,
- "memberSince": {
- "date": "2019-08-24T14:15:22Z",
- "timezone_type": 0,
- "timezone": "string"
}, - "postCount": 0
}List all posts, return full user data if authenticated.
| p | integer >= 0 Default: 0 Current page. |
| l | integer [ 0 .. 30 ] Default: 10 The number of items to return. |
{- "pages": 0,
- "data": [
- {
- "id": 0,
- "user": {
- "username": "string"
}, - "content": "string",
- "postedAt": {
- "date": "2019-08-24T14:15:22Z",
- "timezone_type": 0,
- "timezone": "string"
}
}
]
}Create a new post.
| content required | string |
{- "content": "string"
}{- "id": 0,
- "user": {
- "id": 0,
- "username": "string",
- "status": 0,
- "email": "string",
- "image": "string",
- "isAdmin": true,
- "memberSince": {
- "date": "2019-08-24T14:15:22Z",
- "timezone_type": 0,
- "timezone": "string"
}, - "postCount": 0
}, - "content": "string",
- "postedAt": {
- "date": "2019-08-24T14:15:22Z",
- "timezone_type": 0,
- "timezone": "string"
}
}Update post with ID.
Requires logged in user to have admin permissions for posts not made by them.
| id required | integer <int14> Post ID |
| content | string |
{- "content": "string"
}{- "id": 0,
- "user": {
- "id": 0,
- "username": "string",
- "status": 0,
- "email": "string",
- "image": "string",
- "isAdmin": true,
- "memberSince": {
- "date": "2019-08-24T14:15:22Z",
- "timezone_type": 0,
- "timezone": "string"
}, - "postCount": 0
}, - "content": "string",
- "postedAt": {
- "date": "2019-08-24T14:15:22Z",
- "timezone_type": 0,
- "timezone": "string"
}
}Delete post with ID.
| id required | integer <int14> Post ID |
{- "id": 0,
- "user": {
- "id": 0,
- "username": "string",
- "status": 0,
- "email": "string",
- "image": "string",
- "isAdmin": true,
- "memberSince": {
- "date": "2019-08-24T14:15:22Z",
- "timezone_type": 0,
- "timezone": "string"
}, - "postCount": 0
}, - "content": "string",
- "postedAt": {
- "date": "2019-08-24T14:15:22Z",
- "timezone_type": 0,
- "timezone": "string"
}
}