Skip to main content

Nuclia Understanding API (v1)

API reference for the Nuclia Understanding API.

Processing

Ingest API endpoints to process data and get results back.

Get Processed Activity Log

Get latest events related to activity of a Nuclia Understanding API client

query Parameters
page
integer (Page)
Default: 0
size
integer (Size)
Default: 50
header Parameters
x-stf-account
required
string (X-Stf-Account)
x-stf-account-type
required
string (AccountType)
Enum: "stash-trial" "stash-starter" "stash-growth" "stash-startup" "stash-enterprise" "stash-developer" "stash-business"

An enumeration.

x-stf-nua-internal-client-id
required
string (X-Stf-Nua-Internal-Client-Id)

Responses

Response samples

Content type
application/json
{
  • "events": [
    ],
  • "pagination": {
    }
}

Download Binary File

Download a file referenced in an upload token

query Parameters
token
required
string (Token)

Responses

Response samples

Content type
application/json
null

Get Processed Data

Retreive processed payloads from a zone, ready to be sent to NucliaDB

query Parameters
timeout
number (Timeout)
Default: 5
partition
integer (Partition)
Default: 1

Responses

Response samples

Content type
application/json
{
  • "status": "ok",
  • "payload": "string",
  • "msgid": "string"
}

Send Data To Process

Push data to process

Request Body schema: application/json
required
kbid
string (Kbid) non-empty ^[a-z0-9_-]+$
Default: "default"
uuid
string (Uuid) non-empty ^[a-z0-9_-]+$
slug
string (Slug)
source
integer (Source)
Enum: 0 1

An enumeration.

userid
string (Userid)
object (Genericfield)
Default: {}
object (Filefield)
Default: {}
object (Linkfield)
Default: {}
object (Textfield)
Default: {}
object (Layoutfield)
Default: {}
object (Conversationfield)
Default: {}
object (PushProcessingOptions)
object (LearningConfig)
object (WebhookConfig)

Responses

Request samples

Content type
application/json
{
  • "kbid": "default",
  • "uuid": "string",
  • "slug": "string",
  • "source": 0,
  • "userid": "string",
  • "genericfield": { },
  • "filefield": { },
  • "linkfield": { },
  • "textfield": { },
  • "layoutfield": { },
  • "conversationfield": { },
  • "processing_options": {
    },
  • "learning_config": {
    },
  • "webhook_config": {
    }
}

Response samples

Content type
application/json
{
  • "seqid": 0,
  • "account_seq": 0,
  • "queue": "shared",
  • "uuid": "string"
}

Get Account And Shared Processor Status

Retrieve the current status of the account or the shared processing queue

query Parameters
account_id
string (Account Id)

Responses

Response samples

Content type
application/json
{
  • "shared": {
    },
  • "account": {
    }
}

Upload Binary File

Upload a file using a multipart request

header Parameters
x-filename
string (X-Filename)
Default:
x-password
string (X-Password)
x-language
string (X-Language)
x-md5
string (X-Md5)

Responses

Response samples

Content type
application/json
null

Training

Training API endpoints to train custom models with your data.

Get Dataset Task Execution Detail

Gets the details of a training task execution on a dataset

path Parameters
dataset_id
required
string (Dataset Id)
execution_id
required
string (Execution Id)

Responses

Response samples

Content type
application/json
null

Get Dataset Task Executions

Gets the list of past training tasks executions on a dataset

path Parameters
dataset_id
required
string (Dataset Id)
query Parameters
task
Array of strings (Task)
Default: ""
page
integer (Page)
Default: 0
size
integer (Size)
Default: 50

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "pagination": {
    }
}

Inspect Dataset Training Task

Get the status of a train task on a dataset

path Parameters
dataset_id
required
string (Dataset Id)
task_name
required
string (Task Name)

Responses

Response samples

Content type
application/json
{
  • "task": "string",
  • "status": "not_running",
  • "last_execution": {
    }
}

Download Dataset Predictive Model File

Download the trained model or any other generated file as a result of a training task on a dataset

path Parameters
dataset_id
required
string (Dataset Id)
task_name
required
string (Task Name)
filename
required
string (Filename)

Responses

Response samples

Content type
application/json
null

Start Dataset Training Task

Start a train task on a dataset

path Parameters
dataset_id
required
string (Dataset Id)
task_name
required
string (Task Name)
Request Body schema: application/json
object (Task Parameters)

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "task": "string",
  • "status": "not_running"
}

Stop Dataset Training Task

Stop a train task on a dataset

path Parameters
dataset_id
required
string (Dataset Id)
task_name
required
string (Task Name)

Responses

Response samples

Content type
application/json
{
  • "task": "string",
  • "status": "not_running"
}

Get Knowledge Box Task Execution Result

Gets the details of a training task execution on a knowledge box

path Parameters
kb_uuid
required
string (Kb Uuid)
execution_id
required
string (Execution Id)

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "task": "string",
  • "start": "2019-08-24T14:15:22Z",
  • "end": "2019-08-24T14:15:22Z",
  • "status": "succeeded",
  • "results": {
    },
  • "error": "string"
}

