AIC API (1.0.0)

Download OpenAPI specification:

Welcome to the AIC API – a comprehensive RESTful interface for managing users, providers, API keys, licenses, logs, and more. This API supports robust authentication, detailed resource management, and advanced work requests through LLM integration.

User Login

Authenticates a user using the provided credentials and returns two secure HTTP-only cookies for session management: - AICUserCookie: The primary access token (JWT) with a shorter expiration time - AICAuthCookie: The refresh/secondary token (JWT) with a longer expiration time, used for obtaining new access tokens Both cookies are set with the SameSite=Strict attribute and the secure flag to enhance security. The AICAuthCookie is specifically set with path=/auth to restrict its scope.

Request Body schema: application/vnd.api+json
required
required
object
required
object
grantType
required
string

Grant type for authentication; should always be "password".

userName
required
string

The userName of the user attempting to log in.

password
required
string

The user's password.

Responses

Response Headers
Set-Cookie
string
Examples:
  • AICUserCookie=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...; SameSite=Strict; secure; HttpOnly - Primary access token cookie with SameSite=Strict and secure flags
  • AICAuthCookie=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...; path=/auth; SameSite=Strict; secure; HttpOnly - Refresh token cookie with path=/auth, SameSite=Strict and secure flags

Contains both secure HTTP-only cookies: AICUserCookie (access token) and AICAuthCookie (refresh token)

Response Schema: application/json
code
required
number

HTTP status code indicating success

message
required
string

A human-readable success message

Response Schema: application/json
code
required
number
message
required
string
Response Schema: application/vnd.api+json
code
required
number

HTTP status code

exception
required
string

Error type

message
required
string

Detailed error message

Request samples

Content type
application/vnd.api+json
Example
{
  • "data": {
    • "attributes": {
      • "grantType": "password",
      • "userName": "admin",
      • "password": "admin"
      }
    }
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Login successful"
}

Token Authentication

Authenticates a user using token credentials. The request must include a "grantType" of "Bearer" and a "tokenType" that specifies whether an access token or a refresh token is being used. For "accessToken" requests, the payload must include an "accessToken"; for "refreshToken" requests, it must include a "refreshToken". Successful authentication returns either a success message or, for refresh requests, a new set of tokens.

Request Body schema: application/vnd.api+json
required
required
object
required
object
grantType
required
string
Value: "Bearer"

Must be "Bearer".

tokenType
required
string
Enum: "accessToken" "refreshToken"

Specifies the token type being authenticated.

accessToken
string

Required if tokenType is "accessToken".

refreshToken
string

Required if tokenType is "refreshToken".

Responses

Response Schema: application/vnd.api+json
One of
code
required
number
message
required
string
Response Schema: application/json
code
required
number
message
required
string
Response Schema: application/json
code
required
number
message
required
string

Request samples

Content type
application/vnd.api+json
{
  • "data": {
    • "attributes": {
      • "grantType": "Bearer",
      • "tokenType": "accessToken",
      • "accessToken": "string",
      • "refreshToken": "string"
      }
    }
}

Response samples

Content type
application/vnd.api+json
{
  • "accessToken": "string",
  • "refreshToken": "string",
  • "grantType": "string",
  • "message": "string"
}

User Logout

Logs out the authenticated user. This endpoint supports authentication via a Bearer token or via cookies. The request body must include a "data" object with an "attributes" object containing: • grantType: Must be "Bearer". • tokenType: Must be "accessToken". • accessToken: The current access token (used if token-based authentication is in effect). • logoutDevice: Specifies which devices to log out ("currentDevice", "otherDevices", or "allDevices").

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/vnd.api+json
required
required
object
required
object
grantType
required
string
Value: "Bearer"

Grant type for authentication.

tokenType
required
string
Value: "accessToken"

Type of token being used.

accessToken
required
string

The current access token; required for token-based auth.

logoutDevice
required
string
Enum: "currentDevice" "otherDevices" "allDevices"

Specifies which devices to log out.

Responses

Request samples

Content type
application/vnd.api+json
{
  • "data": {
    • "attributes": {
      • "grantType": "Bearer",
      • "tokenType": "accessToken",
      • "accessToken": "string",
      • "logoutDevice": "currentDevice"
      }
    }
}

Create a New User

