Skip to main content

NucliaDB REST API (v1)

API reference for the NucliaDB, covering all the endpoints related to pushing or searching contents.

Resources

Knowledge Box resource endpoints

Delete Resource (By Id)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rid
required
string (Rid)
header Parameters
x-synchronous
boolean (X-Synchronous)
Default: false

If set to true, the request will return when the changes to be commited to the database.

Responses

Response samples

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

Modify Resource (By Id)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rid
required
string (Rid)
header Parameters
x-skip-store
boolean (X-Skip-Store)
Default: false

If set to true, file fields will not be saved in the blob storage. They will only be sent to process.

x-synchronous
boolean (X-Synchronous)
Default: false

If set to true, the request will return when the changes to be commited to the database.

x-nucliadb-user
string (X-Nucliadb-User)
Default:
Request Body schema: application/json
required
title
string (Title)
summary
string (Summary)
slug
string (Slug) ^[a-zA-Z0-9:_-]+$

The slug is the user-defined id for the resource

thumbnail
string (Thumbnail)
layout
string (Layout)
object (InputMetadata)
object (UserMetadata)
Array of objects (Uservectors)
Array of objects (Fieldmetadata)
object (Origin)
object (Extra)
object (Files)
Default: {}

Dictionary of file fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Links)
Default: {}

Dictionary of link fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Texts)
Default: {}

Dictionary of text fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Layouts)
Default: {}

Dictionary of layout fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Conversations)
Default: {}

Dictionary of conversation fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Keywordsets)
Default: {}

Dictionary of keywordset fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Datetimes)
Default: {}

Dictionary of datetime fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Processing Options)
Default: {"ml_text":true}
object (Security)

Security metadata for the resource. It can be used to have fine-grained control over who can access the resource.

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "summary": "string",
  • "slug": "string",
  • "thumbnail": "string",
  • "layout": "string",
  • "metadata": {
    },
  • "usermetadata": {
    },
  • "uservectors": [
    ],
  • "fieldmetadata": [
    ],
  • "origin": {
    },
  • "extra": {
    },
  • "files": { },
  • "links": { },
  • "texts": { },
  • "layouts": { },
  • "conversations": { },
  • "keywordsets": { },
  • "datetimes": { },
  • "processing_options": {
    },
  • "security": {
    }
}

Response samples

Content type
application/json
{
  • "seqid": 0
}

Get Resource (By Id)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
rid
required
string (Rid)
query Parameters
show
Array of strings (ResourceProperties)
Default: "basic"
Items Enum: "basic" "origin" "extra" "relations" "values" "extracted" "errors" "security"
field_type
Array of strings (FieldTypeName)
Default: "text&field_type=file&field_type=link&field_type=layout&field_type=conversation&field_type=keywordset&field_type=datetime&field_type=generic"
Items Enum: "text" "file" "link" "layout" "conversation" "keywordset" "datetime" "generic"
extracted
Array of strings (ExtractedDataTypeName)
Default: "text&extracted=metadata&extracted=link&extracted=file"
Items Enum: "text" "metadata" "shortened_metadata" "large_metadata" "vectors" "link" "file" "uservectors" "question_answers"
header Parameters
x-nucliadb-user
string (X-Nucliadb-User)
Default:
x-forwarded-for
string (X-Forwarded-For)
Default:

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "slug": "string",
  • "title": "string",
  • "summary": "string",
  • "icon": "string",
  • "layout": "string",
  • "thumbnail": "string",
  • "metadata": {
    },
  • "usermetadata": {
    },
  • "fieldmetadata": [
    ],
  • "computedmetadata": {
    },
  • "created": "2019-08-24T14:15:22Z",
  • "modified": "2019-08-24T14:15:22Z",
  • "last_seqid": 0,
  • "last_account_seq": 0,
  • "queue": "private",
  • "origin": {
    },
  • "extra": {
    },
  • "relations": [
    ],
  • "data": {
    },
  • "security": {
    }
}

Reindex Resource (By Id)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rid
required
string (Rid)
query Parameters
reindex_vectors
boolean (Reindex Vectors)
Default: false

Responses

Response samples

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

Reprocess Resource (By Id)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rid
required
string (Rid)
header Parameters
x-nucliadb-user
string (X-Nucliadb-User)
Default:

Responses

Response samples

Content type
application/json
{
  • "seqid": 0
}

Create Resource

Create a new Resource in a Knowledge Box

Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
header Parameters
x-skip-store
boolean (X-Skip-Store)
Default: false

If set to true, file fields will not be saved in the blob storage. They will only be sent to process.

x-synchronous
boolean (X-Synchronous)
Default: false

If set to true, the request will return when the changes to be commited to the database.

Request Body schema: application/json
required
title
string (Title)
summary
string (Summary)
slug
string (Slug) ^[a-zA-Z0-9:_-]+$

The slug is the user-defined id for the resource

icon
string (Icon)
thumbnail
string (Thumbnail)
layout
string (Layout)
object (InputMetadata)
object (UserMetadata)
Array of objects (Fieldmetadata)
Array of objects (Uservectors)
object (Origin)
object (Extra)
object (Files)
Default: {}

Dictionary of file fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Links)
Default: {}

Dictionary of link fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Texts)
Default: {}

Dictionary of text fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Layouts)
Default: {}

Dictionary of layout fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Conversations)
Default: {}

Dictionary of conversation fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Keywordsets)
Default: {}

Dictionary of keywordset fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Datetimes)
Default: {}

Dictionary of datetime fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Processing Options)
Default: {"ml_text":true}
object (Security)

Security metadata for the resource. It can be used to have fine-grained control over who can access the resource.

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "summary": "string",
  • "slug": "string",
  • "icon": "string",
  • "thumbnail": "string",
  • "layout": "string",
  • "metadata": {
    },
  • "usermetadata": {
    },
  • "fieldmetadata": [
    ],
  • "uservectors": [
    ],
  • "origin": {
    },
  • "extra": {
    },
  • "files": { },
  • "links": { },
  • "texts": { },
  • "layouts": { },
  • "conversations": { },
  • "keywordsets": { },
  • "datetimes": { },
  • "processing_options": {
    },
  • "security": {
    }
}

Response samples

Content type
application/json
{
  • "uuid": "string",
  • "elapsed": 0,
  • "seqid": 0
}

List Resources

List of resources of a knowledgebox

Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
query Parameters
page
integer (Page)
Default: 0

Requested page number (0-based)

size
integer (Size)
Default: 20

Page size

Responses

Response samples

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

Delete Resource (By Slug)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rslug
required
string (Rslug)
header Parameters
x-synchronous
boolean (X-Synchronous)
Default: false

If set to true, the request will return when the changes to be commited to the database.

Responses

Response samples

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

Modify Resource (By Slug)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rslug
required
string (Rslug)
header Parameters
x-skip-store
boolean (X-Skip-Store)
Default: false

If set to true, file fields will not be saved in the blob storage. They will only be sent to process.

x-synchronous
boolean (X-Synchronous)
Default: false

If set to true, the request will return when the changes to be commited to the database.

x-nucliadb-user
string (X-Nucliadb-User)
Default:
Request Body schema: application/json
required
title
string (Title)
summary
string (Summary)
slug
string (Slug) ^[a-zA-Z0-9:_-]+$

The slug is the user-defined id for the resource

thumbnail
string (Thumbnail)
layout
string (Layout)
object (InputMetadata)
object (UserMetadata)
Array of objects (Uservectors)
Array of objects (Fieldmetadata)
object (Origin)
object (Extra)
object (Files)
Default: {}

Dictionary of file fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Links)
Default: {}

Dictionary of link fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Texts)
Default: {}

Dictionary of text fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Layouts)
Default: {}

Dictionary of layout fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Conversations)
Default: {}

Dictionary of conversation fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Keywordsets)
Default: {}

Dictionary of keywordset fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Datetimes)
Default: {}

Dictionary of datetime fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Processing Options)
Default: {"ml_text":true}
object (Security)

Security metadata for the resource. It can be used to have fine-grained control over who can access the resource.

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "summary": "string",
  • "slug": "string",
  • "thumbnail": "string",
  • "layout": "string",
  • "metadata": {
    },
  • "usermetadata": {
    },
  • "uservectors": [
    ],
  • "fieldmetadata": [
    ],
  • "origin": {
    },
  • "extra": {
    },
  • "files": { },
  • "links": { },
  • "texts": { },
  • "layouts": { },
  • "conversations": { },
  • "keywordsets": { },
  • "datetimes": { },
  • "processing_options": {
    },
  • "security": {
    }
}

Response samples

Content type
application/json
{
  • "seqid": 0
}

Get Resource (By Slug)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
rslug
required
string (Rslug)
query Parameters
show
Array of strings (ResourceProperties)
Default: "basic"
Items Enum: "basic" "origin" "extra" "relations" "values" "extracted" "errors" "security"
field_type
Array of strings (FieldTypeName)
Default: "text&field_type=file&field_type=link&field_type=layout&field_type=conversation&field_type=keywordset&field_type=datetime&field_type=generic"
Items Enum: "text" "file" "link" "layout" "conversation" "keywordset" "datetime" "generic"
extracted
Array of strings (ExtractedDataTypeName)
Default: "text&extracted=metadata&extracted=link&extracted=file"
Items Enum: "text" "metadata" "shortened_metadata" "large_metadata" "vectors" "link" "file" "uservectors" "question_answers"
header Parameters
x-nucliadb-user
string (X-Nucliadb-User)
Default:
x-forwarded-for
string (X-Forwarded-For)
Default:

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "slug": "string",
  • "title": "string",
  • "summary": "string",
  • "icon": "string",
  • "layout": "string",
  • "thumbnail": "string",
  • "metadata": {
    },
  • "usermetadata": {
    },
  • "fieldmetadata": [
    ],
  • "computedmetadata": {
    },
  • "created": "2019-08-24T14:15:22Z",
  • "modified": "2019-08-24T14:15:22Z",
  • "last_seqid": 0,
  • "last_account_seq": 0,
  • "queue": "private",
  • "origin": {
    },
  • "extra": {
    },
  • "relations": [
    ],
  • "data": {
    },
  • "security": {
    }
}

