cbadmin API (0.0.1-alpha)

Download OpenAPI specification:Download

E-mail: info@akitogo.com License: Apache 2.0

Permission

Permission object related operations

Get a list of existing permissions

Get a list of existing permissions

query Parameters
qs
string

Query string used for filtering / sorting / paging the returned results

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new permission

Create a new permission

Request Body schema: application/json

Fields needed to create and/or update a Permission

isDeleted
boolean

Flag which marks the entry as removed.

permission
string

Name of the permission

permissionGroups
Array of integers

Array of permission groups that this permission is assigned to (for POST/PUT/PATCH requests this should be an array of permission group IDs)

roles
Array of integers

Array of roles that this permission is assigned to (for POST/PUT/PATCH requests this should be an array of role IDs)

description
string

Description of the permission

Responses

Request samples

Content type
application/json
{
  • "isDeleted": false,
  • "permission": "create user",
  • "permissionGroups": [
    ],
  • "roles": [
    ],
  • "description": "Allows creating new users"
}

Update an exising permission

Update an exising permission

path Parameters
permissionId
required
string
Default: ""

permissionId

Request Body schema: application/json

Fields needed to create and/or update a Permission

isDeleted
boolean

Flag which marks the entry as removed.

permission
string

Name of the permission

permissionGroups
Array of integers

Array of permission groups that this permission is assigned to (for POST/PUT/PATCH requests this should be an array of permission group IDs)

roles
Array of integers

Array of roles that this permission is assigned to (for POST/PUT/PATCH requests this should be an array of role IDs)

description
string

Description of the permission

Responses

Request samples

Content type
application/json
{
  • "isDeleted": false,
  • "permission": "create user",
  • "permissionGroups": [
    ],
  • "roles": [
    ],
  • "description": "Allows creating new users"
}

Get details of a specific permission

Get details of a specific permission

path Parameters
permissionId
required
string
Default: ""

permissionId

Responses

Response samples

Content type
application/json
{
  • "isDeleted": false,
  • "permission": "create user",
  • "permissionId": "56",
  • "numberOfGroups": 8,
  • "createdDate": "2021-05-29 07:31:06",
  • "numberOfRoles": 5,
  • "permissionGroups": [
    ],
  • "modifiedDate": "2021-04-22 23:59:59",
  • "roles": [
    ],
  • "description": "Allows creating new users"
}

Delete an existing permission

Delete an existing permission

path Parameters
permissionId
required
string
Default: ""

permissionId

Responses

PermissionGroup

Permission group object related operations

Get a list of existing permission groups

Get a list of existing permission groups

query Parameters
qs
string

Query string used for filtering / sorting / paging the returned results

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new permission group

Create a new permission group

Request Body schema: application/json

Fields needed to create and/or update a Permission Group

isDeleted
boolean

Flag which marks the entry as removed.

permissions
Array of integers

Array of permissions that belong to this psermission group (for POST/PUT/PATCH requests this should be an array of permission IDs)

name
string

Name of the permission group

description
string

Description of the permission group

Responses

Request samples

Content type
application/json
{
  • "isDeleted": false,
  • "permissions": [
    ],
  • "name": "user management",
  • "description": "Permissions related to user management (view, edit, create, delete etc.)"
}

Update an exising permission group

Update an exising permission group

path Parameters
permissionGroupId
required
string
Default: ""

permissionGroupId

Request Body schema: application/json

Fields needed to create and/or update a Permission Group

isDeleted
boolean

Flag which marks the entry as removed.

permissions
Array of integers

Array of permissions that belong to this psermission group (for POST/PUT/PATCH requests this should be an array of permission IDs)

name
string

Name of the permission group

description
string

Description of the permission group

Responses

Request samples

Content type
application/json
{
  • "isDeleted": false,
  • "permissions": [
    ],
  • "name": "user management",
  • "description": "Permissions related to user management (view, edit, create, delete etc.)"
}

Get details of a specific permission group

Get details of a specific permission group

path Parameters
permissionGroupId
required
string
Default: ""

permissionGroupId

Responses

Response samples