Creates a new user account with the provided details. Administrative privileges are required to perform this operation. The new user will be assigned the specified username, password, display name, email, and optionally, roles.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/vnd.api+json
required
required
object
required
object
userName
required
string

Unique userName for the new user.

password
required
string

Password for the new user account.

displayName
required
string

Human-friendly display name.

email
required
string

Contact email address.

active
required
boolean

Indicates if the account should be active.

isDeleted
required
boolean

Flag to mark the account as soft-deleted.

Array of objects

List of roles to assign to the user (only role ID is required).

Responses

Response Headers
Location
string
Example: "https://localhost:9090/users/?id=33"

URL of the newly created user resource.

Content-Location
string
Example: "https://localhost:9090/users/?id=33"

URL indicating the current location of the user resource.

UserId
string
Example: "33"

Unique identifier of the newly created user.

Content-Type
string
Example: "application/vnd.api+json; charset=utf-8"

The media type of the response.

Connection
string
Example: "Close"

Connection header indicating connection handling.

Request samples

Content type
application/vnd.api+json
{
  • "data": {
    • "attributes": {
      • "userName": "john.doe",
      • "password": "SecurePassword123",
      • "displayName": "John Doe",
      • "email": "john.doe@example.com",
      • "active": true,
      • "isDeleted": false,
      • "roles": [
        • {
          }
        ]
      }
    }
}

Retrieve Users

Retrieves either all users or a specific user if an ID is provided. Requires an authenticated session with administrative privileges.

Authorizations:
bearerAuthcookieAuth
query Parameters
currentUser
boolean

Optional, if true returns the current (authorised) user. If omitted, returns users base on other paramaters.

id
integer <int64>

Optional unique identifier of the user. If provided, returns a single user. If omitted, returns all matching users.

isDeleted
boolean

Optional. If true, return deleted users. If false, returns not-deleted users. If omitted, returns all matching users.

active
boolean

Optional. If true, return active users. If false, returns inactive users. If omitted, returns all matching users.

userNameContains
string

Optional. If provided, return users whose names contain the userNameContains value. If omitted, returns all matching users.

page[size]
integer

The number of results to return per page.

page[number]
integer

The page number for pagination.

Responses

Response Schema: application/vnd.api+json
object
Array of objects (User)

Response samples

Content type
application/vnd.api+json
{
  • "meta": {
    • "totalCount": 0,
    • "pageNumber": 0,
    • "pageSize": 0
    },
  • "data": [
    • {
      • "id": 0,
      • "userName": "string",
      • "displayName": "string",
      • "email": "string",
      • "active": true,
      • "isDeleted": true,
      • "roles": [
        • {
          }
        ],
      • "groups": [
        • null
        ]
      }
    ]
}

Soft Delete a User

Marks a user as deleted by setting the "isDeleted" flag to true. This is a soft delete operation and requires administrative privileges.

Authorizations:
bearerAuthcookieAuth
query Parameters
id
required
integer

Unique identifier of the user to be soft-deleted.

Responses

Response Headers
Content-Type
string
Example: "application/vnd.api+json; charset=utf-8"

The media type of the response.

Connection
string
Example: "Keep-Alive"

Connection header indicating connection handling.

Update User Details

Updates user details. If no user ID is specified, updates the authenticated user's details. Updating other users requires admin permissions.

Authorizations:
bearerAuthcookieAuth
query Parameters
id
integer
Example: id=1

ID of the user to update. If not provided, updates the authenticated user.

Request Body schema: application/vnd.api+json
required
required
object
required
object
newPassword
string

The new password for the user.

currentPassword
string

The current password for the user.

displayName
string

The updated display name for the user.

email
string <email>

The updated email address for the user.

active
boolean

The updated active status for the user.

Array of objects

The updated roles for the user (only role ID is required).

Responses

Response Headers
Content-Type
string
Example: "application/vnd.api+json; charset=utf-8"
Response Schema: application/vnd.api+json
object

Request samples

Content type
application/vnd.api+json
{
  • "data": {
    • "attributes": {
      • "newPassword": "admin",
      • "currentPassword": "admin",
      • "displayName": "admin",
      • "email": "admin@admin.com",
      • "active": true,
      • "roles": [
        • {
          }
        ]
      }
    }
}

Response samples

Content type
application/vnd.api+json
{ }

Get Providers

Get all providers or a specific provider if URL is provided

