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

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
rslug
string (Rslug)
show
Array of strings (ResourceProperties)
Default: ["basic"]
Items Enum: "basic" "origin" "relations" "values" "extracted" "errors"
field_type
Array of strings (FieldTypeName)
Default: ["text","file","link","layout","conversation","keywordset","datetime","generic"]
Items Enum: "text" "file" "link" "layout" "conversation" "keywordset" "datetime" "generic"
extracted
Array of strings (ExtractedDataTypeName)
Default: ["text","metadata","link","file"]
Items Enum: "text" "metadata" "large_metadata" "vectors" "link" "file"
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",
  • "title": "string",
  • "summary": "string",
  • "icon": "string",
  • "layout": "string",
  • "thumbnail": "string",
  • "metadata": {
    },
  • "usermetadata": {
    },
  • "fieldmetadata": [
    ],
  • "created": "2019-08-24T14:15:22Z",
  • "modified": "2019-08-24T14:15:22Z",
  • "last_seqid": 0,
  • "last_account_seq": 0,
  • "queue": "private",
  • "origin": {
    },
  • "relations": [
    ],
  • "data": {
    }
}

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)
query Parameters
rslug
string (Rslug)
header Parameters
x-synchronous
boolean (X-Synchronous)
Default: false

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)
query Parameters
rslug
string (Rslug)
header Parameters
x-skip-store
boolean (X-Skip-Store)
Default: false
x-synchronous
boolean (X-Synchronous)
Default: false
Request Body schema: application/json
title
string (Title)
summary
string (Summary)
slug
string (Slug) ^[a-z0-9_-]+$
icon
string (Icon)
thumbnail
string (Thumbnail)
layout
string (Layout)
object (UserMetadata)
Array of objects (Fieldmetadata)
object (Files)
Default: {}
object (Links)
Default: {}
object (Texts)
Default: {}
object (Layouts)
Default: {}
object (Conversations)
Default: {}
object (Keywordsets)
Default: {}
object (Datetimes)
Default: {}
object (Processing Options)
Default: {"ml_text":true}

Responses

Request samples

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

Response samples

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

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
rslug
string (Rslug)
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)
query Parameters
rslug
string (Rslug)

Responses

Response samples

Content type
application/json
{
  • "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
size
integer (Size)
Default: 20

Responses

Response samples

Content type
application/json
null

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
x-synchronous
boolean (X-Synchronous)
Default: false
Request Body schema: application/json
title
string (Title)
summary
string (Summary)
slug
string (Slug) ^[a-z0-9_-]+$
icon
string (Icon)
thumbnail
string (Thumbnail)
layout
string (Layout)
object (InputMetadata)
object (UserMetadata)
Array of objects (Fieldmetadata)
object (Origin)
object (Files)
Default: {}
object (Links)
Default: {}
object (Texts)
Default: {}
object (Layouts)
Default: {}
object (Conversations)
Default: {}
object (Keywordsets)
Default: {}
object (Datetimes)
Default: {}
object (Processing Options)
Default: {"ml_text":true}

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "uuid": "string",
  • "elapsed": 0,
  • "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
rid
string (Rid)
show
Array of strings (ResourceProperties)
Default: ["basic"]
Items Enum: "basic" "origin" "relations" "values" "extracted" "errors"
field_type
Array of strings (FieldTypeName)
Default: ["text","file","link","layout","conversation","keywordset","datetime","generic"]
Items Enum: "text" "file" "link" "layout" "conversation" "keywordset" "datetime" "generic"
extracted
Array of strings (ExtractedDataTypeName)
Default: ["text","metadata","link","file"]
Items Enum: "text" "metadata" "large_metadata" "vectors" "link" "file"
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",
  • "title": "string",
  • "summary": "string",
  • "icon": "string",
  • "layout": "string",
  • "thumbnail": "string",
  • "metadata": {
    },
  • "usermetadata": {
    },
  • "fieldmetadata": [
    ],
  • "created": "2019-08-24T14:15:22Z",
  • "modified": "2019-08-24T14:15:22Z",
  • "last_seqid": 0,
  • "last_account_seq": 0,
  • "queue": "private",
  • "origin": {
    },
  • "relations": [
    ],
  • "data": {