Reindex Resource (By Slug)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rslug
required
string (Rslug)
query Parameters
reindex_vectors
boolean (Reindex Vectors)
Default: false

Responses

Response samples

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

Reprocess Resource (By Slug)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rslug
required
string (Rslug)
header Parameters
x-nucliadb-user
string (X-Nucliadb-User)
Default:

Responses

Response samples

Content type
application/json
{
  • "seqid": 0
}

Resource fields

Knowledge Box resource's fields endpoints

Upload Binary File On A Resource (By Id)

Upload a file as a field on an existing resource, if the field exists will return a conflict (419)

Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
path_rid
required
string (Path Rid)
field
required
string (Field)
header Parameters
x-filename
Array of strings (X-Filename)
x-password
Array of strings (X-Password)
x-language
Array of strings (X-Language)
x-md5
Array of strings (X-Md5)
x-synchronous
boolean (X-Synchronous)
Default: false

Responses

Response samples

Content type
application/json
{
  • "seqid": 0,
  • "uuid": "string",
  • "field_id": "string"
}

Add Resource Conversation Field (By Id)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rid
required
string (Rid)
field_id
required
string (Field Id)
header Parameters
x-synchronous
boolean (X-Synchronous)
Default: false

If set to true, the request will return when the changes to be commited to the database.

Request Body schema: application/json
required
Array of objects (Messages)
Default: []
Array
timestamp
string <date-time> (Timestamp)
who
string (Who)
to
Array of strings (To)
Default: []
required
object (InputMessageContent)
ident
required
string (Ident)
type
any (MessageType)
Enum: "UNSET" "QUESTION" "ANSWER"

An enumeration.

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "seqid": 0
}

Download Conversation Binary Field (By Id)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
rid
required
string (Rid)
field_id
required
string (Field Id)
message_id
required
string (Message Id)
file_num
required
integer (File Num)

Responses

Response samples

Content type
application/json
null

Append Messages To Conversation Field (By Id)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rid
required
string (Rid)
field_id
required
string (Field Id)
header Parameters
x-synchronous
boolean (X-Synchronous)
Default: false

If set to true, the request will return when the changes to be commited to the database.

Request Body schema: application/json
required
Array
timestamp
string <date-time> (Timestamp)
who
string (Who)
to
Array of strings (To)
Default: []
required
object (InputMessageContent)
ident
required
string (Ident)
type
any (MessageType)
Enum: "UNSET" "QUESTION" "ANSWER"

An enumeration.

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "seqid": 0
}

Add Resource Datetime Field (By Id)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rid
required
string (Rid)
field_id
required
string (Field Id)
header Parameters
x-synchronous
boolean (X-Synchronous)
Default: false

If set to true, the request will return when the changes to be commited to the database.

Request Body schema: application/json
required
value
required
string <date-time> (Value)

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "seqid": 0
}

Add Resource File Field (By Id)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rid
required
string (Rid)
field_id
required
string (Field Id)
header Parameters
x-skip-store
boolean (X-Skip-Store)
Default: false

If set to true, file fields will not be saved in the blob storage. They will only be sent to process.

x-synchronous
boolean (X-Synchronous)
Default: false

If set to true, the request will return when the changes to be commited to the database.

Request Body schema: application/json
required
language
string (Language)
password
string (Password)
required
object (File)

Responses

Request samples

Content type
application/json
{
  • "language": "string",
  • "password": "string",
  • "file": {
    }
}

Response samples

Content type
application/json
{
  • "seqid": 0
}

Download Field Binary Field (By Id)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
rid
required
string (Rid)
field_id
required
string (Field Id)
query Parameters
inline
boolean (Inline)
Default: false

Responses

Response samples

Content type
application/json
null

Reprocess File Field (By Id)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rid
required
string (Rid)
field_id
required
string (Field Id)
header Parameters
x-nucliadb-user
string (X-Nucliadb-User)
Default:
x-file-password
string (X-File-Password)

If a file is password protected, the password must be provided here for the file to be processed

Responses

Response samples

Content type
application/json
{
  • "seqid": 0
}

Add Resource Keywordset Field (By Id)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rid
required
string (Rid)
field_id
required
string (Field Id)
header Parameters
x-synchronous
boolean (X-Synchronous)
Default: false

If set to true, the request will return when the changes to be commited to the database.

Request Body schema: application/json
required
Array of objects (Keywords)
Array
value
required
string (Value)

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "seqid": 0
}

Add Resource Layout Field (By Id)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rid
required
string (Rid)
field_id
required
string (Field Id)
header Parameters
x-synchronous
boolean (X-Synchronous)
Default: false

If set to true, the request will return when the changes to be commited to the database.

Request Body schema: application/json
required
required
object (InputLayoutContent)
format
string (LayoutFormat)
Default: "NUCLIAv1"
Value: "NUCLIAv1"

An enumeration.

Responses

Request samples

Content type
application/json
{
  • "body": {
    },
  • "format": "NUCLIAv1"
}

Response samples

Content type
application/json
{
  • "seqid": 0
}

Append Blocks To Layout Field (By Id)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rid
required
string (Rid)
field_id
required
string (Field Id)
header Parameters
x-synchronous
boolean (X-Synchronous)
Default: false

If set to true, the request will return when the changes to be commited to the database.

Request Body schema: application/json
required
additional property
object (InputBlock)
x
required
integer (X)
y
required
integer (Y)
cols
required
integer (Cols)
rows
required
integer (Rows)
type
required
string (TypeBlock)
Enum: "TITLE" "DESCRIPTION" "RICHTEXT" "TEXT" "ATTACHMENTS" "COMMENTS" "CLASSIFICATIONS"

An enumeration.

ident
required
string (Ident)
payload
required
string (Payload)
required
object (FileB64)

Responses

Request samples

Content type
application/json
{
  • "property1": {
    },
  • "property2": {
    }
}

Response samples

Content type
application/json
{
  • "seqid": 0
}

Download Layout Binary Field (By Id)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
rid
required
string (Rid)
field_id
required
string (Field Id)
download_field
required
string (Download Field)

Responses

Response samples

Content type
application/json
null

Add Resource Text Field (By Id)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rid
required
string (Rid)
field_id
required
string (Field Id)
header Parameters
x-synchronous
boolean (X-Synchronous)
Default: false

If set to true, the request will return when the changes to be commited to the database.

Request Body schema: application/json
required
body
required
string (Body)
format
any (TextFormat)
Default: "PLAIN"
Enum: "PLAIN" "HTML" "RST" "MARKDOWN" "JSON"

An enumeration.

Responses

Request samples

Content type
application/json
{
  • "body": "string",
  • "format": "PLAIN"
}

Response samples

Content type
application/json
{
  • "seqid": 0
}

Delete Resource Field (By Id)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rid
required
string (Rid)
field_type
required
string (FieldTypeName)
Enum: "text" "file" "link" "layout" "conversation" "keywordset" "datetime" "generic"

This map assumes that both values and extracted data field containers use the same names for its fields. See models.ResourceFieldValues and models.ResourceFieldExtractedData

field_id
required
string (Field Id)
header Parameters
x-synchronous
boolean (X-Synchronous)
Default: false

If set to true, the request will return when the changes to be commited to the database.

Responses

Response samples

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

Get Resource Field (By Id)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
rid
required
string (Rid)
field_type
required
string (FieldTypeName)
Enum: "text" "file" "link" "layout" "conversation" "keywordset" "datetime" "generic"

This map assumes that both values and extracted data field containers use the same names for its fields. See models.ResourceFieldValues and models.ResourceFieldExtractedData

field_id
required
string (Field Id)
query Parameters
show
Array of strings (ResourceFieldProperties)
Default: "value"
Items Enum: "value" "extracted" "error"
extracted
Array of strings (ExtractedDataTypeName)
Default: "text&extracted=metadata&extracted=link&extracted=file"
Items Enum: "text" "metadata" "shortened_metadata" "large_metadata" "vectors" "link" "file" "uservectors" "question_answers"
Page (string) or Page (integer) (Page)
Default: "last"

Responses

Response samples

Content type
application/json
{
  • "field_type": "text",
  • "field_id": "string",
  • "value": null,
  • "extracted": {
    },
  • "error": {
    }
}

Download Extracted Binary File (By Id)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
rid
required
string (Rid)
field_type
required
string (FieldTypeName)
Enum: "text" "file" "link" "layout" "conversation" "keywordset" "datetime" "generic"

This map assumes that both values and extracted data field containers use the same names for its fields. See models.ResourceFieldValues and models.ResourceFieldExtractedData

field_id
required
string (Field Id)
download_field
required
string (Download Field)

Responses

Response samples

Content type
application/json
null

Add Resource Conversation Field (By Slug)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rslug
required
string (Rslug)
field_id
required
string (Field Id)
header Parameters
x-synchronous
boolean (X-Synchronous)
Default: false

If set to true, the request will return when the changes to be commited to the database.

Request Body schema: application/json
required
Array of objects (Messages)
Default: []
Array
timestamp
string <date-time> (Timestamp)
who
string (Who)
to
Array of strings (To)
Default: []
required
object (InputMessageContent)
ident
required
string (Ident)
type
any (MessageType)
Enum: "UNSET" "QUESTION" "ANSWER"

An enumeration.

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "seqid": 0
}

Download Conversation Binary Field (By Slug)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
rslug
required
string (Rslug)
field_id
required
string (Field Id)
message_id
required
string (Message Id)
file_num
required
integer (File Num)

Responses

Response samples

Content type
application/json
null

Append Messages To Conversation Field (By Slug)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rslug
required
string (Rslug)
field_id
required
string (Field Id)
header Parameters
x-synchronous
boolean (X-Synchronous)
Default: false

If set to true, the request will return when the changes to be commited to the database.

Request Body schema: application/json
required
Array
timestamp
string <date-time> (Timestamp)
who
string (Who)
to
Array of strings (To)
Default: []
required
object (InputMessageContent)
ident
required
string (Ident)
type
any (MessageType)
Enum: "UNSET" "QUESTION" "ANSWER"

An enumeration.

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
{
  • "seqid": 0
}

Add Resource Datetime Field (By Slug)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rslug
required
string (Rslug)
field_id
required
string (Field Id)
header Parameters
x-synchronous
boolean (X-Synchronous)
Default: false

If set to true, the request will return when the changes to be commited to the database.

