Log in
Logs the user in with the given username and the given password
Authorizations:
Request Body schema: application/json
Login data
| username | string |
| password | string |
Responses
Request samples
- Payload
{- "username": "demo",
- "password": "123456"
}Response samples
- 400
- 401
{- "status": "string",
- "statusCode": 0,
- "timestamp": "2019-08-24T14:15:22Z",
- "message": "string",
- "detail": {
- "errorName": "string"
}
}Sign up
Signs the user up with the given attributes
Authorizations:
Request Body schema: application/json
The sign up properties
string | |
| username | string |
| password | string |
Responses
Request samples
- Payload
{- "email": "demo@mai.com",
- "username": "demo",
- "password": "123456"
}Response samples
- 400
- 401
{- "status": "string",
- "statusCode": 0,
- "timestamp": "2019-08-24T14:15:22Z",
- "message": "string",
- "detail": {
- "errorName": "string"
}
}Log the client out
Log the client out by replacing the jwt cookie with a pre-login one
Authorizations:
Responses
Response samples
- 401
{- "status": "Unauthorized",
- "statusCode": 401,
- "timestamp": "2020-05-03T13:21:35.938Z",
- "message": "You're not authorized to view the requested resourced.",
- "detail": {
- "errorName": "UnauthorizedError"
}
}Check if logged in
Check if the current state of the client indicates that it is logged in. Checks the jwt token and the payload within.
Authorizations:
Responses
Response samples
- 200
- 401
{- "id": 0,
- "username": "string",
- "email": "string",
- "isBetaUser": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}Change password of currently logged in user
Change the password of the currently logged in user. There are some conditions that have to be true, before a call to this endpoint will succeed.
- The new password has to be different than the old password
- The new password has to fulfill the typical password constraints
- The old password has to be correct
Authorizations:
Request Body schema: application/json
The old and new password.
| oldPassword | string |
| newPassword | string |
Responses
Request samples
- Payload
{- "oldPassword": "string",
- "newPassword": "string"
}Response samples
- 400
- 401
- 500
{- "status": "Bad Request",
- "statusCode": 400,
- "timestamp": "2020-05-03T13:21:35.938Z",
- "message": "Your new password has to be different than your old password.",
- "detail": {
- "errorName": "BadRequestError"
}
}Change password of currently logged in user
Change the password of the currently logged in user. There are some conditions that have to be true, before a call to this endpoint will succeed.
- The new password has to be different than the old password
- The new password has to fulfill the typical password constraints
- The old password has to be correct
Authorizations:
Request Body schema: application/json
The old and new password.
| oldPassword | string |
| newPassword | string |
Responses
Request samples
- Payload
{- "oldPassword": "string",
- "newPassword": "string"
}Response samples
- 400
- 401
- 500
{- "status": "Bad Request",
- "statusCode": 400,
- "timestamp": "2020-05-03T13:21:35.938Z",
- "message": "Your new password has to be different than your old password.",
- "detail": {
- "errorName": "BadRequestError"
}
}Create new pseudo-random profile picture
Generates a new pseudo-random profile picture with the given username as seed. An offset can be send with the username to generate a different profile picture for the same username. The same username and offset will always produce the same profile picture.
Authorizations:
query Parameters
| username required | string |
| offset | number |
Responses
Response samples
- 400
{- "status": "Bad Request",
- "statusCode": 400,
- "timestamp": "2020-05-03T13:21:35.938Z",
- "message": "The sent request is missing required attributes.",
- "detail": {
- "errorName": "BadRequestError"
}
}Searches for users
Searches for a limited list of users which start with the specified query. The maximum amount of the list is 20 users
Authorizations:
query Parameters
| filter required | string Filters with what the username of the returned users should start with |
| limit | number Limits the amount of users which are returned. Maximum is 20. |
Responses
Response samples
- 200
- 400
{- "users": [
- {
- "id": 0,
- "username": "string"
}
]
}Get the profile picture
Get the profile picture of the user with the given id
Authorizations:
path Parameters
| userId required | integer The id of the user |
Responses
Response samples
- 404
{- "status": "Not found",
- "statusCode": 404,
- "timestamp": "2020-05-03T13:21:35.938Z",
- "message": "A user with id 4 doesn't exist",
- "detail": {
- "errorName": "UserNotFoundError",
- "userId": 4
}
}Get all invites
Get a list of all invites of the currently logged in user
Authorizations:
Responses
Response samples
- 200
- 401
- 500
{- "invites": [
- {
- "userId": 0,
- "groupId": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "invitedBy": 0,
- "InviteSender": {
- "id": 0,
- "username": "string"
}, - "Group": {
- "id": 0,
- "name": "string",
- "description": "string",
- "ownerId": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "Owner": {
- "id": 0,
- "username": "string"
}
}
}
]
}Joins the group
Joins the group with the given id by accepting an invite for it
Authorizations:
path Parameters
| groupId required | integer The id of the group |
Responses
Response samples
- 400
- 401
- 404
{- "status": "Bad Request",
- "statusCode": 400,
- "timestamp": "2020-05-03T13:21:35.938Z",
- "message": "The sent request is missing required attributes.",
- "detail": {
- "errorName": "BadRequestError"
}
}Gets groups
Returns the list of groups the currently logged in user is a member of
Authorizations:
Responses
Response samples
- 200
- 401
{- "groups": [
- {
- "id": 0,
- "name": "string",
- "description": "string",
- "ownerId": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "Owner": {
- "id": 0,
- "username": "string"
}
}
]
}Creates a new group
Create a new group with the currently logged in user as admin and owner.
Authorizations:
Request Body schema: application/json
The initial group data.
| name required | string |
| description | string |
Responses
Request samples
- Payload
{- "name": "Family group",
- "description": "Our new group for the family"
}Response samples
- 201
- 400
- 401
- 500
{- "id": 0,
- "name": "string",
- "description": "string",
- "ownerId": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}Get group data
Get the data of a group if the user is a member of that group
Authorizations:
path Parameters
| groupId required | integer The id of the group |
Responses
Response samples
- 200
- 400
- 401
- 404
{- "id": 0,
- "name": "string",
- "description": "string",
- "ownerId": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "Owner": {
- "id": 0,
- "username": "string"
}
}Updates a group
Updated the group with the given data. The user can only update a group if the user is an admin of that group.
Authorizations:
path Parameters
| groupId required | integer The id of the group |
Request Body schema: application/json
The data with which the group should be updated
| name | string |
| description | string |
Responses
Request samples
- Payload
{- "name": "Family group",
- "description": "Our new group for the family"
}Response samples
- 200
- 400
- 401
- 404
{- "id": 0,
- "name": "string",
- "description": "string",
- "ownerId": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}Deletes a group
Delete the group which has the given id if the user which requests the action is the owner of that group
Authorizations:
path Parameters
| groupId required | integer The id of the group |
Responses
Response samples
- 401
- 404
{- "status": "Unauthorized",
- "statusCode": 401,
- "timestamp": "2020-05-03T13:21:35.938Z",
- "message": "You're not authorized to view the requested resourced.",
- "detail": {
- "errorName": "UnauthorizedError"
}
}Get all invited users of this group
Gets a list of all users which are invited to the specified group.
Authorizations:
path Parameters
| groupId required | integer The id of the group |
Responses
Response samples
- 200
- 400
- 404
{- "invites": [
- {
- "userId": 0,
- "groupId": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "invitedBy": 0,
- "InviteSender": {
- "id": 0,
- "username": "string"
}, - "User": {
- "id": 0,
- "username": "string"
}
}
]
}Invites a user to the group
Invites a user to the group
Authorizations:
path Parameters
| groupId required | integer The id of the group |
Request Body schema: application/json
Either the id or the username of the user. If both are provided the username will be ignored.
| userId | integer |
Responses
Request samples
- Payload
{- "username": "test-user"
}Response samples
- 201
- 400
- 401
- 404
{- "userId": 0,
- "groupId": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "invitedBy": 0
}Leaves the specified group
Removes the currently logged in user from the specified group.
Authorizations:
path Parameters
| groupId required | integer The id of the group |
Responses
Response samples
- 400
- 500
{- "status": "Bad Request",
- "statusCode": 400,
- "timestamp": "2020-05-03T13:21:35.938Z",
- "message": "The sent request is missing required attributes.",
- "detail": {
- "errorName": "BadRequestError"
}
}Get members
Get the list of members of the specified group
Authorizations:
path Parameters
| groupId required | integer The id of the group |
Responses
Response samples
- 200
- 400
- 401
{- "members": [
- {
- "User": {
- "id": 0,
- "username": "string"
}, - "isAdmin": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "userId": 0,
- "groupId": 0
}
]
}Kicks a user
Kicks the specified user from the specified group. The owner can kick any user, an admin can kick any non-admin user and normal members cannot kick any user.
Authorizations:
path Parameters
| groupId required | integer The id of the group |
| userId required | integer The id of the user |
Responses
Response samples
- 200
- 400
- 401
- 404
[- {
- "User": {
- "id": 0,
- "username": "string"
}, - "isAdmin": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "userId": 0,
- "groupId": 0
}
]Grants a user admin permissions
Grants the specified user admin permissions.
Authorizations:
path Parameters
| groupId required | integer The id of the group |
| userId required | integer The id of the user |
Responses
Response samples
- 400
- 401
{- "status": "Bad Request",
- "statusCode": 400,
- "timestamp": "2020-05-03T13:21:35.938Z",
- "message": "The sent request is missing required attributes.",
- "detail": {
- "errorName": "BadRequestError"
}
}Grants a user admin permissions
Grants the specified user admin permissions.
Authorizations:
path Parameters
| groupId required | integer The id of the group |
| userId required | integer The id of the user |
Responses
Response samples
- 400
- 401
{- "status": "Bad Request",
- "statusCode": 400,
- "timestamp": "2020-05-03T13:21:35.938Z",
- "message": "The sent request is missing required attributes.",
- "detail": {
- "errorName": "BadRequestError"
}
}Transfers ownership to specified user
Transfers the ownership of the currently logged in user of the specified group to the specified user
Authorizations:
path Parameters
| groupId required | integer The id of the group |
| userId required | integer The id of the user |
Responses
Response samples
- 200
- 400
- 401
{- "id": 0,
- "name": "string",
- "description": "string",
- "ownerId": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "Owner": {
- "id": 0,
- "username": "string"
}
}Get all cars
Get a list of all cars for the specified group
Authorizations:
path Parameters
| groupId required | integer The id of the group |
Responses
Response samples
- 200
- 400
- 401
- 500
{- "cars": [
- {
- "groupId": 0,
- "carId": 0,
- "name": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "color": "Red",
- "driverId": 0,
- "Driver": {
- "id": 0,
- "username": "string"
}
}
]
}Create a car
Creates a new car for the specified group. Only an admin can do this.
Authorizations:
path Parameters
| groupId required | integer The id of the group |
Request Body schema: application/json
Car data
| name | string |
| color | string (CarColor) Enum: "Red" "Green" "Blue" "Black" "Yellow" "White" "Purple" "Brown" "Orange" |
Responses
Request samples
- Payload
{- "name": "string",
- "color": "Red"
}Response samples
- 201
- 400
- 401
- 500
{- "groupId": 0,
- "carId": 0,
- "name": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "color": "Red",
- "driverId": 0
}Delete a car
If the logged-in user is an admin of the group with the given id, they can delete the given car.
Authorizations:
path Parameters
| groupId required | integer The id of the group |
| carId required | integer The id of the car |
Responses
Response samples
- 400
- 401
- 404
- 500
{- "status": "Bad Request",
- "statusCode": 400,
- "timestamp": "2020-05-03T13:21:35.938Z",
- "message": "The sent request is missing required attributes.",
- "detail": {
- "errorName": "BadRequestError"
}
}Drive a car
Request to drive the specified car. A user can only drive a car if they are not currently driving another car and the car is available.
Authorizations:
path Parameters
| groupId required | integer The id of the group |
| carId required | integer The id of the car |
Responses
Response samples
- 400
- 401
- 500
{- "status": "Bad Request",
- "statusCode": 400,
- "timestamp": "2020-05-03T13:21:35.938Z",
- "message": "The sent request is missing required attributes.",
- "detail": {
- "errorName": "BadRequestError"
}
}Park the car
Park the specified car at the specified location. Only the driver of a car can park a car. After this action the car will have no driver.
Authorizations:
path Parameters
| groupId required | integer The id of the group |
| carId required | integer The id of the car |
Request Body schema: application/json
The request body has to include the latitude and longitude of the location.
| latitude required | number |
| longitude required | number |
Responses
Request samples
- Payload
{- "latitude": 0,
- "longitude": 0
}Response samples
- 400
- 401
- 500
{- "status": "Bad Request",
- "statusCode": 400,
- "timestamp": "2020-05-03T13:21:35.938Z",
- "message": "The sent request is missing required attributes.",
- "detail": {
- "errorName": "BadRequestError"
}
}Get members
Get the list of members of the specified group
Authorizations:
path Parameters
| groupId required | integer The id of the group |
Responses
Response samples
- 200
- 400
- 401
{- "members": [
- {
- "User": {
- "id": 0,
- "username": "string"
}, - "isAdmin": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "userId": 0,
- "groupId": 0
}
]
}Kicks a user
Kicks the specified user from the specified group. The owner can kick any user, an admin can kick any non-admin user and normal members cannot kick any user.
Authorizations:
path Parameters
| groupId required | integer The id of the group |
| userId required | integer The id of the user |
Responses
Response samples
- 200
- 400
- 401
- 404
[- {
- "User": {
- "id": 0,
- "username": "string"
}, - "isAdmin": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "userId": 0,
- "groupId": 0
}
]Grants a user admin permissions
Grants the specified user admin permissions.
Authorizations:
path Parameters
| groupId required | integer The id of the group |
| userId required | integer The id of the user |
Responses
Response samples
- 400
- 401
{- "status": "Bad Request",
- "statusCode": 400,
- "timestamp": "2020-05-03T13:21:35.938Z",
- "message": "The sent request is missing required attributes.",
- "detail": {
- "errorName": "BadRequestError"
}
}Grants a user admin permissions
Grants the specified user admin permissions.
Authorizations:
path Parameters
| groupId required | integer The id of the group |
| userId required | integer The id of the user |
Responses
Response samples
- 400
- 401
{- "status": "Bad Request",
- "statusCode": 400,
- "timestamp": "2020-05-03T13:21:35.938Z",
- "message": "The sent request is missing required attributes.",
- "detail": {
- "errorName": "BadRequestError"
}
}Transfers ownership to specified user
Transfers the ownership of the currently logged in user of the specified group to the specified user
Authorizations:
path Parameters
| groupId required | integer The id of the group |
| userId required | integer The id of the user |
Responses
Response samples
- 200
- 400
- 401
{- "id": 0,
- "name": "string",
- "description": "string",
- "ownerId": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "Owner": {
- "id": 0,
- "username": "string"
}
}Get all cars
Get a list of all cars for the specified group
Authorizations:
path Parameters
| groupId required | integer The id of the group |
Responses
Response samples
- 200
- 400
- 401
- 500
{- "cars": [
- {
- "groupId": 0,
- "carId": 0,
- "name": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "color": "Red",
- "driverId": 0,
- "Driver": {
- "id": 0,
- "username": "string"
}
}
]
}Create a car
Creates a new car for the specified group. Only an admin can do this.
Authorizations:
path Parameters
| groupId required | integer The id of the group |
Request Body schema: application/json
Car data
| name | string |
| color | string (CarColor) Enum: "Red" "Green" "Blue" "Black" "Yellow" "White" "Purple" "Brown" "Orange" |
Responses
Request samples
- Payload
{- "name": "string",
- "color": "Red"
}Response samples
- 201
- 400
- 401
- 500
{- "groupId": 0,
- "carId": 0,
- "name": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "color": "Red",
- "driverId": 0
}Delete a car
If the logged-in user is an admin of the group with the given id, they can delete the given car.
Authorizations:
path Parameters
| groupId required | integer The id of the group |
| carId required | integer The id of the car |
Responses
Response samples
- 400
- 401
- 404
- 500
{- "status": "Bad Request",
- "statusCode": 400,
- "timestamp": "2020-05-03T13:21:35.938Z",
- "message": "The sent request is missing required attributes.",
- "detail": {
- "errorName": "BadRequestError"
}
}Drive a car
Request to drive the specified car. A user can only drive a car if they are not currently driving another car and the car is available.
Authorizations:
path Parameters
| groupId required | integer The id of the group |
| carId required | integer The id of the car |
Responses
Response samples
- 400
- 401
- 500
{- "status": "Bad Request",
- "statusCode": 400,
- "timestamp": "2020-05-03T13:21:35.938Z",
- "message": "The sent request is missing required attributes.",
- "detail": {
- "errorName": "BadRequestError"
}
}Park the car
Park the specified car at the specified location. Only the driver of a car can park a car. After this action the car will have no driver.
Authorizations:
path Parameters
| groupId required | integer The id of the group |
| carId required | integer The id of the car |
Request Body schema: application/json
The request body has to include the latitude and longitude of the location.
| latitude required | number |
| longitude required | number |
Responses
Request samples
- Payload
{- "latitude": 0,
- "longitude": 0
}Response samples
- 400
- 401
- 500
{- "status": "Bad Request",
- "statusCode": 400,
- "timestamp": "2020-05-03T13:21:35.938Z",
- "message": "The sent request is missing required attributes.",
- "detail": {
- "errorName": "BadRequestError"
}
}Change password of currently logged in user
Change the password of the currently logged in user. There are some conditions that have to be true, before a call to this endpoint will succeed.
- The new password has to be different than the old password
- The new password has to fulfill the typical password constraints
- The old password has to be correct
Authorizations:
Request Body schema: application/json
The old and new password.
| oldPassword | string |
| newPassword | string |
Responses
Request samples
- Payload
{- "oldPassword": "string",
- "newPassword": "string"
}Response samples
- 400
- 401
- 500
{- "status": "Bad Request",
- "statusCode": 400,
- "timestamp": "2020-05-03T13:21:35.938Z",
- "message": "Your new password has to be different than your old password.",
- "detail": {
- "errorName": "BadRequestError"
}
}