Skip to main content

Knowledge Box & Zone REST API (v1)

API documentation for managing Knowledge Boxes, NUA keys, and API Keys within designated zones.

Knowledge Boxes

Operations for creating, reading, updating, and deleting Knowledge Boxes.

Get Knowledge Box

path Parameters
account_id
required
string <uuid> (Account Id)
kb_id
required
string <uuid> (Kb Id)

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "slug": "string",
  • "account_id": "string",
  • "zone": "string",
  • "title": "string",
  • "description": "string",
  • "state": "PUBLISHED",
  • "created": "2019-08-24T14:15:22Z",
  • "admin": true,
  • "contrib": true,
  • "allowed_origins": [
    ],
  • "search_configs": { },
  • "external_index_provider": "string"
}

Modify Knowledge Box

Modifies an existing Knowledge Box.

path Parameters
account_id
required
string <uuid> (Account Id)
kb_id
required
string <uuid> (Kb Id)
Request Body schema: application/json
required
Slug (string) or Slug (null) (Slug)
Title (string) or Title (null) (Title)
KbState (string) or null
Description (string) or Description (null) (Description)
Array of Allowed Origins (strings) or Allowed Origins (null) (Allowed Origins)
Search Configs (object) or Search Configs (null) (Search Configs)

Responses

Request samples

Content type
application/json
{
  • "slug": "string",
  • "title": "string",
  • "state": "PUBLISHED",
  • "description": "string",
  • "allowed_origins": [
    ],
  • "search_configs": { }
}

Response samples

Content type
application/json
{ }

Delete Knowledge Box

path Parameters
account_id
required
string <uuid> (Account Id)
kb_id
required
string <uuid> (Kb Id)

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Create Ephemeral Token

Create an ephemeral token to access the Knowledge Box

path Parameters
account_id
required
string <uuid> (Account Id)
kb_id
required
string <uuid> (Kb Id)

Responses

Response samples

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

Download Logo

Knowledge Box logo

path Parameters
account_id
required
string <uuid> (Account Id)
kb_id
required
string <uuid> (Kb Id)

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Get Knowledge Box Permissions

path Parameters
account_id
required
string <uuid> (Account Id)
kb_id
required
string <uuid> (Kb Id)

Responses

Response samples

Content type
application/json
{
  • "permissions": [
    ]
}

List Knowledge Boxes

List all region Knowledge Boxes that belongs to an specific account that the authenticated user can see

path Parameters
account_id
required
string <uuid> (Account Id)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create Knowledge Box

Creates a new Knowledge Box. The accepted values for the learning_configuration are dynamic and may be dependant of the account used. Accepted field values needs to be checked on the 'Learning configuration schema' endpoint

path Parameters
account_id
required
string <uuid> (Account Id)
Request Body schema: application/json
required
slug
string (Slug)
title
string (Title)
Description (string) or Description (null) (Description)
Sentence Embedder (string) or Sentence Embedder (null) (Sentence Embedder)
Deprecated
Anonymization (string) or Anonymization (null) (Anonymization)
Deprecated
learning_configuration
object (Learning Configuration)
Array of Allowed Origins (strings) or Allowed Origins (null) (Allowed Origins)
PineoneKBIndexProvider (object) or External index provider (null) (External index provider)

External index provider configuration for the Knowledge Box. If not set, the default NucliaDB's index will be used.

search_configs
object (Search Configs)
Default: {}

Responses

Request samples

Content type
application/json
{
  • "slug": "string",
  • "title": "string",
  • "description": "string",
  • "sentence_embedder": "string",
  • "anonymization": "string",
  • "learning_configuration": { },
  • "allowed_origins": [
    ],
  • "external_index_provider": {
    },
  • "search_configs": { }
}

Response samples

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

Users

Management of users assigned to a Knowledge Box.

Users

List of users of a Knowledge Box

path Parameters
account_id
required
string <uuid> (Account Id)
kb_id
required
string <uuid> (Kb Id)
query Parameters
include_user_detail
boolean (Include User Detail)
Default: false

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Update Users

Assign or remove users from a Knowledge Box

path Parameters
account_id
required
string <uuid> (Account Id)
kb_id
required
string <uuid> (Kb Id)
Request Body schema: application/json
required
Array of Add (objects) or Add (null) (Add)
Array of Update (objects) or Update (null) (Update)
Array of Delete (strings) or Delete (null) (Delete)

Responses

Request samples

Content type
application/json
{
  • "add": [
    ],
  • "update": [
    ],
  • "delete": [
    ]
}

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Invites

Handling Knowledge Box invitation management.

Invite To Knowledge Box

Send an invitation to join a Knowledge Box via email.

path Parameters
account_id
required
string <uuid> (Account Id)
kb_id
required
string <uuid> (Kb Id)
Request Body schema: application/json
required
email
required
string <email> (Email)
role
required
string (KbRole)
Enum: "SOWNER" "SMEMBER" "SCONTRIBUTOR"

Responses

Request samples