Request Body schema: application/json
required
value
required
string <date-time> (Value)

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "seqid": 0
}

Add Resource File Field (By Slug)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rslug
required
string (Rslug)
field_id
required
string (Field Id)
header Parameters
x-skip-store
boolean (X-Skip-Store)
Default: false

If set to true, file fields will not be saved in the blob storage. They will only be sent to process.

x-synchronous
boolean (X-Synchronous)
Default: false

If set to true, the request will return when the changes to be commited to the database.

Request Body schema: application/json
required
language
string (Language)
password
string (Password)
required
object (File)

Responses

Request samples

Content type
application/json
{
  • "language": "string",
  • "password": "string",
  • "file": {
    }
}

Response samples

Content type
application/json
{
  • "seqid": 0
}

Download Field Binary Field (By Slug)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
rslug
required
string (Rslug)
field_id
required
string (Field Id)
query Parameters
inline
boolean (Inline)
Default: false

Responses

Response samples

Content type
application/json
null

Upload Binary File On A Resource (By Slug)

Upload a file as a field on an existing resource, if the field exists will return a conflict (419)

Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rslug
required
string (Rslug)
field
required
string (Field)
header Parameters
x-filename
Array of strings (X-Filename)
x-password
Array of strings (X-Password)
x-language
Array of strings (X-Language)
x-md5
Array of strings (X-Md5)
x-synchronous
boolean (X-Synchronous)
Default: false

Responses

Response samples

Content type
application/json
{
  • "seqid": 0,
  • "uuid": "string",
  • "field_id": "string"
}

Add Resource Keywordset Field (By Slug)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rslug
required
string (Rslug)
field_id
required
string (Field Id)
header Parameters
x-synchronous
boolean (X-Synchronous)
Default: false

If set to true, the request will return when the changes to be commited to the database.

Request Body schema: application/json
required
Array of objects (Keywords)
Array
value
required
string (Value)

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "seqid": 0
}

Add Resource Layout Field (By Slug)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rslug
required
string (Rslug)
field_id
required
string (Field Id)
header Parameters
x-synchronous
boolean (X-Synchronous)
Default: false

If set to true, the request will return when the changes to be commited to the database.

Request Body schema: application/json
required
required
object (InputLayoutContent)
format
string (LayoutFormat)
Default: "NUCLIAv1"
Value: "NUCLIAv1"

An enumeration.

Responses

Request samples

Content type
application/json
{
  • "body": {
    },
  • "format": "NUCLIAv1"
}

Response samples

Content type
application/json
{
  • "seqid": 0
}

Append Blocks To Layout Field (By Slug)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rslug
required
string (Rslug)
field_id
required
string (Field Id)
header Parameters
x-synchronous
boolean (X-Synchronous)
Default: false

If set to true, the request will return when the changes to be commited to the database.

Request Body schema: application/json
required
additional property
object (InputBlock)
x
required
integer (X)
y
required
integer (Y)
cols
required
integer (Cols)
rows
required
integer (Rows)
type
required
string (TypeBlock)
Enum: "TITLE" "DESCRIPTION" "RICHTEXT" "TEXT" "ATTACHMENTS" "COMMENTS" "CLASSIFICATIONS"

An enumeration.

ident
required
string (Ident)
payload
required
string (Payload)
required
object (FileB64)

Responses

Request samples

Content type
application/json
{
  • "property1": {
    },
  • "property2": {
    }
}

Response samples

Content type
application/json
{
  • "seqid": 0
}

Download Layout Binary Field (By Slug)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
rslug
required
string (Rslug)
field_id
required
string (Field Id)
download_field
required
string (Download Field)

Responses

Response samples

Content type
application/json
null

Add Resource Text Field (By Slug)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rslug
required
string (Rslug)
field_id
required
string (Field Id)
header Parameters
x-synchronous
boolean (X-Synchronous)
Default: false

If set to true, the request will return when the changes to be commited to the database.

Request Body schema: application/json
required
body
required
string (Body)
format
any (TextFormat)
Default: "PLAIN"
Enum: "PLAIN" "HTML" "RST" "MARKDOWN" "JSON"

An enumeration.

Responses

Request samples

Content type
application/json
{
  • "body": "string",
  • "format": "PLAIN"
}

Response samples

Content type
application/json
{
  • "seqid": 0
}

Delete Resource Field (By Slug)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rslug
required
string (Rslug)
field_type
required
string (FieldTypeName)
Enum: "text" "file" "link" "layout" "conversation" "keywordset" "datetime" "generic"

This map assumes that both values and extracted data field containers use the same names for its fields. See models.ResourceFieldValues and models.ResourceFieldExtractedData

field_id
required
string (Field Id)
header Parameters
x-synchronous
boolean (X-Synchronous)
Default: false

If set to true, the request will return when the changes to be commited to the database.

Responses

Response samples

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

Get Resource Field (By Slug)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
rslug
required
string (Rslug)
field_type
required
string (FieldTypeName)
Enum: "text" "file" "link" "layout" "conversation" "keywordset" "datetime" "generic"

This map assumes that both values and extracted data field containers use the same names for its fields. See models.ResourceFieldValues and models.ResourceFieldExtractedData

field_id
required
string (Field Id)
query Parameters
show
Array of strings (ResourceFieldProperties)
Default: "value"
Items Enum: "value" "extracted" "error"
extracted
Array of strings (ExtractedDataTypeName)
Default: "text&extracted=metadata&extracted=link&extracted=file"
Items Enum: "text" "metadata" "shortened_metadata" "large_metadata" "vectors" "link" "file" "uservectors" "question_answers"
Page (string) or Page (integer) (Page)
Default: "last"

Responses

Response samples

Content type
application/json
{
  • "field_type": "text",
  • "field_id": "string",
  • "value": null,
  • "extracted": {
    },
  • "error": {
    }
}

Download Extracted Binary File (By Slug)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
rslug
required
string (Rslug)
field_type
required
string (FieldTypeName)
Enum: "text" "file" "link" "layout" "conversation" "keywordset" "datetime" "generic"

This map assumes that both values and extracted data field containers use the same names for its fields. See models.ResourceFieldValues and models.ResourceFieldExtractedData

field_id
required
string (Field Id)
download_field
required
string (Download Field)

Responses

Response samples

Content type
application/json
null

Resource field TUS uploads

Endpoints for TUS Resumable File Uploads protocol. This endpoints are compliant with the TUS protocol. You're not suposed to uses this endpoints directly, but use a TUS client in your language.

We also support the Creation extension on top of the Core TUS protocol

See https://tus.io/ for more info.

Create New Upload On A Resource (By Id)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
path_rid
required
string (Path Rid)
field
required
string (Field)
Request Body schema: application/json
title
string (Title)
summary
string (Summary)
slug
string (Slug) ^[a-zA-Z0-9:_-]+$

The slug is the user-defined id for the resource

icon
string (Icon)
thumbnail
string (Thumbnail)
layout
string (Layout)
object (InputMetadata)
object (UserMetadata)
Array of objects (Fieldmetadata)
Array of objects (Uservectors)
object (Origin)
object (Extra)
object (Files)
Default: {}

Dictionary of file fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Links)
Default: {}

Dictionary of link fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Texts)
Default: {}

Dictionary of text fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Layouts)
Default: {}

Dictionary of layout fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Conversations)
Default: {}

Dictionary of conversation fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Keywordsets)
Default: {}

Dictionary of keywordset fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Datetimes)
Default: {}

Dictionary of datetime fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Processing Options)
Default: {"ml_text":true}
object (Security)

Security metadata for the resource. It can be used to have fine-grained control over who can access the resource.

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "summary": "string",
  • "slug": "string",
  • "icon": "string",
  • "thumbnail": "string",
  • "layout": "string",
  • "metadata": {
    },
  • "usermetadata": {
    },
  • "fieldmetadata": [
    ],
  • "uservectors": [
    ],
  • "origin": {
    },
  • "extra": {
    },
  • "files": { },
  • "links": { },
  • "texts": { },
  • "layouts": { },
  • "conversations": { },
  • "keywordsets": { },
  • "datetimes": { },
  • "processing_options": {
    },
  • "security": {
    }
}

Response samples

Content type
application/json
null

Upload Information


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
path_rid
required
string (Path Rid)
field
required
string (Field)
upload_id
required
string (Upload Id)

Responses

Response samples

Content type
application/json
null

Upload Data On A Resource (By Id)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rid
required
string (Rid)
field
required
string (Field)
upload_id
required
string (Upload Id)
header Parameters
x-synchronous
boolean (X-Synchronous)
Default: false

Responses

Response samples

Content type
application/json
null

Create New Upload On A Resource (By Slug)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rslug
required
string (Rslug)
field
required
string (Field)
Request Body schema: application/json
title
string (Title)
summary
string (Summary)
slug
string (Slug) ^[a-zA-Z0-9:_-]+$

The slug is the user-defined id for the resource

icon
string (Icon)
thumbnail
string (Thumbnail)
layout
string (Layout)
object (InputMetadata)
object (UserMetadata)
Array of objects (Fieldmetadata)
Array of objects (Uservectors)
object (Origin)
object (Extra)
object (Files)
Default: {}

Dictionary of file fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Links)
Default: {}

Dictionary of link fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Texts)
Default: {}

Dictionary of text fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Layouts)
Default: {}

Dictionary of layout fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Conversations)
Default: {}

Dictionary of conversation fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Keywordsets)
Default: {}

Dictionary of keywordset fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Datetimes)
Default: {}

Dictionary of datetime fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Processing Options)
Default: {"ml_text":true}
object (Security)

Security metadata for the resource. It can be used to have fine-grained control over who can access the resource.

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "summary": "string",
  • "slug": "string",
  • "icon": "string",
  • "thumbnail": "string",
  • "layout": "string",
  • "metadata": {
    },
  • "usermetadata": {
    },
  • "fieldmetadata": [
    ],
  • "uservectors": [
    ],
  • "origin": {
    },
  • "extra": {
    },
  • "files": { },
  • "links": { },
  • "texts": { },
  • "layouts": { },
  • "conversations": { },
  • "keywordsets": { },
  • "datetimes": { },
  • "processing_options": {
    },
  • "security": {
    }
}

Response samples