Authorizations:
bearerAuthcookieAuth
query Parameters
id
integer

Provider ID to filter by

Responses

Response Schema: application/vnd.api+json
Array
id
integer

Unique identifier for the provider.

name
string

Name of the provider.

url
string

URL endpoint of the provider.

authMethod
string

The authentication method used.

apiKey
string

API key associated with the provider.

Array of objects

List of models offered.

Response samples

Content type
application/vnd.api+json
[
  • {
    • "id": 0,
    • "name": "string",
    • "url": "string",
    • "authMethod": "string",
    • "apiKey": "string",
    • "models": [
      • {
        • "id": 0,
        • "name": "string"
        }
      ]
    }
]

Create a New Provider

Adds a new provider to the system. Administrative privileges are required.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/vnd.api+json
required
required
object
required
object
id
integer

Unique identifier for the provider.

name
required
string

Human-readable name of the provider.

url
required
string

URL endpoint of the provider.

authMethod
required
string

Authentication method used by the provider.

apiKey
required
string

API key associated with the provider.

models
required
Array of strings

List of models or services offered.

Responses

Response Headers
Date
string <date-time>

Date and time of the response.

Connection
string

Connection status of the response.

Content-Type
string

Media type of the response.

Location
string

URL or resource ID for the newly created provider.

Content-Location
string

URL or resource ID for accessing the created provider.

ProviderId
string

Unique identifier for the created provider.

Request samples

Content type
application/vnd.api+json
{
  • "data": {
    • "attributes": {
      • "id": 0,
      • "name": "string",
      • "url": "string",
      • "authMethod": "string",
      • "apiKey": "string",
      • "models": [
        • "string"
        ]
      }
    }
}

Update a provider

Updates the details of an existing provider, including its name, API URL, and authentication details. Administrative privileges are required.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/vnd.api+json
required
required
object
required
object
id
integer

Unique identifier for the provider.

name
string

Updated name of the provider.

url
string

Updated URL API endpoint of the provider.

authMethod
string

Updated authentication method.

apiKey
string

Updated API key.

Responses

Request samples

Content type
application/vnd.api+json
{
  • "data": {
    • "attributes": {
      • "id": 0,
      • "name": "string",
      • "url": "string",
      • "authMethod": "string",
      • "apiKey": "string"
      }
    }
}

Delete a Provider

Deletes a provider from the system after verifying administrative privileges. This operation permanently removes the provider.

Authorizations:
bearerAuthcookieAuth
query Parameters
id
integer

Unique identifier of the provider to delete.

Responses

Retrieve All Models for a Provider

Retrieves a list of all models associated with a specified provider.

Authorizations:
bearerAuthcookieAuth
path Parameters
id
required
integer

Unique identifier of the provider.

Responses

Response Schema: application/vnd.api+json
Array
object

A model object.

Response samples

Content type
application/vnd.api+json
[
  • { }
]

Add a New Model to a Provider

Creates a new model under the specified provider.

Authorizations:
bearerAuthcookieAuth
path Parameters
id
required
integer

Unique identifier of the provider.

Request Body schema: application/vnd.api+json
required
required
object
required
object
name
required
string

The name of the new model.

Responses

Response Headers
Location
string

Resource identifier of the new model.

ModelId
integer

Unique identifier of the new model.

Request samples

Content type
application/vnd.api+json
{
  • "data": {
    • "attributes": {
      • "name": "string"
      }
    }
}

Retrieve Model by ID

Retrieves detailed information for a specific model associated with a provider.

Authorizations:
bearerAuthcookieAuth
path Parameters
id
required
integer

Unique identifier of the provider.

modelId
required
integer

Unique identifier of the model.

Responses

Update a Model

Partially updates an existing model. Currently, only the model's name can be updated.

Authorizations:
bearerAuthcookieAuth
path Parameters
id
required
integer

Unique identifier of the provider.

modelId
required
integer

Unique identifier of the model.

Request Body schema: application/vnd.api+json
required
required
object
required
object
name
required
string

The updated name for the model.

Responses

Request samples

Content type
application/vnd.api+json
{
  • "data": {
    • "attributes": {
      • "name": "string"
      }
    }
}

Delete a Model

Deletes an existing model from the specified provider.

Authorizations:
bearerAuthcookieAuth
path Parameters
id
required
integer

Unique identifier of the provider.

modelId
required
integer