Content type
application/json
{
  • "isDeleted": false,
  • "numberOfPermissions": "4",
  • "permissionGroupId": "49",
  • "permissions": [
    ],
  • "numberOfUsers": "2",
  • "createdDate": "2021-05-29 07:31:06",
  • "name": "user management",
  • "modifiedDate": "2021-04-22 23:59:59",
  • "description": "Permissions related to user management (view, edit, create, delete etc.)",
  • "permissionList": "Lorem ipsum dolor sit amet..."
}

Delete an existing permission group

Delete an existing permission group

path Parameters
permissionGroupId
required
string
Default: ""

permissionGroupId

Responses

Role

Role object related operations

Get a list of existing roles

Get a list of existing roles

query Parameters
qs
string

Query string used for filtering / sorting / paging the returned results

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new role

Create a new role

Request Body schema: application/json

Fields needed to create and/or update a Role

isDeleted
boolean

Flag which marks the entry as removed.

permissions
Array of integers

Array of permissions that are assigned to this role. For POST/PUT/PATCH requests this should be a list of permission IDs

role
string

Role name

description
string

Description of the role

Responses

Request samples

Content type
application/json
{
  • "isDeleted": false,
  • "permissions": [
    ],
  • "role": "administrator",
  • "description": "This is the role for system administrators"
}

Update an exising role

Update an exising role

path Parameters
roleId
required
string
Default: ""

roleId

Request Body schema: application/json

Fields needed to create and/or update a Role

isDeleted
boolean

Flag which marks the entry as removed.

permissions
Array of integers

Array of permissions that are assigned to this role. For POST/PUT/PATCH requests this should be a list of permission IDs

role
string

Role name

description
string

Description of the role

Responses

Request samples

Content type
application/json
{
  • "isDeleted": false,
  • "permissions": [
    ],
  • "role": "administrator",
  • "description": "This is the role for system administrators"
}

Get details of a specific role

Get details of a specific role

path Parameters
roleId
required
string
Default: ""

roleId

Responses

Response samples

Content type
application/json
{
  • "isDeleted": false,
  • "numberOfPermissions": "4",
  • "permissions": [
    ],
  • "numberOfUsers": "2",
  • "createdDate": "2021-05-29 07:31:06",
  • "roleId": "123",
  • "role": "administrator",
  • "modifiedDate": "2021-04-22 23:59:59",
  • "description": "This is the role for system administrators",
  • "permissionList": "Lorem ipsum dolor sit amet..."
}

Delete an existing role

Delete an existing role

path Parameters
roleId
required
string
Default: ""

roleId

Responses

User

User object related operations

Get a list of users

Get a list of users

query Parameters
qs
string

Query string used for filtering / sorting / paging the returned results

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Update an exising user

Update an exising user

path Parameters
userId
required
string
Default: ""

userId

Request Body schema: application/json

Fields needed to create and/or update a User

language
string

Language of the user unterface. GET requests return the language object, for POST/PUT/PATCH requests this should be a struct with a languageId field)

isDeleted
boolean

Flag which marks the entry as removed.

isPasswordReset
boolean

Flag indicating that the user is resetting their password

isActive
boolean

Flag marking if a user is active. Inactive users won't be able to log in

is2FactorAuth
boolean

Flag indicating if the user account uses two factor authentication

lastName
string

Last name of the user

permissionGroups
Array of integers

Array of permission groups that are assigned to this user (for POST/PUT/PATCH requests this should be an array of permission group IDs)

role
string

Role object which is assigned to this user (for POST/PUT/PATCH requests this should be a struct with a roleId field)

preferences
string

Custom user preferences stored in JSON format

firstName
string

First name of the user

username
string

Username of the user. This is used for logging in

email
string

E-mail address of the user

Responses

Request samples

Content type
application/json
{
  • "language": "{ 'languageId':some_language_id }",
  • "isDeleted": false,
  • "isPasswordReset": false,
  • "isActive": true,
  • "is2FactorAuth": false,
  • "lastName": "Doe",
  • "permissionGroups": [
    ],
  • "role": "{ 'roleId':some_role_id }",
  • "preferences": "{'color':'red','car':'mercedes'}",
  • "firstName": "John",
  • "username": "akiuser",
  • "email": "email@example.com"
}

Get details of a specific user