Content type
application/json
null

Upload Data On A Resource (By Slug)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rslug
required
string (Rslug)
field
required
string (Field)
upload_id
required
string (Upload Id)
header Parameters
x-synchronous
boolean (X-Synchronous)
Default: false

Responses

Response samples

Content type
application/json
null

Upload Information


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
rslug
required
string (Rslug)
field
required
string (Field)
upload_id
required
string (Upload Id)

Responses

Response samples

Content type
application/json
null

Knowledge Boxes

NucliaDB Knowledge Box endpoints

NOTE:

Except for getting a Knowledge box or listing Knowledge boxes, the rest of operations may be not available in your NucliaDB instance. Creating and managing Knowledge Boxes directly from NucliaDB is available only on standalone usage. If you have a NucliaDB Cloud or a NucliaDB On-prem, you need to manage them from the global API.

Get Knowledge Box (By Slug)


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • MANAGER
  • READER
path Parameters
slug
required
string (Slug)

Responses

Response samples

Content type
application/json
{
  • "slug": "string",
  • "uuid": "string",
  • "config": {
    },
  • "model": {
    }
}

Get Knowledge Box


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • MANAGER
  • READER
path Parameters
kbid
required
string (Kbid)

Responses

Response samples

Content type
application/json
{
  • "slug": "string",
  • "uuid": "string",
  • "config": {
    },
  • "model": {
    }
}

Create Knowledge Box Models Configuration

Create configuration of models assigned to a Knowledge Box

Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)

Responses

Response samples

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

Knowledgebox Models Configuration

Current configuration of models assigned to a knowledgebox

path Parameters
kbid
required
string (Kbid)
Request Body schema: application/json
required
anonymization_model
string (AnonimizationModel)
Default: "disabled"
Enum: "disabled" "multilingual"

An enumeration.

generative_model
string (GenerativeModel)
Default: "chatgpt"
Enum: "generative-multilingual-2023" "chatgpt"

An enumeration.

ner_model
string (NERModel)
Default: "multilingual"
Value: "multilingual"

An enumeration.

Responses

Request samples

Content type
application/json
{
  • "anonymization_model": "disabled",
  • "generative_model": "chatgpt",
  • "ner_model": "multilingual"
}

Response samples

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

Knowledgebox Counters

Summary of amount of different things inside a knowledgebox

Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
  • MANAGER
path Parameters
kbid
required
string (Kbid)
query Parameters
vectorset
string (Vectorset id)

Id of the vectorset to perform the vector search into.

debug
boolean (Debug mode)
Default: false

If set, the response will include some extra metadata for debugging purposes, like the list of queried nodes.

Responses

Response samples

Content type
application/json
{
  • "resources": 0,
  • "paragraphs": 0,
  • "fields": 0,
  • "sentences": 0,
  • "shards": [
    ],
  • "index_size": 0
}

Start An Export Of A Knowledge Box


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • MANAGER
  • WRITER
path Parameters
kbid
required
string (Kbid)

Responses

Response samples

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

Download A Knowledge Box Export


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • MANAGER
  • READER
path Parameters
kbid
required
string (Kbid)
export_id
required
string (Export Id)

Responses

Response samples

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

Get The Status Of A Knowledge Box Export


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • MANAGER
  • READER
path Parameters
kbid
required
string (Kbid)
export_id
required
string (Export Id)

Responses

Response samples

Content type
application/json
{
  • "status": "scheduled",
  • "total": 0,
  • "processed": 0,
  • "retries": 0
}

Feedback Avalaible Months

List of months within the last year with feedback data

Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)

Responses

Response samples

Content type
application/json
null

Download Feedback Of A Knowledge Box

Download the feedback of a particular month in a Knowledge Box

Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
month
required
string (Month)

Responses

Response samples

Content type
application/json
null

Start An Import To A Knowledge Box


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • MANAGER
  • WRITER
path Parameters
kbid
required
string (Kbid)

Responses

Response samples

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

Get The Status Of A Knowledge Box Import


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • MANAGER
  • READER
path Parameters
kbid
required
string (Kbid)
import_id
required
string (Import Id)

Responses

Response samples

Content type
application/json
{
  • "status": "scheduled",
  • "total": 0,
  • "processed": 0,
  • "retries": 0
}

Upload Binary File On A Knowledge Box

Upload a file onto a Knowledge Box, field id will be file and rid will be autogenerated.

Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
header Parameters
x-filename
Array of strings (X-Filename)
x-password
Array of strings (X-Password)
x-language
Array of strings (X-Language)
x-md5
Array of strings (X-Md5)
x-synchronous
boolean (X-Synchronous)
Default: false

Responses

Response samples

Content type
application/json
{
  • "seqid": 0,
  • "uuid": "string",
  • "field_id": "string"
}

Learning Configuration Schema

Get jsonschema definition for learning_configuration field of knowledgebox creation payload

Responses

Response samples

Content type
application/json
{ }

Knowledge Box TUS uploads

Endpoints for TUS Resumable File Uploads protocol. This endpoints are compliant with the TUS protocol. It is usually preferable to use them through a TUS client library in your language.

We also support the Creation extension on top of the Core TUS protocol

See https://tus.io/ for more info.

Create New Upload On A Knowledge Box


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
Request Body schema: application/json
title
string (Title)
summary
string (Summary)
slug
string (Slug) ^[a-zA-Z0-9:_-]+$

The slug is the user-defined id for the resource

icon
string (Icon)
thumbnail
string (Thumbnail)
layout
string (Layout)
object (InputMetadata)
object (UserMetadata)
Array of objects (Fieldmetadata)
Array of objects (Uservectors)
object (Origin)
object (Extra)
object (Files)
Default: {}

Dictionary of file fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Links)
Default: {}

Dictionary of link fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Texts)
Default: {}

Dictionary of text fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Layouts)
Default: {}

Dictionary of layout fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Conversations)
Default: {}

Dictionary of conversation fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Keywordsets)
Default: {}

Dictionary of keywordset fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Datetimes)
Default: {}

Dictionary of datetime fields to be added to the resource. The keys correspond to the field id, and must comply with the regex: ^[a-zA-Z0-9:_-]+$

object (Processing Options)
Default: {"ml_text":true}
object (Security)

Security metadata for the resource. It can be used to have fine-grained control over who can access the resource.

Responses

Request samples

Content type
application/json
{
  • "title": "string",
  • "summary": "string",
  • "slug": "string",
  • "icon": "string",
  • "thumbnail": "string",
  • "layout": "string",
  • "metadata": {
    },
  • "usermetadata": {
    },
  • "fieldmetadata": [
    ],
  • "uservectors": [
    ],
  • "origin": {
    },
  • "extra": {
    },
  • "files": { },
  • "links": { },
  • "texts": { },
  • "layouts": { },
  • "conversations": { },
  • "keywordsets": { },
  • "datetimes": { },
  • "processing_options": {
    },
  • "security": {
    }
}

Response samples

Content type
application/json
null

Tus Server Information

path Parameters
kbid
required
string (Kbid)
query Parameters
rid
string (Rid)
rslug
string (Rslug)
upload_id
string (Upload Id)
field
string (Field)

Responses

Response samples

Content type
application/json
null

Upload Data On A Knowledge Box


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
upload_id
required
string (Upload Id)
header Parameters
x-synchronous
boolean (X-Synchronous)
Default: false

Responses

Response samples

Content type
application/json
null

Upload Information


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
upload_id
required
string (Upload Id)

Responses

Response samples

Content type
application/json
null

Knowledge Box Services

NucliaDB labels & entities endpoints

Set Knowledge Box Custom Synonyms


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
Request Body schema: application/json
required
required
object (Synonyms)
property name*
additional property
Array of strings

Responses

Request samples

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

Response samples

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

Delete Knowledge Box Custom Synonyms


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)

Responses

Response samples

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

Get Knowledge Box Custom Synonyms


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)

Responses

Response samples

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

Delete Knowledge Box Entities


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
group
required
string (Group)

Responses

Response samples

Content type
application/json
null

Update Knowledge Box Entities Group


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
group
required
string (Group)
Request Body schema: application/json
required
title
string (Title)
color
string (Color)
object (Add)
Default: {}
object (Update)
Default: {}
delete
Array of strings (Delete)
Default: []

Responses

Request samples

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

Response samples

Content type
application/json
null

Get A Knowledge Box Entities Group


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
group
required
string (Group)

Responses

Response samples

Content type
application/json
{
  • "title": "string",
  • "color": "string",
  • "custom": false,
  • "entities": { }
}

Create Knowledge Box Entities Group


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
Request Body schema: application/json
required
group
required
string (Group)
object (Entities)
Default: {}
title
string (Title)
color
string (Color)

Responses

Request samples

Content type
application/json
{
  • "group": "string",
  • "entities": { },
  • "title": "string",
  • "color": "string"
}

Response samples

Content type
application/json
null

Get Knowledge Box Entities


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
query Parameters
show_entities
boolean (Show Entities)
Default: false

Responses

Response samples

Content type
application/json
{
  • "uuid": "string",
  • "groups": { }
}

Set Knowledge Box Labels


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
labelset
required
string (Labelset)
Request Body schema: application/json
required
title
string (Title)
Default: "no title"
color
string (Color)
Default: "blue"
multiple
boolean (Multiple)
Default: true
kind
Array of strings (LabelSetKind)
Default: []
Items Enum: "RESOURCES" "PARAGRAPHS" "SENTENCES" "SELECTIONS"
Array of objects (Labels)
Default: []

Responses

Request samples

Content type
application/json
{
  • "title": "no title",
  • "color": "blue",
  • "multiple": true,
  • "kind": [ ],
  • "labels": [ ]
}

Response samples

Content type
application/json
null

Delete Knowledge Box Label


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
labelset
required
string (Labelset)

Responses

Response samples

Content type
application/json
null

Get A Knowledge Box Label Set


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
labelset
required
string (Labelset)

Responses

Response samples

Content type
application/json
{
  • "title": "no title",
  • "color": "blue",
  • "multiple": true,
  • "kind": [ ],
  • "labels": [ ]
}

Get Knowledge Box Label Sets


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)

Responses

Response samples

Content type
application/json
{
  • "uuid": "string",
  • "labelsets": { }
}

Knowledge Box Notifications Stream