Content type
application/json
{
  • "email": "user@example.com",
  • "role": "SOWNER"
}

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Delete Invite

Invalidate an invite to join a Knowledge Box

path Parameters
account_id
required
string <uuid> (Account Id)
kb_id
required
string <uuid> (Kb Id)
query Parameters
email
required
string <email> (Email)

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Invited Users

List of users invited to a Knowledge Box, but not yet joined

path Parameters
account_id
required
string <uuid> (Account Id)
kb_id
required
string <uuid> (Kb Id)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

API Keys

Management of API keys assigned to a Knowledge Box.

Delete Service Account

Delete a new Service Account for a Knowledge Box

path Parameters
account_id
required
string <uuid> (Account Id)
kb_id
required
string <uuid> (Kb Id)
sa_id
required
string <uuid> (Sa Id)

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Delete Api Key

Delete an API Key of a Knowledge Box

path Parameters
account_id
required
string <uuid> (Account Id)
kb_id
required
string <uuid> (Kb Id)
sa_id
required
string <uuid> (Sa Id)
sa_key_id
required
string <uuid> (Sa Key Id)

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Add Service Account Key

Create an API Key for a Service Account of a Knowledge Box

path Parameters
account_id
required
string <uuid> (Account Id)
kb_id
required
string <uuid> (Kb Id)
sa_id
required
string <uuid> (Sa Id)
Request Body schema: application/json
required
expires
required
string <date-time> (Expires)

Responses

Request samples

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

Response samples

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

List Service Accounts

List of Service Accounts of a Knowledge Box

path Parameters
account_id
required
string <uuid> (Account Id)
kb_id
required
string <uuid> (Kb Id)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add Service Account

Create a new Service Account for a Knowledge Box

path Parameters
account_id
required
string <uuid> (Account Id)
kb_id
required
string <uuid> (Kb Id)
Request Body schema: application/json
required
title
string (Title)
role
required
string (KbRole)
Enum: "SOWNER" "SMEMBER" "SCONTRIBUTOR"

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "role": "SOWNER"
}

Response samples

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

NUA Keys

Management of NUA keys.

Delete Nua Client By Id

Deletes an existing Nuclia Understanding API client

path Parameters
account_id
required
string <uuid> (Account Id)
client_id
required
string (Client Id) ^[a-z0-9_-]+$

Responses

Response samples

Content type
application/json
{
  • "detail": [
    ]
}

Get Nua Client By Id

Gets the metadata of an existing Nuclia Understanding API

path Parameters
account_id
required
string <uuid> (Account Id)
client_id
required
string (Client Id) ^[a-z0-9_-]+$

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "description": "",
  • "contact": "string",
  • "created": "2019-08-24T14:15:22Z",
  • "partitions": 0,
  • "client_id": "string",
  • "account_id": "string",
  • "processing_webhook": {
    }
}

Set Account Nua Client Key

Recreates a new session key for an existing Nuclia Understanding API client

path Parameters
account_id
required
string <uuid> (Account Id)
client_id
required
string (Client Id) ^[a-z0-9_-]+$

Responses

Response samples

Content type
application/json
{
  • "token": "string",
  • "client_id": "string"
}

Get Account Nua Clients

Gets the list of Nuclia Understanding API clients of an account

path Parameters
account_id
required
string <uuid> (Account Id)
query Parameters
Client Id (string) or Client Id (null) (Client Id)

Responses

Response samples

Content type
application/json
{
  • "clients": [
    ]
}

Create Account Nua Client

Create a new Nuclia Understanding API client for an account

path Parameters
account_id
required
string <uuid> (Account Id)
Request Body schema: application/json
required
contact
required
string (Contact)
title
string (Title)
Description (string) or Description (null) (Description)
Default: ""
Client Id (string) or Client Id (null) (Client Id)
ProcessingWebhook (object) or null
allow_kb_management
boolean (Allow Kb Management)
Default: false

Responses

Request samples

Content type
application/json
{
  • "contact": "string",
  • "title": "string",
  • "description": "",
  • "client_id": "string",
  • "processing_webhook": {
    },
  • "allow_kb_management": false
}

Response samples

Content type
application/json
{
  • "token": "string",
  • "client_id": "string"
}

Knowledgebox activity

Management of Activity logs for a Knowledge Box.

Get Download Status

Get the status of a download request by Knowledgebox ID and request ID

path Parameters
kb_id
required
string (Kb Id)
request_id
required
string <uuid1> (Request Id)

Responses

Response samples

Content type
application/json
{
  • "request_id": "string",
  • "download_type": "query",
  • "download_format": "ndjson",
  • "event_type": "visited",
  • "requested_at": "2019-08-24T14:15:22Z",
  • "kb_id": "string",
  • "download_url": "string"
}

Get Knowledgebox Activity Downloads List

Get the list of monthly activity audit files available to download

path Parameters
kb_id
required
string (Kb Id)
event_type
required
string (EventType)
Enum: "visited" "modified" "deleted" "new" "search" "suggest" "indexed" "chat" "started" "stopped" "processed"