Get Knowledge Box Task Executions

Gets the list of past training tasks executions on a knowledge box

path Parameters
kb_uuid
required
string (Kb Uuid)
query Parameters
task
Array of strings (Task)
Default: ""
page
integer (Page)
Default: 0
size
integer (Size)
Default: 50

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "pagination": {
    }
}

Inspect Knowledge Box Training Task

Get the status of a train task on a knowledge box

path Parameters
kb_uuid
required
string (Kb Uuid)
task_name
required
string (Task Name)

Responses

Response samples

Content type
application/json
{
  • "task": "string",
  • "status": "not_running",
  • "last_execution": {
    }
}

Download Nucliadb Predictive Model File

Download the trained model or any other generated file as a result of a training task on a Knowledge Box

path Parameters
kb_uuid
required
string (Kb Uuid)
task_name
required
string (Task Name)
filename
required
string (Filename)

Responses

Response samples

Content type
application/json
null

Start Knowledge Box Training Task

Start a train task on a knowledge box

path Parameters
kb_uuid
required
string (Kb Uuid)
task_name
required
string (Task Name)
Request Body schema: application/json
object (Task Parameters)

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "task": "string",
  • "status": "not_running"
}

Stop Knowledge Box Training Task

Stop a train task on a knowledge box

path Parameters
kb_uuid
required
string (Kb Uuid)
task_name
required
string (Task Name)

Responses

Response samples

Content type
application/json
{
  • "task": "string",
  • "status": "not_running"
}

Predict Tokens

Get tokens of a sentence

query Parameters
text
required
string (Text)
model
string (Model)
Default: "default"

Responses

Response samples

Content type
application/json
{
  • "tokens": [ ],
  • "time": 0
}

Datasets

Datasets API endpoints to store structured data for training.

Delete Dataset

Deletes a dataset

path Parameters
dataset_id
required
string (Dataset Id)

Responses

Response samples

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

Update Dataset Configuration

Updates the configuration of a dataset

path Parameters
dataset_id
required
string (Dataset Id)
Request Body schema: application/json
required
name
string (Name)
object (DatasetFilter)
type
string (TrainsetType)
Enum: "FIELD_CLASSIFICATION" "PARAGRAPH_CLASSIFICATION" "SENTENCE_CLASSIFICATION" "TOKEN_CLASSIFICATION"

An enumeration.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "filter": {
    },
  • "type": "FIELD_CLASSIFICATION"
}

Response samples

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

Upload Partition

Upload a partition of a dataset

path Parameters
dataset_id
required
string (Dataset Id)
partition_id
required
string (Partition Id) ^[a-zA-Z0-9-_]+$
header Parameters
content-length
required
string (Content-Length)

Responses

Response samples

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

Delete Dataset Partition

Deletes a partition of a dataset

path Parameters
dataset_id
required
string (Dataset Id)
partition_id
required
string (Partition Id) ^[a-zA-Z0-9-_]+$

Responses

Response samples

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

Delete Dataset Partitions

Deletes all partitions of a dataset

path Parameters
dataset_id
required
string (Dataset Id)

Responses

Response samples

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

Create Dataset

Creates a new dataset

Request Body schema: application/json
required
name
required
string (Name)
required
object (DatasetFilter)
type
required
string (TrainsetType)
Enum: "FIELD_CLASSIFICATION" "PARAGRAPH_CLASSIFICATION" "SENTENCE_CLASSIFICATION" "TOKEN_CLASSIFICATION"

An enumeration.

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "filter": {
    },
  • "type": "FIELD_CLASSIFICATION"
}

Response samples

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

Predict

Predict API to get predictions from our models

Predict Chat

Chat interface for your NucliaDB

query Parameters
model
string (Model)
Default: "chatgpt"
Request Body schema: application/json
required
question
required
string (Question)
retrieval
boolean (Retrieval)
Default: true
user_id
required
string (User Id)
system
string (System)
Array of objects (Chat History)
Default: []
Array of objects (Context)
Default: []
query_context
Array of strings (Query Context)
Default: []
truncate
boolean (Truncate)
Default: false
object (UserPrompt)

Responses

Request samples

Content type
application/json
{
  • "question": "string",
  • "retrieval": true,
  • "user_id": "string",
  • "system": "string",
  • "chat_history": [ ],
  • "context": [ ],
  • "query_context": [ ],
  • "truncate": false,
  • "user_prompt": {
    }
}

Response samples

Content type
application/json
null

Predict Feedback

Get feedback

query Parameters
model
required
string (Model)
Request Body schema: application/json
required
ident
required
string (Ident)
good
required
boolean (Good)
task
required
string (FeedbackTasks)
Enum: "CHAT" "SUMMARY"

An enumeration.

feedback
string (Feedback)
user_id
string (User Id)
client
string (Client)
forwarded
string (Forwarded)

Responses

Request samples

Content type
application/json
{
  • "ident": "string",
  • "good": true,
  • "task": "CHAT",
  • "feedback": "string",
  • "user_id": "string",
  • "client": "string",
  • "forwarded": "string"
}