Provides a stream of activity notifications for the given Knowledge Box. The stream will be automatically closed after 2 minutes.

Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)

Responses

Response samples

Content type
application/json
null

Knowledge Box Processing Status

Provides the status of the processing of the given Knowledge Box.

Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
query Parameters
cursor
string (Cursor)
scheduled
boolean (Scheduled)
limit
integer (Limit)
Default: 20

Responses

Response samples

Content type
application/json
{
  • "results": [ ],
  • "cursor": "string"
}

Set Knowledge Box Vectorset


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
vectorset
required
string (Vectorset)
Request Body schema: application/json
required
dimension
required
integer (Dimension)
similarity
string (VectorSimilarity)
Enum: "cosine" "dot"

An enumeration.

Responses

Request samples

Content type
application/json
{
  • "dimension": 0,
  • "similarity": "cosine"
}

Response samples

Content type
application/json
null

Delete Knowledge Box Vectorset


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • WRITER
path Parameters
kbid
required
string (Kbid)
vectorset
required
string (Vectorset)

Responses

Response samples

Content type
application/json
null

Get Knowledge Box Vector Sets


Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)

Responses

Response samples

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

Training

Training API

Models

Models API

Get Knowledge Box Models Configuration

Current configuration of models assigned to a Knowledge Box

Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)

Responses

Response samples

Content type
application/json
null

Get Model Metadata

Get metadata for a particular model

Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
model_id
required
string (Model Id)

Responses

Response samples

Content type
application/json
null

Get Available Models

Get available models

Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)

Responses

Response samples

Content type
application/json
null

Download The Knowledege Box Model

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

Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
model_id
required
string (Model Id)
filename
required
string (Filename)

Responses

Response samples

Content type
application/json
null

Learning Configuration Schema

Get jsonschema definition to update the learning_configuration of your Knowledge Box

Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)

Responses

Response samples

Content type
application/json
null

Search

Search API

List Resources Of A Knowledge Box

List resources of a Knowledge Box

Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
query Parameters
query
string (Query)
Default: ""

The query to search for

filters
Array of strings (Filters)
Default: ""

The list of filters to apply. Filtering examples can be found here: https://docs.nuclia.dev/docs/docs/using/search/#filters

faceted
Array of strings (Faceted) <= 50 characters [ items <= 50 characters ]
Default: ""

The list of facets to calculate. The facets follow the same syntax as filters: https://docs.nuclia.dev/docs/docs/using/search/#filters

sort_field
string (Sort field)
Enum: "score" "created" "modified" "title"

Field to sort results with

sort_limit
integer (Sort limit) > 0
sort_order
string (Sort order)
Default: "desc"
Enum: "asc" "desc"

Order to sort results with

page_number
integer (Page number)
Default: 0

The page number of the results to return

page_size
integer (Page size)
Default: 20

The number of results to return per page

shards
Array of strings (Shards)
Default: ""

The list of shard replicas to search in. If empty, random replicas will be selected.

with_status
any (With processing status)
Enum: "PENDING" "PROCESSED" "ERROR" "EMPTY" "BLOCKED" "EXPIRED"

Filter results by resource processing status

debug
boolean (Debug mode)
Default: false

If set, the response will include some extra metadata for debugging purposes, like the list of queried nodes.

Responses

Response samples

Content type
application/json
{
  • "resources": { },
  • "sentences": {
    },
  • "paragraphs": {
    },
  • "fulltext": {
    },
  • "relations": {
    },
  • "nodes": [
    ],
  • "shards": [
    ],
  • "autofilters": [ ]
}

List Resources Of A Knowledge Box

List resources of a Knowledge Box

Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
Request Body schema: application/json
required
query
string (Query)
Default: ""

The query to search for

Array of Filters (strings) or Array of Filters (objects) (Filters)
Default: []

The list of filters to apply. Filtering examples can be found here: https://docs.nuclia.dev/docs/docs/using/search/#filters

faceted
Array of strings (Faceted) <= 50 items
Default: []

The list of facets to calculate. The facets follow the same syntax as filters: https://docs.nuclia.dev/docs/docs/using/search/#filters

object (Sort options)

Options for results sorting

page_number
integer (Page number)
Default: 0

The page number of the results to return

page_size
integer (Page size)
Default: 20

The number of results to return per page

shards
Array of strings (Shards)
Default: []

The list of shard replicas to search in. If empty, random replicas will be selected.

debug
boolean (Debug mode)
Default: false

If set, the response will include some extra metadata for debugging purposes, like the list of queried nodes.

with_status
any (With processing status)
Enum: "PENDING" "PROCESSED" "ERROR" "EMPTY" "BLOCKED" "EXPIRED"

Filter results by resource processing status

Responses

Request samples

Content type
application/json
{
  • "query": "",
  • "filters": [ ],
  • "faceted": [ ],
  • "sort": {
    },
  • "page_number": 0,
  • "page_size": 20,
  • "shards": [ ],
  • "debug": false,
  • "with_status": "PENDING"
}

Response samples

Content type
application/json
{
  • "resources": { },
  • "sentences": {
    },
  • "paragraphs": {
    },
  • "fulltext": {
    },
  • "relations": {
    },
  • "nodes": [
    ],
  • "shards": [
    ],
  • "autofilters": [ ]
}

Chat on a Knowledge Box

Chat on a Knowledge Box

Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
header Parameters
x-ndb-client
string (NucliaDBClientType)
Default: api
Enum: "api" "widget" "web" "dashboard" "desktop" "chrome_extension"

An enumeration.

x-nucliadb-user
string (X-Nucliadb-User)
Default:
x-forwarded-for
string (X-Forwarded-For)
Default:
x-synchronous
boolean (X-Synchronous)
Default: false

Output response as JSON in a non-streaming way. This is slower and requires waiting for entire answer to be ready.

Request Body schema: application/json
required
query
required
string (Query)

The query to get a generative answer for

fields
Array of strings (Fields)
Default: []

The list of fields to search in. For instance: a/title to search only on title field. For more details on filtering by field, see: https://docs.nuclia.dev/docs/docs/using/search/#search-in-a-specific-field

Array of Filters (strings) or Array of Filters (objects) (Filters)
Default: []

The list of filters to apply. Filtering examples can be found here: https://docs.nuclia.dev/docs/docs/using/search/#filters

Minimum score (number) or MinScore (object) (Minimum score)

Minimum score to filter search results. Results with a lower score will be ignored. Accepts either a float or a dictionary with the minimum scores for the bm25 and vector indexes. If a float is provided, it is interpreted as the minimum score for vector index search.

features
Array of strings (Chat features)
Default: ["vectors","paragraphs","relations"]
Items Enum: "vectors" "paragraphs" "relations"

Features enabled for the chat endpoint. Semantic search is done if vectors is included. If paragraphs is included, the results will include matching paragraphs from the bm25 index. If relations is included, a graph of entities related to the answer is returned.

range_creation_start
string <date-time> (Resource creation range start)

Resources created before this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

range_creation_end
string <date-time> (Resource creation range end)

Resources created after this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

range_modification_start
string <date-time> (Resource modification range start)

Resources modified before this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

range_modification_end
string <date-time> (Resource modification range end)

Resources modified after this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

show
Array of strings (Show metadata)
Default: ["basic"]
Items Enum: "basic" "origin" "extra" "relations" "values" "extracted" "errors" "security"

Controls which types of metadata are serialized on resources of search results

field_type_filter
Array of strings (Field type filter)
Default: ["text","file","link","layout","conversation","keywordset","datetime","generic"]
Items Enum: "text" "file" "link" "layout" "conversation" "keywordset" "datetime" "generic"

Filter search results to match paragraphs of a specific field type. E.g: ['conversation', 'text']

extracted
Array of strings (Extracted metadata)
Default: []
Items Enum: "text" "metadata" "shortened_metadata" "large_metadata" "vectors" "link" "file" "uservectors" "question_answers"

Controls which parts of the extracted metadata are serialized on search results

shards
Array of strings (Shards)
Default: []

The list of shard replicas to search in. If empty, random replicas will be selected.

Array of objects (Chat history)

Use to rephrase the new LLM query by taking into account the chat conversation history

extra_context
Array of strings (Extra query context)

Additional context that is added to the retrieval context sent to the LLM. It allows extending the chat feature with content that may not be in the Knowledge Box.

autofilter
boolean (Automatic search filtering)
Default: false

If set to true, the search will automatically add filters to the query. For example, it will filter results containing the entities detected in the query

highlight
boolean (Highlight)
Default: false

If set to true, the query terms will be highlighted in the results between ... tags

resource_filters
Array of strings (Resources filter)
Default: []

List of resource ids to filter search results for. Only paragraphs from the specified resources will be returned.

prompt
string (Prompt) non-empty

Input here your prompt with the words {context} and {question} in brackets where you want those fields to be placed, in case you want them in your prompt. Context will be the data returned by the retrieval step.

citations
boolean (Citations)
Default: false

Whether to include the citations for the answer in the response

object (Security)

Security metadata for the request. If not provided, the search request is done without the security lookup phase.

Array of any (RAG context building strategies)
Default: []

Options for tweaking how the context for the LLM model is crafted. full_resource will add the full text of the matching resources to the context. field_extension will add the text of the matching resource's specified fields to the context. If empty, the default strategy is used.

debug
boolean (Debug mode)
Default: false

If set, the response will include some extra metadata for debugging purposes, like the list of queried nodes.

generative_model
string (Generative model)

The generative model to use for the chat endpoint. If not provided, the model configured for the Knowledge Box is used.

Responses

Request samples

Content type
application/json
Example

You can ask a question to your knowledge box

{
  • "query": "Who won the league final?"
}

Response samples

Content type
application/json
null

Send Feedback

Send feedback for a search operation in a Knowledge Box

Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
header Parameters
x-ndb-client
string (NucliaDBClientType)
Default: api
Enum: "api" "widget" "web" "dashboard" "desktop" "chrome_extension"

An enumeration.

x-nucliadb-user
string (X-Nucliadb-User)
Default:
x-forwarded-for
string (X-Forwarded-For)
Default:
Request Body schema: application/json
required
ident
required
string (Request identifier)

Id of the request to provide feedback for. This id is returned in the response header Nuclia-Learning-Id of the chat endpoint.