Unique identifier of the model.

Responses

Retrieve API Keys

Retrieves a list of API keys. The only supported filter is by userId; if omitted, all keys may be returned (depending on privileges).

Authorizations:
bearerAuthcookieAuth
query Parameters
userId
integer

Filter API keys by the associated user ID.

isDeleted
boolean

Optional. If true, return deleted API keys. If false, returns not-deleted API keys. If omitted, returns all matching API keys.

isExpired
boolean

Optional. If true, return expired API keys. If false, returns unexpired API keys. If omitted, returns all matching API keys.

nameContains
string

Optional. If provided, return API keys whose names contain the nameContains value. If omitted, returns all matching API keys.

page[size]
integer

The number of results to return per page.

page[number]
integer

The page number for pagination.

Responses

Response Schema: application/vnd.api+json
object
Array of objects

Response samples

Content type
application/vnd.api+json
{
  • "meta": {
    • "totalCount": 0,
    • "pageNumber": 0,
    • "pageSize": 0
    },
  • "data": [
    • {
      • "id": 0,
      • "name": "string",
      • "userId": 0,
      • "userName": "string",
      • "createdBy": 0,
      • "creatorName": "string",
      • "expiry": "2019-08-24T14:15:22Z",
      • "provider": 0,
      • "providerName": "string",
      • "permissions": [
        • {
          }
        ],
      • "lockedTime": "2019-08-24T14:15:22Z",
      • "lastUsed": "2019-08-24T14:15:22Z",
      • "isExpired": true,
      • "isDeleted": true
      }
    ]
}

Create a New API Key

Generates a new API key for a specific user (and possibly provider). The key includes defined permissions and an expiry date, and is used to authenticate and authorize requests.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/vnd.api+json
required
required
object
required
object
name
required
string

A unique name for the API key.

expiry
required
string <date-time>

Expiration date and time for the API key.

required
Array of objects

List of permissions associated with the key.

provider
integer

Unique identifier of the provider linked to this key.

user
integer

Unique identifier of the user associated with this key.

Responses

Response Schema: application/json
message
string

Success message.

key
string

The generated API key.

Request samples

Content type
application/vnd.api+json
{
  • "data": {
    • "attributes": {
      • "name": "string",
      • "expiry": "2019-08-24T14:15:22Z",
      • "permissions": [
        • {
          }
        ],
      • "provider": 0,
      • "user": 0
      }
    }
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "key": "string"
}

Delete API Key(s)

Deletes one or more existing API keys. Either the user who owns the keys or an admin can perform this. If user or name is omitted, defaults apply: - If user is omitted, the currently authenticated user is assumed. - If name is omitted, all API keys for the given user are deleted.

Authorizations:
bearerAuthcookieAuth

Responses

Update an Existing API Key

Updates properties of an existing API key. For example, it can be used to mark an API key as expired, update provider id or the key name.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/vnd.api+json
required
required
object
required
object
name
required
string
expire
string
Enum: "true" "false"
provider
integer
newName
string
user
required
integer

Responses

Response Schema: application/json
message
string

Request samples

Content type
application/vnd.api+json
{
  • "data": {
    • "attributes": {
      • "name": "string",
      • "expire": "true",
      • "provider": 0,
      • "newName": "string",
      • "user": 0
      }
    }
}

Response samples

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

Retrieve All Features

Retrieves a list of all available features in the system.

Authorizations:
bearerAuthcookieAuth

Responses

Response Schema: application/vnd.api+json
Array
id
integer

Unique identifier for the feature.

name
string

The name of the feature.

Response samples

Content type
application/vnd.api+json
[
  • {
    • "id": 0,
    • "name": "string"
    }
]

Create a New Feature

Adds a new feature to the system. Administrative privileges are required.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/vnd.api+json
required
required
object
required
object
id
required
integer

Unique identifier for the feature.

name
required
string

Descriptive name of the feature.

Responses

Response Headers
Location
string

URL or resource ID of the newly created feature.

Request samples

Content type
application/vnd.api+json
{
  • "data": {
    • "attributes": {
      • "id": 0,
      • "name": "string"
      }
    }
}

Delete a Feature

Deletes an existing feature identified by its unique ID. This operation requires administrative privileges.

Authorizations:
bearerAuthcookieAuth
path Parameters
id
required
integer