Response samples

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

Predict Rephrase

Rephrase interface for your NucliaDB

query Parameters
model
string (Model)
Default: "chatgpt"
Request Body schema: application/json
required
question
required
string (Question)
Array of objects (Chat History)
Default: []
Array of objects (Context)
Default: []
user_id
required
string (User Id)

Responses

Request samples

Content type
application/json
{
  • "question": "string",
  • "chat_history": [ ],
  • "context": [ ],
  • "user_id": "string"
}

Response samples

Content type
application/json
"string"

Predict Sentence

Get the vector of a sentence

query Parameters
text
required
string (Text)
model
string (Model)
Default: "multilingual"

Responses

Response samples

Content type
application/json
{
  • "data": [ ],
  • "time": 0
}

Predict Summarize

Get summarized answers via NUA

query Parameters
model
string (Model)
Default: "chatgpt"
Request Body schema: application/json
required
required
object (Resources)
additional property
object (SummarizeResource)
required
object (Fields)
property name*
additional property
string

Responses

Request samples

Content type
application/json
{
  • "resources": {
    }
}

Response samples

Content type
application/json
null

Knowledge Boxes

Learning Configuration Schema

Get trained models

path Parameters
account_id
required
string (Account Id)

Responses

Response samples

Content type
application/json
{ }

Knowledgebox Models Configuration

Current configuration of models assigned to a knowledgebox

path Parameters
kbid
required
string (Kbid)

Responses

Response samples

Content type
application/json
{
  • "semantic_model": "string",
  • "anonymization_model": "string",
  • "generative_model": "string",
  • "ner_model": "string",
  • "visual_labeling": "disabled",
  • "user_keys": {
    },
  • "user_prompts": {
    },
  • "semantic_vector_similarity": "string",
  • "semantic_vector_size": 0,
  • "semantic_threshold": 0
}

Knowledgebox Models Configuration

Current configuration of models assigned to a knowledgebox

path Parameters
kbid
required
string (Kbid)
Request Body schema: application/json
required
AnonymizationModel (string) or Anonymization Model (string) (Anonymization Model)
Default: "disabled"
VisualLabeling (string) or Visual Labeling (string) (Visual Labeling)
Default: "disabled"
GenerativeModel (string) or Generative Model (string) (Generative Model)
Default: "chatgpt-azure"
NERModel (string) or Ner Model (string) (Ner Model)
Default: "multilingual"
object (UserLearningKeys)
object (UserPrompts)

Responses

Request samples

Content type
application/json
{
  • "anonymization_model": "disabled",
  • "visual_labeling": "disabled",
  • "generative_model": "chatgpt-azure",
  • "ner_model": "multilingual",
  • "user_keys": {
    },
  • "user_prompts": {
    }
}

Response samples

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

Learning Configuration Schema

Get available models

path Parameters
kbid
required
string (Kbid)

Responses

Response samples

Content type
application/json
{ }

Learning Configuration Schema

Get jsonschema definition for learning_configuration field of knowledgebox creation payload

Responses

Response samples

Content type
application/json
{ }

NUA Client

Get Processed Activity Log

Get latest events related to activity of a Nuclia Understanding API client

path Parameters
account_slug
required
string (Account Slug)
client_id
required
string (Client Id)
query Parameters
page
integer (Page)
Default: 0
size
integer (Size)
Default: 50

Responses

Response samples

Content type
application/json
{
  • "events": [
    ],
  • "pagination": {
    }
}

Knowledgebox activity log

Get Knowledgebox Activity Deprecated

Get latest events related to activity of a knowledgebox

path Parameters
kb_uuid
required
string (Kb Uuid)
query Parameters
type
string (EventType)
Default: "PROCESSED"
Enum: "VISITED" "MODIFIED" "DELETED" "NEW" "STARTED" "STOPPED" "SEARCH" "PROCESSED" "SUGGEST" "CHAT"

An enumeration.

page
integer (Page)
Default: 0
size
integer (Size)
Default: 50

Responses

Response samples

Content type
application/json
{
  • "events": [
    ],
  • "pagination": {
    }
}

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" "STARTED" "STOPPED" "SEARCH" "PROCESSED" "SUGGEST" "CHAT"

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" "STARTED" "STOPPED" "SEARCH" "PROCESSED" "SUGGEST" "CHAT"

Audit event type

Responses

Response samples

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

Processing TUS uploads

Create New Upload

An empty POST request is used to create a new upload resource. The Upload-Length header indicates the size of the entire upload in bytes.

Responses

Response samples

Content type
application/json
null

Tus Server Information

Gather information about the Server’s current configuration such as enabled extensions, version...

path Parameters
upload_id
required
string (Upload Id)

Responses

Response samples

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

Upload Information

Get information about a current download (completed upload size)

path Parameters
upload_id
required
string (Upload Id)

Responses

Response samples

Content type
application/json
null

Upload Data

Upload all bytes in the requests and append them in the specifyied offset

path Parameters
upload_id
required
string (Upload Id)

Responses

Response samples

Content type
application/json
null