good
required
boolean (Good)

Whether the result was good or not

task
required
string (Task)
Value: "CHAT"

The task the feedback is for. For now, only CHAT task is available

feedback
string (Feedback)

Feedback text

Responses

Request samples

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

Response samples

Content type
application/json
null

Find Knowledge Box

Find on a Knowledge Box

Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
query Parameters
query
string (Query)
Default: ""

The query to search for

fields
Array of strings (Fields)
Default: ""

The list of fields to search in. For instance: a/title to search only on title field. For more details on filtering by field, see: https://docs.nuclia.dev/docs/docs/using/search/#search-in-a-specific-field

filters
Array of strings (Filters)
Default: ""

The list of filters to apply. Filtering examples can be found here: https://docs.nuclia.dev/docs/docs/using/search/#filters

page_number
integer (Page number)
Default: 0

The page number of the results to return

page_size
integer (Page size)
Default: 20

The number of results to return per page

min_score
number (Min Score)
Deprecated

Minimum similarity score to filter vector index results. If not specified, the default minimum score of the semantic model associated to the Knowledge Box will be used. Check out the documentation for more information on how to use this parameter: https://docs.nuclia.dev/docs/docs/using/search/#minimum-score

min_score_semantic
number (Min Score Semantic)

Minimum semantic similarity score to filter vector index results. If not specified, the default minimum score of the semantic model associated to the Knowledge Box will be used. Check out the documentation for more information on how to use this parameter: https://docs.nuclia.dev/docs/docs/using/search/#minimum-score

min_score_bm25
number (Min Score Bm25) >= 0
Default: 0

Minimum bm25 score to filter paragraph and document index results

range_creation_start
string <date-time> (Resource creation range start)

Resources created before this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

range_creation_end
string <date-time> (Resource creation range end)

Resources created after this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

range_modification_start
string <date-time> (Resource modification range start)

Resources modified before this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

range_modification_end
string <date-time> (Resource modification range end)

Resources modified after this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

features
Array of strings (Search features)
Default: "paragraph&features=vector"
Items Enum: "paragraph" "document" "relations" "vector"

List of search features to use. Each value corresponds to a lookup into on of the different indexes.

debug
boolean (Debug mode)
Default: false

If set, the response will include some extra metadata for debugging purposes, like the list of queried nodes.

highlight
boolean (Highlight)
Default: false

If set to true, the query terms will be highlighted in the results between ... tags

show
Array of strings (Show metadata)
Default: "basic"
Items Enum: "basic" "origin" "extra" "relations" "values" "extracted" "errors" "security"

Controls which types of metadata are serialized on resources of search results

field_type
Array of strings (Field type filter)
Default: "text&field_type=file&field_type=link&field_type=layout&field_type=conversation&field_type=keywordset&field_type=datetime&field_type=generic"
Items Enum: "text" "file" "link" "layout" "conversation" "keywordset" "datetime" "generic"

Filter search results to match paragraphs of a specific field type. E.g: ['conversation', 'text']

extracted
Array of strings (Extracted metadata)
Default: ""
Items Enum: "text" "metadata" "shortened_metadata" "large_metadata" "vectors" "link" "file" "uservectors" "question_answers"

Controls which parts of the extracted metadata are serialized on search results

with_duplicates
boolean (With duplicate paragraphs)
Default: false

Whether to return duplicate paragraphs on the same document

with_synonyms
boolean (With custom synonyms)
Default: false

Whether to return matches for custom knowledge box synonyms of the query terms. Note: only supported for paragraph and document search options.

autofilter
boolean (Automatic search filtering)
Default: false

If set to true, the search will automatically add filters to the query. For example, it will filter results containing the entities detected in the query

security_groups
Array of strings (Security groups)
Default: ""

List of security groups to filter search results for. Only resources matching the query and containing the specified security groups will be returned. If empty, all resources will be considered for the search.

header Parameters
x-ndb-client
string (NucliaDBClientType)
Default: api
Enum: "api" "widget" "web" "dashboard" "desktop" "chrome_extension"

An enumeration.

x-nucliadb-user
string (X-Nucliadb-User)
Default:
x-forwarded-for
string (X-Forwarded-For)
Default:

Responses

Response samples

Content type
application/json
{
  • "resources": {
    },
  • "relations": {
    },
  • "query": "string",
  • "total": 0,
  • "page_number": 0,
  • "page_size": 20,
  • "next_page": false,
  • "nodes": [
    ],
  • "shards": [
    ],
  • "autofilters": [ ],
  • "min_score": 0,
  • "best_matches": [ ]
}

Find Knowledge Box

Find on a Knowledge Box

Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
header Parameters
x-ndb-client
string (NucliaDBClientType)
Default: api
Enum: "api" "widget" "web" "dashboard" "desktop" "chrome_extension"

An enumeration.

x-nucliadb-user
string (X-Nucliadb-User)
Default:
x-forwarded-for
string (X-Forwarded-For)
Default:
Request Body schema: application/json
required
query
string (Query)
Default: ""

The query to search for

fields
Array of strings (Fields)
Default: []

The list of fields to search in. For instance: a/title to search only on title field. For more details on filtering by field, see: https://docs.nuclia.dev/docs/docs/using/search/#search-in-a-specific-field

Array of Filters (strings) or Array of Filters (objects) (Filters)
Default: []

The list of filters to apply. Filtering examples can be found here: https://docs.nuclia.dev/docs/docs/using/search/#filters

page_number
integer (Page number)
Default: 0

The page number of the results to return

page_size
integer (Page size)
Default: 20

The number of results to return per page

Minimum score (number) or MinScore (object) (Minimum score)

Minimum score to filter search results. Results with a lower score will be ignored. Accepts either a float or a dictionary with the minimum scores for the bm25 and vector indexes. If a float is provided, it is interpreted as the minimum score for vector index search.

range_creation_start
string <date-time> (Resource creation range start)

Resources created before this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

range_creation_end
string <date-time> (Resource creation range end)

Resources created after this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

range_modification_start
string <date-time> (Resource modification range start)

Resources modified before this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

range_modification_end
string <date-time> (Resource modification range end)

Resources modified after this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

features
Array of strings (Search features)
Default: ["paragraph","vector"]
Items Enum: "paragraph" "document" "relations" "vector"

List of search features to use. Each value corresponds to a lookup into on of the different indexes.

debug
boolean (Debug mode)
Default: false

If set, the response will include some extra metadata for debugging purposes, like the list of queried nodes.

highlight
boolean (Highlight)
Default: false

If set to true, the query terms will be highlighted in the results between ... tags

show
Array of strings (Show metadata)
Default: ["basic"]
Items Enum: "basic" "origin" "extra" "relations" "values" "extracted" "errors" "security"

Controls which types of metadata are serialized on resources of search results

field_type_filter
Array of strings (Field type filter)
Default: ["text","file","link","layout","conversation","keywordset","datetime","generic"]
Items Enum: "text" "file" "link" "layout" "conversation" "keywordset" "datetime" "generic"

Filter search results to match paragraphs of a specific field type. E.g: ['conversation', 'text']

extracted
Array of strings (Extracted metadata)
Default: []
Items Enum: "text" "metadata" "shortened_metadata" "large_metadata" "vectors" "link" "file" "uservectors" "question_answers"

Controls which parts of the extracted metadata are serialized on search results

shards
Array of strings (Shards)
Default: []

The list of shard replicas to search in. If empty, random replicas will be selected.

vector
Array of numbers (Search Vector)

The vector to perform the search with. If not provided, NucliaDB will use Nuclia Predict API to create the vector off from the query.

vectorset
string (Vectorset id)

Id of the vectorset to perform the vector search into.

with_duplicates
boolean (With duplicate paragraphs)
Default: false

Whether to return duplicate paragraphs on the same document

with_synonyms
boolean (With custom synonyms)
Default: false

Whether to return matches for custom knowledge box synonyms of the query terms. Note: only supported for paragraph and document search options.

autofilter
boolean (Automatic search filtering)
Default: false

If set to true, the search will automatically add filters to the query. For example, it will filter results containing the entities detected in the query

resource_filters
Array of strings (Resources filter)
Default: []

List of resource ids to filter search results for. Only paragraphs from the specified resources will be returned.

object (Security)

Security metadata for the request. If not provided, the search request is done without the security lookup phase.

Responses

Request samples

Content type
application/json

Perform a hybrid search that will return text and semantic results matching the query

{
  • "query": "How can I be an effective product manager?",
  • "features": [
    ]
}

Response samples

Content type
application/json
{
  • "resources": {
    },
  • "relations": {
    },
  • "query": "string",
  • "total": 0,
  • "page_number": 0,
  • "page_size": 20,
  • "next_page": false,
  • "nodes": [
    ],
  • "shards": [
    ],
  • "autofilters": [ ],
  • "min_score": 0,
  • "best_matches": [ ]
}

Predict Api Proxy

Convenience endpoint that proxies requests to the Predict API. It adds the Knowledge Box configuration settings as headers to the predict API request. Refer to the Predict API documentation for more details about the request and response models: https://docs.nuclia.dev/docs/nua-api#tag/Predict

Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
endpoint
required
string (PredictProxiedEndpoints)
Enum: "tokens" "chat" "rephrase"

Enum for the different endpoints that are proxied to the Predict API

Responses

Response samples

Content type
application/json
null

Predict Api Proxy

Convenience endpoint that proxies requests to the Predict API. It adds the Knowledge Box configuration settings as headers to the predict API request. Refer to the Predict API documentation for more details about the request and response models: https://docs.nuclia.dev/docs/nua-api#tag/Predict

Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
endpoint
required
string (PredictProxiedEndpoints)
Enum: "tokens" "chat" "rephrase"

Enum for the different endpoints that are proxied to the Predict API

Responses

Response samples

Content type
application/json
null

Chat with a resource

Chat with a resource

Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
rid
required
string (Rid)
header Parameters
x-ndb-client
string (NucliaDBClientType)
Default: api
Enum: "api" "widget" "web" "dashboard" "desktop" "chrome_extension"

An enumeration.

x-nucliadb-user
string (X-Nucliadb-User)
Default:
x-forwarded-for
string (X-Forwarded-For)
Default:
x-synchronous
boolean (X-Synchronous)
Default: false