Responses

Response samples

Content type
application/json
{
  • "downloads": [
    ]
}

Query Knowledgebox Activity Logs

Query Knowledgebox Activity Logs

path Parameters
kb_id
required
string (Kb Id)
event_type
required
string (EventType)
Enum: "visited" "modified" "deleted" "new" "search" "suggest" "indexed" "chat" "started" "stopped" "processed"
Request Body schema: application/json
required
Any of
year_month
required
string (Year Month)
show
Array of strings (Show) unique
Default: ["id","date"]
Items Enum: "id" "date" "user_id" "user_type" "client_type" "total_duration" "audit_metadata" "resource_id"
required
object (QueryFiltersCommon)
object (Pagination)

Responses

Request samples

Content type
application/json
Example
{
  • "year_month": "string",
  • "show": [
    ],
  • "filters": {
    },
  • "pagination": {
    }
}

Response samples

Content type
application/x-ndjson
"{\"id\":0,\"date\":null,\"user_id\":null,\"user_type\":null,\"client_type\":null,\"total_duration\":null,\"audit_metadata\":null,\"resource_id\":null,\"question\":null,\"resources_count\":null,\"filter\":null,\"learning_id\":null,\"rephrased_question\":null,\"answer\":null,\"retrieved_context\":null,\"chat_history\":null,\"feedback_good\":null,\"feedback_comment\":null,\"feedback_good_all\":null,\"feedback_good_any\":null,\"feedback\":null,\"model\":null,\"rag_strategies_names\":null,\"rag_strategies\":null,\"status\":null,\"time_to_first_char\":null}\n"

Request The Preparation Of Knowledgebox Activity Logs Download

Request Knowledgebox Activity Logs download

path Parameters
kb_id
required
string (Kb Id)
event_type
required
string (EventType)
Enum: "visited" "modified" "deleted" "new" "search" "suggest" "indexed" "chat" "started" "stopped" "processed"
header Parameters
accept
required
string (Accept)
Enum: "application/x-ndjson" "text/csv"
Request Body schema: application/json
required
Any of
year_month
required
string (Year Month)
show
Array of strings (Show) unique
Default: ["id","date"]
Items Enum: "id" "date" "user_id" "user_type" "client_type" "total_duration" "audit_metadata" "resource_id"
required
object (QueryFiltersCommon)
Email Address (string) or Email Address (null) (Email Address)
notify_via_email
boolean (Notify Via Email)
Default: false

Responses

Request samples

Content type
application/json
Example
{
  • "year_month": "string",
  • "show": [
    ],
  • "filters": {
    },
  • "email_address": "user@example.com",
  • "notify_via_email": false
}

Response samples

Content type
application/json
{
  • "request_id": "string",
  • "download_type": "query",
  • "download_format": "ndjson",
  • "event_type": "visited",
  • "requested_at": "2019-08-24T14:15:22Z",
  • "kb_id": "string",
  • "download_url": "string"
}

Download Knowledgebox Activity

Download the csv file for the activity audit for a given month

path Parameters
kb_uuid
required
string (Kb Uuid)
query Parameters
type
required
string (EventType)
Enum: "visited" "modified" "deleted" "new" "search" "suggest" "indexed" "chat" "started" "stopped" "processed"

Audit event type

month
required
string (Month) ^\d+-(0[1-9]|1[012])$

Month in YYYY-MM format

Responses

Response samples

Content type
application/json
null

Get Knowledgebox Activity Downloads List

Get the list of monthly activity audit files available to download

path Parameters
kb_uuid
required
string (Kb Uuid)
query Parameters
type
required
string (EventType)
Enum: "visited" "modified" "deleted" "new" "search" "suggest" "indexed" "chat" "started" "stopped" "processed"

Audit event type

Responses

Response samples

Content type
application/json
{
  • "downloads": [
    ]
}

Query Rag Requests By Scores

Get a list of rag request that matches a remi scores query

path Parameters
kb_uuid
required
string (Kb Uuid)
Request Body schema: application/json
required
ContextRelevanceQuery (object) or null
month
required
string (Month)
Feedback Good (boolean) or Feedback Good (null) (Feedback Good)
Status (string) or null
object (Pagination)

Responses

Request samples

Content type
application/json
{
  • "context_relevance": {
    },
  • "month": "string",
  • "feedback_good": true,
  • "status": "SUCCESS",
  • "pagination": {
    }
}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "has_more": true
}

Aggregated Remi Scores Across Time

Get the evolution of remi scores of a kb on a period of time

path Parameters
kb_uuid
required
string (Kb Uuid)
query Parameters
aggregation
string (Aggregation)
Enum: "hour" "day" "week" "month" "quarter" "year" "millennium"
from
required
string <date-time> (From)
To (string) or To (null) (To)
Default: "2024-11-12T10:19:01.817744"

Responses

Response samples

Content type
application/json
[
  • {
    }
]