Unique identifier of the feature to be deleted.

Responses

Retrieve All User Roles

Retrieves a list of all user roles defined in the system.

Authorizations:
bearerAuthcookieAuth

Responses

Create a New Role

Adds a new user role to the system. Administrative privileges are required.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/vnd.api+json
required
required
object
required
object
id
required
integer

Unique identifier for the role.

name
required
string

The name of the role.

Responses

Request samples

Content type
application/vnd.api+json
{
  • "data": {
    • "attributes": {
      • "id": 0,
      • "name": "string"
      }
    }
}

Delete a Role

Deletes an existing user role identified by its unique ID. Administrative privileges are required.

Authorizations:
bearerAuthcookieAuth
path Parameters
id
required
integer

Unique identifier of the role to be deleted.

Responses

Submit a Work Request

Submits a work request to the Language Model (LLM) provider. Only the model field is required; any additional fields are passed through. You can authenticate either with an API key or a Bearer token.

Authorizations:
apiKeyAuthbearerAuth
Request Body schema: application/vnd.api+json
required
model
required
string

The identifier of the model to use (required). All other properties (prompt, messages, etc.) are optional pass-through

Responses

Response Schema: application/vnd.api+json
completion
string

The text generated by the LLM (if applicable).

Request samples

Content type
application/vnd.api+json
{
  • "model": "string"
}

Response samples

Content type
application/vnd.api+json
{
  • "completion": "string"
}

Retrieve Cached Entries

Retrieves cached data entries from the system. You can filter results using search terms, date ranges, or the user ID of the cache owner.

Authorizations:
bearerAuthcookieAuth
query Parameters
start
string <date-time>

Filter cache entries by a start date/time.

end
string <date-time>

Filter cache entries by an end date/time.

search
string

A search term to filter cache entries.

id
integer

Filter results by the user ID who created the cache entry.

page[size]
integer

The number of results to return per page.

page[number]
integer

The page number for pagination.

Responses

Response Schema: application/vnd.api+json
object
data
Array of objects

Response samples

Content type
application/vnd.api+json
{
  • "meta": {
    • "totalCount": 0,
    • "pageNumber": 0,
    • "pageSize": 0
    },
  • "data": [
    • { }
    ]
}

Retrieve Logged Requests

Retrieves a list of logged requests. You can filter the logs by date range, search term, log type, source, and the user ID who created the log.

Authorizations:
bearerAuthcookieAuth
query Parameters
start
string <date-time>

The start date/time for filtering logs.

end
string <date-time>

The end date/time for filtering logs.

search
string

Filter logs by text content.

type
string

Filter logs by log type (e.g., "Not Set", "Message", or "WorkRequest").

source
string

Filter logs by source (e.g., "Cache", "Worker", "Not Set").

id
integer

Filter logs by the user ID that created the log.

page[size]
integer

The number of log entries to return per page.

page[number]
integer

The page number for pagination.

Responses

Response Schema: application/vnd.api+json
object
Array of objects

Response samples

Content type
application/vnd.api+json
{
  • "meta": {
    • "totalCount": 0,
    • "pageNumber": 0,
    • "pageSize": 0
    },
  • "data": [
    • {
      • "id": 0,
      • "correlationId": "string",
      • "entrySource": "string",
      • "entryType": "string",
      • "message": "string",
      • "payload": "string",
      • "timeStamp": "2019-08-24T14:15:22Z",
      • "userId": 0
      }
    ]
}

Retrieve Licensing Information

Retrieves the current licensing status of the system, including key validity, expiry, and usage limits.

Authorizations:
bearerAuthcookieAuth

Responses

Response Schema: application/vnd.api+json
object
object
hasKey
boolean

Indicates if a license key is present.

type
string

The type of license (e.g., "CL" or "OP").

valid
boolean

Indicates whether the license is currently valid.

expiry
string <date>

The expiry date of the license.

expiresIn
integer

Time remaining until the license expires (in days).

maxActiveUses
integer

The maximum number of active uses allowed.

activeUseLifeTime
integer

The lifetime (in seconds) of an active use.

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "attributes": {
      • "hasKey": true,
      • "type": "string",
      • "valid": true,
      • "expiry": "2019-08-24",
      • "expiresIn": 0,
      • "maxActiveUses": 0,
      • "activeUseLifeTime": 0
      }
    }
}