Output response as JSON in a non-streaming way. This is slower and requires waiting for entire answer to be ready.

Request Body schema: application/json
required
query
required
string (Query)

The query to get a generative answer for

fields
Array of strings (Fields)
Default: []

The list of fields to search in. For instance: a/title to search only on title field. For more details on filtering by field, see: https://docs.nuclia.dev/docs/docs/using/search/#search-in-a-specific-field

Array of Filters (strings) or Array of Filters (objects) (Filters)
Default: []

The list of filters to apply. Filtering examples can be found here: https://docs.nuclia.dev/docs/docs/using/search/#filters

Minimum score (number) or MinScore (object) (Minimum score)

Minimum score to filter search results. Results with a lower score will be ignored. Accepts either a float or a dictionary with the minimum scores for the bm25 and vector indexes. If a float is provided, it is interpreted as the minimum score for vector index search.

features
Array of strings (Chat features)
Default: ["vectors","paragraphs","relations"]
Items Enum: "vectors" "paragraphs" "relations"

Features enabled for the chat endpoint. Semantic search is done if vectors is included. If paragraphs is included, the results will include matching paragraphs from the bm25 index. If relations is included, a graph of entities related to the answer is returned.

range_creation_start
string <date-time> (Resource creation range start)

Resources created before this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

range_creation_end
string <date-time> (Resource creation range end)

Resources created after this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

range_modification_start
string <date-time> (Resource modification range start)

Resources modified before this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

range_modification_end
string <date-time> (Resource modification range end)

Resources modified after this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

show
Array of strings (Show metadata)
Default: ["basic"]
Items Enum: "basic" "origin" "extra" "relations" "values" "extracted" "errors" "security"

Controls which types of metadata are serialized on resources of search results

field_type_filter
Array of strings (Field type filter)
Default: ["text","file","link","layout","conversation","keywordset","datetime","generic"]
Items Enum: "text" "file" "link" "layout" "conversation" "keywordset" "datetime" "generic"

Filter search results to match paragraphs of a specific field type. E.g: ['conversation', 'text']

extracted
Array of strings (Extracted metadata)
Default: []
Items Enum: "text" "metadata" "shortened_metadata" "large_metadata" "vectors" "link" "file" "uservectors" "question_answers"

Controls which parts of the extracted metadata are serialized on search results

shards
Array of strings (Shards)
Default: []

The list of shard replicas to search in. If empty, random replicas will be selected.

Array of objects (Chat history)

Use to rephrase the new LLM query by taking into account the chat conversation history

extra_context
Array of strings (Extra query context)

Additional context that is added to the retrieval context sent to the LLM. It allows extending the chat feature with content that may not be in the Knowledge Box.

autofilter
boolean (Automatic search filtering)
Default: false

If set to true, the search will automatically add filters to the query. For example, it will filter results containing the entities detected in the query

highlight
boolean (Highlight)
Default: false

If set to true, the query terms will be highlighted in the results between ... tags

resource_filters
Array of strings (Resources filter)
Default: []

List of resource ids to filter search results for. Only paragraphs from the specified resources will be returned.

prompt
string (Prompt) non-empty

Input here your prompt with the words {context} and {question} in brackets where you want those fields to be placed, in case you want them in your prompt. Context will be the data returned by the retrieval step.

citations
boolean (Citations)
Default: false

Whether to include the citations for the answer in the response

object (Security)

Security metadata for the request. If not provided, the search request is done without the security lookup phase.

Array of any (RAG context building strategies)
Default: []

Options for tweaking how the context for the LLM model is crafted. full_resource will add the full text of the matching resources to the context. field_extension will add the text of the matching resource's specified fields to the context. If empty, the default strategy is used.

debug
boolean (Debug mode)
Default: false

If set, the response will include some extra metadata for debugging purposes, like the list of queried nodes.

generative_model
string (Generative model)

The generative model to use for the chat endpoint. If not provided, the model configured for the Knowledge Box is used.

Responses

Request samples

Content type
application/json
{
  • "query": "string",
  • "fields": [ ],
  • "filters": [ ],
  • "min_score": 0,
  • "features": [
    ],
  • "range_creation_start": "2019-08-24T14:15:22Z",
  • "range_creation_end": "2019-08-24T14:15:22Z",
  • "range_modification_start": "2019-08-24T14:15:22Z",
  • "range_modification_end": "2019-08-24T14:15:22Z",
  • "show": [
    ],
  • "field_type_filter": [
    ],
  • "extracted": [ ],
  • "shards": [ ],
  • "context": [
    ],
  • "extra_context": [
    ],
  • "autofilter": false,
  • "highlight": false,
  • "resource_filters": [ ],
  • "prompt": "string",
  • "citations": false,
  • "security": {
    },
  • "rag_strategies": [ ],
  • "debug": false,
  • "generative_model": "string"
}

Response samples

Content type
application/json
null

Search On Resource

Search on a Resource

Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
rid
required
string (Rid)
query Parameters
query
required
string (Query)
fields
Array of strings (Fields)
Default: ""

The list of fields to search in. For instance: a/title to search only on title field. For more details on filtering by field, see: https://docs.nuclia.dev/docs/docs/using/search/#search-in-a-specific-field

filters
Array of strings (Filters)
Default: ""

The list of filters to apply. Filtering examples can be found here: https://docs.nuclia.dev/docs/docs/using/search/#filters

faceted
Array of strings (Faceted) <= 50 characters [ items <= 50 characters ]
Default: ""

The list of facets to calculate. The facets follow the same syntax as filters: https://docs.nuclia.dev/docs/docs/using/search/#filters

sort_field
string (Sort field)
Enum: "score" "created" "modified" "title"

Field to sort results with

sort_order
string (Sort order)
Default: "desc"
Enum: "asc" "desc"

Order to sort results with

page_number
integer (Page number)
Default: 0

The page number of the results to return

page_size
integer (Page size)
Default: 20

The number of results to return per page

range_creation_start
string <date-time> (Resource creation range start)

Resources created before this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

range_creation_end
string <date-time> (Resource creation range end)

Resources created after this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

range_modification_start
string <date-time> (Resource modification range start)

Resources modified before this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

range_modification_end
string <date-time> (Resource modification range end)

Resources modified after this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

highlight
boolean (Highlight)
Default: false

If set to true, the query terms will be highlighted in the results between ... tags

show
Array of strings (Show metadata)
Default: "basic&show=origin&show=extra&show=relations&show=values&show=extracted&show=errors&show=security"
Items Enum: "basic" "origin" "extra" "relations" "values" "extracted" "errors" "security"

Controls which types of metadata are serialized on resources of search results

field_type
Array of strings (Field type filter)
Default: "text&field_type=file&field_type=link&field_type=layout&field_type=conversation&field_type=keywordset&field_type=datetime&field_type=generic"
Items Enum: "text" "file" "link" "layout" "conversation" "keywordset" "datetime" "generic"

Filter search results to match paragraphs of a specific field type. E.g: ['conversation', 'text']

extracted
Array of strings (Extracted metadata)
Default: ""
Items Enum: "text" "metadata" "shortened_metadata" "large_metadata" "vectors" "link" "file" "uservectors" "question_answers"

Controls which parts of the extracted metadata are serialized on search results

debug
boolean (Debug mode)
Default: false

If set, the response will include some extra metadata for debugging purposes, like the list of queried nodes.

shards
Array of strings (Shards)
Default: ""

The list of shard replicas to search in. If empty, random replicas will be selected.

header Parameters
x-ndb-client
string (NucliaDBClientType)
Default: api
Enum: "api" "widget" "web" "dashboard" "desktop" "chrome_extension"

An enumeration.

Responses

Response samples

Content type
application/json
{
  • "sentences": {
    },
  • "paragraphs": {
    },
  • "relations": {
    },
  • "nodes": [
    ],
  • "shards": [
    ]
}

Search Knowledge Box

Search on a Knowledge Box

Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
query Parameters
query
string (Query)
Default: ""

The query to search for

fields
Array of strings (Fields)
Default: ""

The list of fields to search in. For instance: a/title to search only on title field. For more details on filtering by field, see: https://docs.nuclia.dev/docs/docs/using/search/#search-in-a-specific-field

filters
Array of strings (Filters)
Default: ""

The list of filters to apply. Filtering examples can be found here: https://docs.nuclia.dev/docs/docs/using/search/#filters

faceted
Array of strings (Faceted) <= 50 characters [ items <= 50 characters ]
Default: ""

The list of facets to calculate. The facets follow the same syntax as filters: https://docs.nuclia.dev/docs/docs/using/search/#filters

sort_field
string (Sort field)
Enum: "score" "created" "modified" "title"

Field to sort results with

sort_limit
integer (Sort limit) > 0
sort_order
string (Sort order)
Default: "desc"
Enum: "asc" "desc"

Order to sort results with

page_number
integer (Page number)
Default: 0

The page number of the results to return

page_size
integer (Page size)
Default: 20

The number of results to return per page

min_score
number (Min Score)
Deprecated

Minimum similarity score to filter vector index results. If not specified, the default minimum score of the semantic model associated to the Knowledge Box will be used. Check out the documentation for more information on how to use this parameter: https://docs.nuclia.dev/docs/docs/using/search/#minimum-score

min_score_semantic
number (Min Score Semantic)

Minimum semantic similarity score to filter vector index results. If not specified, the default minimum score of the semantic model associated to the Knowledge Box will be used. Check out the documentation for more information on how to use this parameter: https://docs.nuclia.dev/docs/docs/using/search/#minimum-score

min_score_bm25
number (Min Score Bm25) >= 0
Default: 0

Minimum bm25 score to filter paragraph and document index results

range_creation_start
string <date-time> (Resource creation range start)

Resources created before this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

range_creation_end
string <date-time> (Resource creation range end)

Resources created after this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

range_modification_start
string <date-time> (Resource modification range start)

Resources modified before this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

range_modification_end
string <date-time> (Resource modification range end)

Resources modified after this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

features
Array of strings (Search features)
Default: "paragraph&features=document&features=vector"
Items Enum: "paragraph" "document" "relations" "vector"

List of search features to use. Each value corresponds to a lookup into on of the different indexes.

debug
boolean (Debug mode)
Default: false

If set, the response will include some extra metadata for debugging purposes, like the list of queried nodes.

