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.
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.
required | object | ||||||||||
|
Set-Cookie | string Examples:
Contains both secure HTTP-only cookies: AICUserCookie (access token) and AICAuthCookie (refresh token) |
code required | number HTTP status code indicating success |
message required | string A human-readable success message |
code required | number |
message required | string |
code required | number HTTP status code |
exception required | string Error type |
message required | string Detailed error message |
{- "data": {
- "attributes": {
- "grantType": "password",
- "userName": "admin",
- "password": "admin"
}
}
}
{- "code": 200,
- "message": "Login successful"
}
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.
required | object | ||||||||||||
|
code required | number |
message required | string |
code required | number |
message required | string |
code required | number |
message required | string |
{- "data": {
- "attributes": {
- "grantType": "Bearer",
- "tokenType": "accessToken",
- "accessToken": "string",
- "refreshToken": "string"
}
}
}
{- "accessToken": "string",
- "refreshToken": "string",
- "grantType": "string",
- "message": "string"
}
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").
required | object | ||||||||||||
|
{- "data": {
- "attributes": {
- "grantType": "Bearer",
- "tokenType": "accessToken",
- "accessToken": "string",
- "logoutDevice": "currentDevice"
}
}
}
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.
required | object | ||||||||||||||||||
|
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. |
{- "data": {
- "attributes": {
- "userName": "john.doe",
- "password": "SecurePassword123",
- "displayName": "John Doe",
- "email": "john.doe@example.com",
- "active": true,
- "isDeleted": false,
- "roles": [
- {
- "id": 2
}
]
}
}
}
Retrieves either all users or a specific user if an ID is provided. Requires an authenticated session with administrative privileges.
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. |
object | |
Array of objects (User) |
{- "meta": {
- "totalCount": 0,
- "pageNumber": 0,
- "pageSize": 0
}, - "data": [
- {
- "id": 0,
- "userName": "string",
- "displayName": "string",
- "email": "string",
- "active": true,
- "isDeleted": true,
- "roles": [
- {
- "id": 0,
- "name": "string"
}
], - "groups": [
- null
]
}
]
}
Marks a user as deleted by setting the "isDeleted" flag to true. This is a soft delete operation and requires administrative privileges.
id required | integer Unique identifier of the user to be soft-deleted. |
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. |
Updates user details. If no user ID is specified, updates the authenticated user's details. Updating other users requires admin permissions.
id | integer Example: id=1 ID of the user to update. If not provided, updates the authenticated user. |
required | object | ||||||||||||||||
|
Content-Type | string Example: "application/vnd.api+json; charset=utf-8" |
{- "data": {
- "attributes": {
- "newPassword": "admin",
- "currentPassword": "admin",
- "displayName": "admin",
- "email": "admin@admin.com",
- "active": true,
- "roles": [
- {
- "id": 2
}
]
}
}
}
{ }
Get all providers or a specific provider if URL is provided
id | integer Provider ID to filter by |
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. |
[- {
- "id": 0,
- "name": "string",
- "url": "string",
- "authMethod": "string",
- "apiKey": "string",
- "models": [
- {
- "id": 0,
- "name": "string"
}
]
}
]
Adds a new provider to the system. Administrative privileges are required.
required | object | ||||||||||||||||
|
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. |
{- "data": {
- "attributes": {
- "id": 0,
- "name": "string",
- "url": "string",
- "authMethod": "string",
- "apiKey": "string",
- "models": [
- "string"
]
}
}
}
Updates the details of an existing provider, including its name, API URL, and authentication details. Administrative privileges are required.
required | object | ||||||||||||||
|
{- "data": {
- "attributes": {
- "id": 0,
- "name": "string",
- "url": "string",
- "authMethod": "string",
- "apiKey": "string"
}
}
}
Retrieves a list of all models associated with a specified provider.
id required | integer Unique identifier of the provider. |
A model object.
[- { }
]
Creates a new model under the specified provider.
id required | integer Unique identifier of the provider. |
required | object | ||||||
|
Location | string Resource identifier of the new model. |
ModelId | integer Unique identifier of the new model. |
{- "data": {
- "attributes": {
- "name": "string"
}
}
}
Partially updates an existing model. Currently, only the model's name can be updated.
id required | integer Unique identifier of the provider. |
modelId required | integer Unique identifier of the model. |
required | object | ||||||
|
{- "data": {
- "attributes": {
- "name": "string"
}
}
}
Retrieves a list of API keys. The only supported filter is by userId; if omitted, all keys may be returned (depending on privileges).
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. |
object | |
Array of objects |
{- "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": [
- {
- "name": "string"
}
], - "lockedTime": "2019-08-24T14:15:22Z",
- "lastUsed": "2019-08-24T14:15:22Z",
- "isExpired": true,
- "isDeleted": true
}
]
}
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.
required | object | ||||||||||||||
|
message | string Success message. |
key | string The generated API key. |
{- "data": {
- "attributes": {
- "name": "string",
- "expiry": "2019-08-24T14:15:22Z",
- "permissions": [
- {
- "name": "string"
}
], - "provider": 0,
- "user": 0
}
}
}
{- "message": "string",
- "key": "string"
}
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.
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.
required | object | ||||||||||||||
|
message | string |
{- "data": {
- "attributes": {
- "name": "string",
- "expire": "true",
- "provider": 0,
- "newName": "string",
- "user": 0
}
}
}
{- "message": "string"
}
Retrieves a list of all available features in the system.
id | integer Unique identifier for the feature. |
name | string The name of the feature. |
[- {
- "id": 0,
- "name": "string"
}
]
Adds a new feature to the system. Administrative privileges are required.
required | object | ||||||||
|
Location | string URL or resource ID of the newly created feature. |
{- "data": {
- "attributes": {
- "id": 0,
- "name": "string"
}
}
}
Adds a new user role to the system. Administrative privileges are required.
required | object | ||||||||
|
{- "data": {
- "attributes": {
- "id": 0,
- "name": "string"
}
}
}
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.
model required | string The identifier of the model to use (required). All other properties (prompt, messages, etc.) are optional pass-through |
completion | string The text generated by the LLM (if applicable). |
{- "model": "string"
}
{- "completion": "string"
}
Retrieves cached data entries from the system. You can filter results using search terms, date ranges, or the user ID of the cache owner.
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. |
object | |
data | Array of objects |
{- "meta": {
- "totalCount": 0,
- "pageNumber": 0,
- "pageSize": 0
}, - "data": [
- { }
]
}
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.
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. |
object | |
Array of objects |
{- "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
}
]
}
Retrieves the current licensing status of the system, including key validity, expiry, and usage limits.
object | |||||||||||||||||||
|
{- "data": {
- "attributes": {
- "hasKey": true,
- "type": "string",
- "valid": true,
- "expiry": "2019-08-24",
- "expiresIn": 0,
- "maxActiveUses": 0,
- "activeUseLifeTime": 0
}
}
}
Adds a new license key or updates an existing one. The provided license key is validated before being applied. Administrative privileges are required.
required | object | ||||||
|
code | integer |
message | string |
{- "data": {
- "attributes": {
- "licenceKey": "string"
}
}
}
{- "code": 200,
- "message": "Licence key added successfully"
}
Returns statistics on current usage and historical daily peaks. Administrative privileges may be required.
object | |||||||||
|
{- "data": {
- "stats": {
- "currentUses": 0,
- "peakDailyUses": [
- {
- "date": "2019-08-24",
- "peakUse": 0
}
]
}
}
}
Returns rules matching the query parameters. Does not require a valid license, but requires appropriate permissions.
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). |
Array of objects | |||||||||||||||||||||||
Array
|
{- "data": [
- {
- "id": 0,
- "name": "string",
- "description": "string",
- "enabled": true,
- "regex": "string",
- "userId": 0,
- "groupId": 0,
- "providerId": 0,
- "userName": "string",
- "groupName": "string",
- "providerName": "string"
}
]
}
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.
required | object | ||||||||||||||||||
|
{- "data": {
- "attributes": {
- "name": "string",
- "description": "string",
- "enabled": true,
- "regex": "string",
- "userId": 0,
- "groupId": 0,
- "providerId": 0
}
}
}
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.
required | object | ||||
|
{- "data": {
- "id": 0,
- "attributes": {
- "name": "string",
- "description": "string",
- "enabled": true,
- "regex": "string",
- "userId": 0,
- "groupId": 0,
- "providerId": 0
}
}
}
Returns the current system version, including Git commit, product version, and whether an update is available. This endpoint does not require authentication.
object | |||||||||
|
{- "data": {
- "branch": "string",
- "git": "string",
- "productVersion": "string",
- "updateAvailable": "string"
}
}
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.
required | object | ||||||||
|
{- "data": {
- "attributes": {
- "name": "string",
- "members": [
- {
- "id": 0
}
]
}
}
}
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.
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 |
Array of objects | |||||||
Array
|
{- "data": [
- {
- "id": 0,
- "name": "string",
- "members": [
- {
- "name": "string",
- "id": 0
}
]
}
]
}
Gets the data for the Group with ID {id}. This requires authentication and Permission to view all groups.
object | |||||||
|
{- "data": {
- "id": 0,
- "name": "string",
- "members": [
- {
- "name": "string",
- "id": 0
}
]
}
}
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.
required | object | ||||||||
|
{- "data": {
- "attributes": {
- "name": "string",
- "members": [
- {
- "id": 0
}
]
}
}
}
Gets the array of members for the Group with ID {id}. This requires authentication and Permission to view all groups.
Array of objects An array of all the Group members | |||||
Array
|
{- "data": [
- {
- "name": "string",
- "id": 0
}
]
}
Adds the User with the ID given in the payload to the set of members in Group with ID {id}.
required | object | ||||||
|
{- "data": {
- "attributes": {
- "id": 0
}
}
}