Add or Update a License Key

Adds a new license key or updates an existing one. The provided license key is validated before being applied. Administrative privileges are required.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/vnd.api+json
required
required
object
required
object
licenceKey
required
string

The new license key to be applied.

Responses

Response Schema: application/json
code
integer
message
string

Request samples

Content type
application/vnd.api+json
{
  • "data": {
    • "attributes": {
      • "licenceKey": "string"
      }
    }
}

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Licence key added successfully"
}

Retrieve Licensing Usage Statistics

Returns statistics on current usage and historical daily peaks. Administrative privileges may be required.

Authorizations:
bearerAuthcookieAuth

Responses

Response Schema: application/json
object
object
currentUses
integer

Current active usage count.

Array of objects

Response samples

Content type
application/json
{
  • "data": {
    • "stats": {
      • "currentUses": 0,
      • "peakDailyUses": [
        • {
          }
        ]
      }
    }
}

Retrieve Rules

Returns rules matching the query parameters. Does not require a valid license, but requires appropriate permissions.

Authorizations:
bearerAuthcookieAuth
query Parameters
userId
integer

Return rules applying to a given User ID.

groupId
integer

Return rules applying to a given Group ID.

providerId
integer

Return rules applying to a given Provider ID.

name
string

Return rules with the given name.

allResults
boolean

If true, returns all matching rules regardless of pagination.

page[number]
integer

The page number to return (if pagination applies).

page[size]
integer

The number of results per page (if pagination applies).

Responses

Response Schema: application/json
Array of objects
Array
id
integer
name
string
description
string
enabled
boolean
regex
string
userId
integer

ID of the user this rule applies to, 0 for Everyone, null if not user-specific

groupId
integer

ID of the group this rule applies to, 0 for Everyone, null if not group-specific

providerId
integer

ID of the provider this rule applies to, 0 for Any

userName
string

Name of the user or 'Everyone' if userId=0, or omitted if userId=null

groupName
string

Name of the group or 'Everyone' if groupId=0, or omitted if groupId=null

providerName
string

Name of the provider or 'Any' if providerId=0

Response samples

Content type
application/json
{
  • "data": [
    • {
      • "id": 0,
      • "name": "string",
      • "description": "string",
      • "enabled": true,
      • "regex": "string",
      • "userId": 0,
      • "groupId": 0,
      • "providerId": 0,
      • "userName": "string",
      • "groupName": "string",
      • "providerName": "string"
      }
    ]
}

Create a New Rule

Creates a new rule. Exactly one of userId or groupId can be specified (or 0 for "Everyone"). If omitted, userId/groupId defaults to null. If name already exists, returns an error.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
required
required
object
required
object
name
required
string
description
required
string
enabled
boolean
regex
required
string
userId
integer
groupId
integer
providerId
integer

Responses

Request samples

Content type
application/json
{
  • "data": {
    • "attributes": {
      • "name": "string",
      • "description": "string",
      • "enabled": true,
      • "regex": "string",
      • "userId": 0,
      • "groupId": 0,
      • "providerId": 0
      }
    }
}

Update an Existing Rule

Updates an existing rule by ID. The id must be provided in the data object. If name collides with another existing rule, an error is returned.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
required
required
object
id
required
integer

The rule ID to update.

required
object

Responses

Request samples

Content type
application/json
{
  • "data": {
    • "id": 0,
    • "attributes": {
      • "name": "string",
      • "description": "string",
      • "enabled": true,
      • "regex": "string",
      • "userId": 0,
      • "groupId": 0,
      • "providerId": 0
      }
    }
}

Delete a Rule

Deletes an existing rule by ID. The ID is provided as a query parameter.

Authorizations:
bearerAuthcookieAuth
query Parameters
id
required
integer

The ID of the rule to delete.

Responses

Retrieve Version Information

Returns the current system version, including Git commit, product version, and whether an update is available. This endpoint does not require authentication.

Responses

Response Schema: application/json
object
branch
string

The full Git branch name the application was built from.

git
string

The Git commit ID the application was built from.

productVersion
string

The current product version.

updateAvailable
string

Indicates update status. Can be 'None' (no update available), 'NotChecked' (update check not performed), 'Disabled' (update checking is disabled), or a version number (e.g. '1.0.3') indicating the available update version.

Response samples