highlight
boolean (Highlight)
Default: false

If set to true, the query terms will be highlighted in the results between ... tags

show
Array of strings (Show metadata)
Default: "basic"
Items Enum: "basic" "origin" "extra" "relations" "values" "extracted" "errors" "security"

Controls which types of metadata are serialized on resources of search results

field_type
Array of strings (Field type filter)
Default: "text&field_type=file&field_type=link&field_type=layout&field_type=conversation&field_type=keywordset&field_type=datetime&field_type=generic"
Items Enum: "text" "file" "link" "layout" "conversation" "keywordset" "datetime" "generic"

Filter search results to match paragraphs of a specific field type. E.g: ['conversation', 'text']

extracted
Array of strings (Extracted metadata)
Default: ""
Items Enum: "text" "metadata" "shortened_metadata" "large_metadata" "vectors" "link" "file" "uservectors" "question_answers"

Controls which parts of the extracted metadata are serialized on search results

shards
Array of strings (Shards)
Default: ""

The list of shard replicas to search in. If empty, random replicas will be selected.

with_duplicates
boolean (With duplicate paragraphs)
Default: false

Whether to return duplicate paragraphs on the same document

with_synonyms
boolean (With custom synonyms)
Default: false

Whether to return matches for custom knowledge box synonyms of the query terms. Note: only supported for paragraph and document search options.

autofilter
boolean (Automatic search filtering)
Default: false

If set to true, the search will automatically add filters to the query. For example, it will filter results containing the entities detected in the query

security_groups
Array of strings (Security groups)
Default: ""

List of security groups to filter search results for. Only resources matching the query and containing the specified security groups will be returned. If empty, all resources will be considered for the search.

header Parameters
x-ndb-client
string (NucliaDBClientType)
Default: api
Enum: "api" "widget" "web" "dashboard" "desktop" "chrome_extension"

An enumeration.

x-nucliadb-user
string (X-Nucliadb-User)
Default:
x-forwarded-for
string (X-Forwarded-For)
Default:

Responses

Response samples

Content type
application/json
{
  • "resources": { },
  • "sentences": {
    },
  • "paragraphs": {
    },
  • "fulltext": {
    },
  • "relations": {
    },
  • "nodes": [
    ],
  • "shards": [
    ],
  • "autofilters": [ ]
}

Search Knowledge Box

Search on a Knowledge Box

Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
header Parameters
x-ndb-client
string (NucliaDBClientType)
Default: api
Enum: "api" "widget" "web" "dashboard" "desktop" "chrome_extension"

An enumeration.

x-nucliadb-user
string (X-Nucliadb-User)
Default:
x-forwarded-for
string (X-Forwarded-For)
Default:
Request Body schema: application/json
required
query
string (Query)
Default: ""

The query to search for

fields
Array of strings (Fields)
Default: []

The list of fields to search in. For instance: a/title to search only on title field. For more details on filtering by field, see: https://docs.nuclia.dev/docs/docs/using/search/#search-in-a-specific-field

Array of Filters (strings) or Array of Filters (objects) (Filters)
Default: []

The list of filters to apply. Filtering examples can be found here: https://docs.nuclia.dev/docs/docs/using/search/#filters

page_number
integer (Page number)
Default: 0

The page number of the results to return

page_size
integer (Page size)
Default: 20

The number of results to return per page

Minimum score (number) or MinScore (object) (Minimum score)

Minimum score to filter search results. Results with a lower score will be ignored. Accepts either a float or a dictionary with the minimum scores for the bm25 and vector indexes. If a float is provided, it is interpreted as the minimum score for vector index search.

range_creation_start
string <date-time> (Resource creation range start)

Resources created before this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

range_creation_end
string <date-time> (Resource creation range end)

Resources created after this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

range_modification_start
string <date-time> (Resource modification range start)

Resources modified before this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

range_modification_end
string <date-time> (Resource modification range end)

Resources modified after this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

features
Array of strings (Search features)
Default: ["paragraph","document","vector"]
Items Enum: "paragraph" "document" "relations" "vector"

List of search features to use. Each value corresponds to a lookup into on of the different indexes.

debug
boolean (Debug mode)
Default: false

If set, the response will include some extra metadata for debugging purposes, like the list of queried nodes.

highlight
boolean (Highlight)
Default: false

If set to true, the query terms will be highlighted in the results between ... tags

show
Array of strings (Show metadata)
Default: ["basic"]
Items Enum: "basic" "origin" "extra" "relations" "values" "extracted" "errors" "security"

Controls which types of metadata are serialized on resources of search results

field_type_filter
Array of strings (Field type filter)
Default: ["text","file","link","layout","conversation","keywordset","datetime","generic"]
Items Enum: "text" "file" "link" "layout" "conversation" "keywordset" "datetime" "generic"

Filter search results to match paragraphs of a specific field type. E.g: ['conversation', 'text']

extracted
Array of strings (Extracted metadata)
Default: []
Items Enum: "text" "metadata" "shortened_metadata" "large_metadata" "vectors" "link" "file" "uservectors" "question_answers"

Controls which parts of the extracted metadata are serialized on search results

shards
Array of strings (Shards)
Default: []

The list of shard replicas to search in. If empty, random replicas will be selected.

vector
Array of numbers (Search Vector)

The vector to perform the search with. If not provided, NucliaDB will use Nuclia Predict API to create the vector off from the query.

vectorset
string (Vectorset id)

Id of the vectorset to perform the vector search into.

with_duplicates
boolean (With duplicate paragraphs)
Default: false

Whether to return duplicate paragraphs on the same document

with_synonyms
boolean (With custom synonyms)
Default: false

Whether to return matches for custom knowledge box synonyms of the query terms. Note: only supported for paragraph and document search options.

autofilter
boolean (Automatic search filtering)
Default: false

If set to true, the search will automatically add filters to the query. For example, it will filter results containing the entities detected in the query

resource_filters
Array of strings (Resources filter)
Default: []

List of resource ids to filter search results for. Only paragraphs from the specified resources will be returned.

object (Security)

Security metadata for the request. If not provided, the search request is done without the security lookup phase.

faceted
Array of strings (Faceted) <= 50 items
Default: []

The list of facets to calculate. The facets follow the same syntax as filters: https://docs.nuclia.dev/docs/docs/using/search/#filters

object (Sort options)

Options for results sorting

Responses

Request samples

Content type
application/json
Example
{
  • "query": "Noam Chomsky",
  • "filters": [
    ],
  • "features": [
    ]
}

Response samples

Content type
application/json
{
  • "resources": { },
  • "sentences": {
    },
  • "paragraphs": {
    },
  • "fulltext": {
    },
  • "relations": {
    },
  • "nodes": [
    ],
  • "shards": [
    ],
  • "autofilters": [ ]
}

Suggest Knowledgebox

Suggestions on a knowledge box

Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
query Parameters
query
required
string (Query)

The query to get suggestions for

fields
Array of strings (Fields)
Default: ""

The list of fields to search in. For instance: a/title to search only on title field. For more details on filtering by field, see: https://docs.nuclia.dev/docs/docs/using/search/#search-in-a-specific-field

filters
Array of strings (Filters)
Default: ""

The list of filters to apply. Filtering examples can be found here: https://docs.nuclia.dev/docs/docs/using/search/#filters

faceted
Array of strings (Faceted) <= 50 characters [ items <= 50 characters ]
Default: ""

The list of facets to calculate. The facets follow the same syntax as filters: https://docs.nuclia.dev/docs/docs/using/search/#filters

range_creation_start
string <date-time> (Resource creation range start)

Resources created before this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

range_creation_end
string <date-time> (Resource creation range end)

Resources created after this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

range_modification_start
string <date-time> (Resource modification range start)

Resources modified before this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

range_modification_end
string <date-time> (Resource modification range end)

Resources modified after this date will be filtered out of search results. Datetime are represented as a str in ISO 8601 format, like: 2008-09-15T15:53:00+05:00.

features
Array of strings (Suggest features)
Default: "paragraph&features=entities"
Items Enum: "paragraph" "entities"

Features enabled for the suggest endpoint.

show
Array of strings (Show metadata)
Default: "basic"
Items Enum: "basic" "origin" "extra" "relations" "values" "extracted" "errors" "security"

Controls which types of metadata are serialized on resources of search results

field_type
Array of strings (Field type filter)
Default: "text&field_type=file&field_type=link&field_type=layout&field_type=conversation&field_type=keywordset&field_type=datetime&field_type=generic"
Items Enum: "text" "file" "link" "layout" "conversation" "keywordset" "datetime" "generic"

Filter search results to match paragraphs of a specific field type. E.g: ['conversation', 'text']

debug
boolean (Debug mode)
Default: false

If set, the response will include some extra metadata for debugging purposes, like the list of queried nodes.

highlight
boolean (Highlight)
Default: false

If set to true, the query terms will be highlighted in the results between ... tags

header Parameters
x-ndb-client
string (NucliaDBClientType)
Default: api
Enum: "api" "widget" "web" "dashboard" "desktop" "chrome_extension"

An enumeration.

x-nucliadb-user
string (X-Nucliadb-User)
Default:
x-forwarded-for
string (X-Forwarded-For)
Default:

Responses

Response samples

Content type
application/json
{
  • "paragraphs": {
    },
  • "entities": {
    },
  • "shards": [
    ]
}

Summarize Your Documents

Summarize Your Documents

Authorization roles

Authenticated user needs to fulfill one of this roles, otherwise the request will be rejected with a 403 response.

  • READER
path Parameters
kbid
required
string (Kbid)
Request Body schema: application/json
required
generative_model
string (Generative model)

The generative model to use for the summarization. If not provided, the model configured for the Knowledge Box is used.

user_prompt
string (User prompt)

Optional custom prompt input by the user

resources
required
Array of strings (Resources) [ 1 .. 100 ] items

Uids or slugs of the resources to summarize. If the resources are not found, they will be ignored.

summary_kind
string (Summary kind)
Default: "simple"
Enum: "simple" "extended"

Option to customize how the summary will be

Responses

Request samples

Content type
application/json
{
  • "generative_model": "string",
  • "user_prompt": "string",
  • "resources": [
    ],
  • "summary_kind": "simple"
}

Response samples

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