OpenAPI definition (v0)

Download OpenAPI specification:

User Avatars

The avatars displayed for a user.

Get User's Avatar

Gets specified user's avatar.

path Parameters
userId
required
integer <int32>

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "timestamp": "2019-08-24T14:15:22Z"
}

Update User's Avatar

Updates specified user's avatar.

path Parameters
userId
required
integer <int32>
Request Body schema: application/json
file
required
string <binary>

Responses

Request samples

Content type
application/json
{
  • "file": "string"
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "timestamp": "2019-08-24T14:15:22Z"
}

Delete User's Avatar

Deletes specified user's avatar.

path Parameters
userId
required
integer <int32>

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "timestamp": "2019-08-24T14:15:22Z"
}

Get My Avatar

Gets the current user's avatar.

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "timestamp": "2019-08-24T14:15:22Z"
}

Update My Avatar

Updates the current user's avatar.

Request Body schema: application/json
file
required
string <binary>

Responses

Request samples

Content type
application/json
{
  • "file": "string"
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "timestamp": "2019-08-24T14:15:22Z"
}

Delete My Avatar

Deletes the current user's avatar.

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "timestamp": "2019-08-24T14:15:22Z"
}

Authorities

Authorites can be applied to roles and specify what functionality that role has access to.

Get Authorities

Get list of all authorities.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get Authority

Get specific authority.

path Parameters
id
required
integer <int32>

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "authority": "string"
}

User Roles

The roles applied to a specific user.

Get User's Roles

Get list of roles applied to a user.

path Parameters
userId
required
integer <int32>

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add User's Roles

Add list of roles applied to a user.

  • If a role ID is not found in the system, it will not be applied to the user.
  • If a role ID is already applied to the user, it will remain applied.

path Parameters
userId
required
integer <int32>
Request Body schema: application/json
required
Array
integer <int32>

Responses

Request samples

Content type
application/json
[
  • 0
]

Response samples

Content type
application/json
[
  • {
    }
]

Set User's Roles

Set list of roles applied to a user.

  • If a role ID is not found in the system, it will not be applied to the user.

path Parameters
userId
required
integer <int32>
Request Body schema: application/json
required
Array
integer <int32>

Responses

Request samples

Content type
application/json
[
  • 0
]

Response samples

Content type
application/json
[
  • {
    }
]

Remove User's Roles

Remove list of roles applied to a user.

  • If a role ID is not applied to the user, it will remain not applied.

path Parameters
userId
required
integer <int32>
Request Body schema: application/json
required
Array
integer <int32>

Responses

Request samples

Content type
application/json
[
  • 0
]

Response samples

Content type
application/json
[
  • {
    }
]

Roles

Roles contain a set of authorities which athorize users access different functionality.

Get Role

Get specific role's information.

path Parameters
id
required
integer <int32>

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "authorityIds": [
    ]
}

Update Role

Update a specific role.

  • The name of the role must not be empty.
  • The name of the role must not conflict with an existing role.
  • Ignores id from request body.
  • Any field missing or null from request body will be left unchanged in user information.

path Parameters
id
required
integer <int32>
Request Body schema: application/json
required
id
integer <int32>
name
string
authorityIds
Array of integers <int32> [ items <int32 > ]

Responses

Request samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "authorityIds": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "authorityIds": [
    ]
}

Delete Role

Delete a specific role.

path Parameters
id
required
integer <int32>

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "timestamp": "2019-08-24T14:15:22Z"
}

Get Roles

Get list of all role's information.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create Role

Create a new role.

  • The name of the role must not be empty.
  • The name of the role must not conflict with an existing role.

Request Body schema: application/json
required
id
integer <int32>
name
string
authorityIds
Array of integers <int32> [ items <int32 > ]

Responses

Request samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "authorityIds": [
    ]
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "authorityIds": [
    ]
}

Authentication

Handles user login and registration.

Register

Register a new user.

Request Body schema: application/json
required
username
string
password
string

Responses

Request samples

Content type
application/json
{
  • "username": "string",
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "accessToken": "string",
  • "tokenType": "string",
  • "expires": "2019-08-24T14:15:22Z"
}

Login

Login to an existing user.

Request Body schema: application/json
required
username
string
password
string

Responses

Request samples

Content type
application/json
{
  • "username": "string",
  • "password": "string"
}

Response samples

Content type
application/json
{
  • "accessToken": "string",
  • "tokenType": "string",
  • "expires": "2019-08-24T14:15:22Z"
}

Users

System users.

Get User

Get specific user's information.

path Parameters
id
required
integer <int32>

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "username": "string",
  • "firstname": "string",
  • "lastname": "string"
}

Update User

Update specific user's information.

  • Ignores id and password from request body.
  • Any field missing or null from request body will be left unchanged in user information.

path Parameters
id
required
integer <int32>
Request Body schema: application/json
required
id
integer <int32>
username
string
firstname
string
lastname
string

Responses

Request samples

Content type
application/json
{
  • "id": 0,
  • "username": "string",
  • "firstname": "string",
  • "lastname": "string"
}

Response samples

Content type
application/json
[
  • 0
]

Delete User

Deletes specific user.

path Parameters
id
required
integer <int32>

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "timestamp": "2019-08-24T14:15:22Z"
}

Get Me

Get the current user's information.

Responses

Response samples

Content type
application/json
{
  • "id": 0,
  • "username": "string",
  • "firstname": "string",
  • "lastname": "string"
}

Update Me

Update the current user's information.

  • Ignores id and password from request body.
  • Any field missing or null from request body will be left unchanged in user information.

Request Body schema: application/json
required
id
integer <int32>
username
string
firstname
string
lastname
string

Responses

Request samples

Content type
application/json
{
  • "id": 0,
  • "username": "string",
  • "firstname": "string",
  • "lastname": "string"
}

Response samples

Content type
application/json
{
  • "id": 0,
  • "username": "string",
  • "firstname": "string",
  • "lastname": "string"
}

Delete Me

Deletes the current user.

Responses

Update My Password

Updates the current user's password.

Request Body schema: application/json
required
string

Responses

Request samples

Content type
application/json
"string"

Response samples

Content type
application/json
{
  • "message": "string",
  • "timestamp": "2019-08-24T14:15:22Z"
}

Get Users

Get paginated list of user's information.

  • If size excedes limit, response will contain up to limit.

query Parameters
page
integer <int32>
Default: 0
size
integer <int32>

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Heartbeat

Verify the backend is running.

Heartbeat

Always returns true.

Responses

Response samples

Content type
application/json
true