Content type
application/json
{
  • "data": {
    • "branch": "string",
    • "git": "string",
    • "productVersion": "string",
    • "updateAvailable": "string"
    }
}

Trigger Update Check

Initiates an asynchronous check for updates. The check uses the current License Key to authenticate with the Keygen servers. This endpoint does not require authentication.

Responses

Trigger Update Check

Alternative endpoint to initiate an asynchronous check for updates. Functions identically to POST /version. The check uses the current License Key to authenticate with the Keygen servers. This endpoint does not require authentication.

Responses

Create a new Group

Creates a new group with a given name and a number of User members. Members can be added/removed later with a subsequent Patch/Delete request. This requires authentication, and the authenticated user will need Permission to create a group.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
required
required
object
required
object
name
required
string
Array of objects

Responses

Request samples

Content type
application/json
{
  • "data": {
    • "attributes": {
      • "name": "string",
      • "members": [
        • {
          }
        ]
      }
    }
}

Get Group data

Gets data about a group (or all groups). Groups can be obtained by Group ID, Name or whether they contain specifier users. This requires authentication and Permission to view all Groups.

Authorizations:
bearerAuthcookieAuth
query Parameters
id
integer

The ID of the Group to get. If omitted, all groups will be obtained, filtered and returned.

name
string

The name of the Group to get. Overrides other query parameters.

userName
string

Get all Groups containing the user with the given name

userId
integer

Get all Groups containing the user with the given ID

Responses

Response Schema: application/vnd.api+json
Array of objects
Array
id
integer

The ID of the Group entry in the database.

name
string

The name of the Group.

Array of objects

An array of all the members assigned to the Group

Response samples

Content type
application/vnd.api+json
{
  • "data": [
    • {
      • "id": 0,
      • "name": "string",
      • "members": [
        • {
          }
        ]
      }
    ]
}

Delete a Group

Deletes an existing Group by ID. The ID is provided as a query parameter. This requires authentication and permission to delete a Group.

Authorizations:
bearerAuthcookieAuth
query Parameters
id
required
integer

The ID of the Group to delete.

Responses

Get the Group with ID {id}

Gets the data for the Group with ID {id}. This requires authentication and Permission to view all groups.

Authorizations:
bearerAuthcookieAuth

Responses

Response Schema: application/vnd.api+json
object
id
integer

The ID of the Group entry in the database.

name
string

The name of the Group.

Array of objects

An array of all the members assigned to the Group

Response samples

Content type
application/vnd.api+json
{
  • "data": {
    • "id": 0,
    • "name": "string",
    • "members": [
      • {
        • "name": "string",
        • "id": 0
        }
      ]
    }
}

Delete the Group with ID {id}

Deletes the Group with the ID {id}, and any Rules associated with that specific Group. This requires authentication and permission to delete a Group.

Authorizations:
bearerAuthcookieAuth

Responses

Update the Group with ID {id}

Update the name of the Group with ID {id}, and/or change the members that belong to it. This requires authentication and Permission to modify a Group.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
required
required
object
required
object
name
string

The new name to give the Group

Array of objects

An array containing the IDs of users the Group should contain. Existing group members will be replaced with this new set.

Responses

Request samples

Content type
application/json
{
  • "data": {
    • "attributes": {
      • "name": "string",
      • "members": [
        • {
          }
        ]
      }
    }
}

Get members of a Group

Gets the array of members for the Group with ID {id}. This requires authentication and Permission to view all groups.

Authorizations:
bearerAuthcookieAuth

Responses

Response Schema: application/vnd.api+json
Array of objects

An array of all the Group members

Array
name
string

The name of the User

id
integer

The ID of the User

Response samples

Content type
application/vnd.api+json
{
  • "data": [
    • {
      • "name": "string",
      • "id": 0
      }
    ]
}

Add a member to a Group

Adds the User with the ID given in the payload to the set of members in Group with ID {id}.

Authorizations:
bearerAuthcookieAuth
Request Body schema: application/json
required
required
object
required
object
id
required
integer

The ID of a User to add to the Group.

Responses

Request samples

Content type
application/json
{
  • "data": {
    • "attributes": {
      • "id": 0
      }
    }
}

Remove member with ID {userId} from Group with ID {id}

Removes the specified User from the Group with ID {id}. This requires authentication and permission to modify a Group.

Authorizations:
bearerAuthcookieAuth

Responses