Get details of a specific user

path Parameters
userId
required
string
Default: ""

userId

Responses

Response samples

Content type
application/json
{
  • "language": "{ language object }",
  • "isDeleted": false,
  • "userId": "18364",
  • "isPasswordReset": false,
  • "isActive": true,
  • "is2FactorAuth": false,
  • "lastLogin": "2021-10-50 15:12:22",
  • "lastName": "Doe",
  • "createdDate": "2021-05-29 07:31:06",
  • "permissionGroups": [
    ],
  • "role": "{ role object }",
  • "preferences": "{'color':'red','car':'mercedes'}",
  • "loggedIn": true,
  • "firstName": "John",
  • "modifiedDate": "2021-04-22 23:59:59",
  • "username": "akiuser",
  • "permissionList": "Lorem ipsum dolor sit amet...",
  • "email": "email@example.com"
}

Auth

Authentication operations - user account creation, password reset, login, logout

Activate user's account with token.

Activate user's account with token.

Request Body schema: application/json

Fields required to activate a new account

token
required
string

Account activation token

Responses

Request samples

Content type
application/json
{
  • "token": "BC7395219AA7E9BACE59323EEE8E2FAA"
}

Check if the account activation token is valid.

Check if the account activation token is valid.

Request Body schema: application/json

Fields required to check if the account activation token is valid

token
required
string

Account activation token which will be check if it is valid

Responses

Request samples

Content type
application/json
{
  • "token": "BC7395219AA7E9BACE59323EEE8E2FAA"
}

Check if the password reset token is valid.

Check if the password reset token is valid.

Request Body schema: application/json

Fields required to check if the password reset request token is valid

token
required
string

Password reset which will be check if it is valid

Responses

Request samples

Content type
application/json
{
  • "token": "BC7395219AA7E9BACE59323EEE8E2FAA"
}

Try to log a user into the system. If invalid credentials are provided, cbSecurity will thwor an IvalidCredentials error. The REST handler will automatically return the correct response.

Try to log a user into the system. If invalid credentials are provided, cbSecurity will thwor an IvalidCredentials error. The REST handler will automatically return the correct response.

Request Body schema: application/json

Fields required to log a user into the system

username
required
string

The username used to log in

password
required
string

User's password

Responses

Request samples

Content type
application/json
{
  • "username": "myuser2021",
  • "password": "Ae]=a=XWk%qx>JCh"
}

Log user out of the system.

Log user out of the system.

Responses

Register a new user.

Register a new user.

Request Body schema: application/json

Fields required to log a user into the system

firstname
required
string

The user's first name

lastname
required
string

The user's last name

email
required
string

The user's email address

username
required
string

The user's requested username, which will be used to log into the system.

password
required
string

The user's password

acceptPrivacyPolicy
boolean

Flag indicating that the user accepted the privacy policy. This field might be required, depending on module configuration.

Responses

Request samples

Content type
application/json
{
  • "firstname": "John",
  • "lastname": "Doe",
  • "email": "john@example.com",
  • "username": "johndoe2021",
  • "password": "Ae]=a=XWk%qx>JCh",
  • "acceptPrivacyPolicy": false
}

Request reset password link. Requires firstname, lastname and email to identify the user.

Request reset password link. Requires firstname, lastname and email to identify the user.

Request Body schema: application/json

Fields required to start the reset password procedure and receive the reset password link

firstname
required
string

User's first name

lastname
required
string

User's last name

email
required
string

User's email

Responses

Request samples

Content type
application/json
{
  • "firstname": "John",
  • "lastname": "Doe",
  • "email": "johndoe@example.com"
}

Update the user's password. Requires a valid password reset token.

Update the user's password. Requires a valid password reset token.

Request Body schema: application/json

Fields required to update a users's password

newPassword
required
string

User's new password

repeatPassword
required
string

User's new password (repeated)

Responses

Request samples

Content type
application/json
{
  • "newPassword": ";KMbZr?6!`Md{PXp",
  • "repeatPassword": ";KMbZr?6!`Md{PXp"
}

Config

Configuration related operations

Get the module configuration (ex. settings required on the registration page)

Get the module configuration (ex. settings required on the registration page)

Responses