Skip to main content

Nuclia management REST API (v1)

API reference for Nuclia account, covering all the endpoints related to account, user and knowledge box management

Accounts

CRUD and other operations related to Accounts

Delete Account


Authorization roles

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

  • AOWNER
path Parameters
account_slug
required
string (Account Slug)

Responses

Response samples

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

Get Account


Authorization roles

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

  • AOWNER
  • AMEMBER
path Parameters
account_slug
required
string (Account slug)

Identifier to use as the account identifier in all account resources and subresources. This is a mutable field, unique, but independent of the account id

Responses

Response samples

Content type
application/json
{
  • "blocked_features": [ ],
  • "blocking_state": "unblocked",
  • "can_manage_account": true,
  • "config": {
    },
  • "current_kbs": 0,
  • "current_users": 0,
  • "description": "string",
  • "id": "string",
  • "limits": {
    },
  • "max_kbs": 0,
  • "max_users": 0,
  • "slug": "string",
  • "title": "string",
  • "type": "stash-basic",
  • "zone": "string"
}

Modify Account


Authorization roles

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

  • AOWNER
path Parameters
account_slug
required
string (Account slug)

Identifier to use as the account identifier in all account resources and subresources. This is a mutable field, unique, but independent of the account id

Request Body schema: application/json
description
string (Description)
g_speech_to_text
boolean (G Speech To Text)
indexer_slow_replicas
integer (Indexer Slow Replicas)
object (SAMLConfig)
title
string (Title) non-empty

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "g_speech_to_text": true,
  • "indexer_slow_replicas": 0,
  • "saml": {
    },
  • "title": "string"
}

Response samples

Content type
application/json
null

Invite To Account

Invite somebody by email


Authorization roles

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

  • AMEMBER
  • AOWNER
path Parameters
account_slug
required
string (Account Slug)
Request Body schema: application/json
email
required
string (Email)

Responses

Request samples

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

Response samples

Content type
application/json
null

Download Account Logo

Account logo


Authorization roles

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

  • AOWNER
  • AMEMBER
query Parameters
account_id
required
string (Account Id)

Responses

Response samples

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

Upload Account Logo

Account logo


Authorization roles

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

  • AOWNER
query Parameters
account_id
required
string (Account Id)
Request Body schema: multipart/form-data
file
required
string <binary> (File)

Responses

Response samples

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

Get Account Permissions


Authorization roles

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

  • AOWNER
  • AMEMBER
query Parameters
account_id
required
string (Account Id)
stash_id
required
string (Stash Id)

Responses

Response samples

Content type
application/json
null

Processing Stats

Retrive statistics for a knowledgebox or account

path Parameters
account_slug
required
string (Account Slug)
query Parameters
period
string (StatsPeriod)
Default: "day"
Enum: "day" "week" "month" "year"

An enumeration.

knowledgebox
string (Knowledgebox)
stats
string (StatsQueryFields)
Default: "searches"
Enum: "processing_time" "searches" "chars" "media_seconds" "bytes" "resources" "pages" "paragraphs" "train_seconds" "suggestions" "predictions" "docs_no_media"

An enumeration.

utctime
string <date-time> (Utctime)

Responses

Response samples

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

List Accounts


Authorization roles

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

  • Authenticated

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create Account


Authorization roles

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

  • Authenticated
Request Body schema: application/json
description
string (Description)
email
string (Email)
slug
required
string (Account slug) ^[a-z0-9_-]+$

Identifier to use as the account identifier in all account resources and subresources. This is a mutable field, unique, but independent of the account id

title
required
string (Title) non-empty
zone
string (Zone)

Responses

Request samples

Content type
application/json
{
  • "description": "string",
  • "email": "string",
  • "slug": "string",
  • "title": "string",
  • "zone": "string"
}

Response samples

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

Account Users

Management of users assigned on an Account

Get Account User Details

Account user


Authorization roles

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

  • AMEMBER
  • AOWNER
path Parameters
account_slug
required
string (Account Slug)
user_id
required
string (User Id)

Responses

Response samples

Content type
application/json
{
  • "email": "string",
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "role": "AOWNER"
}

List Account Users

Account user


Authorization roles

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

  • AOWNER
path Parameters
account_slug
required
string (Account Slug)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Update Users

Account user modification


Authorization roles

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

  • AOWNER
path Parameters
account_slug
required
string (Account Slug)
Request Body schema: application/json
Array of objects (Add)
delete
Array of strings (Delete)

Responses

Request samples

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

Response samples

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

Search Account Users

Search account users


Authorization roles

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

  • AOWNER
  • AMEMBER
path Parameters
account_slug
required
string (Account Slug)
query Parameters
query
required
string (Query)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Knowledge Boxes

CRUD and other operations related to Knowledge Boxes

Delete Knowledge Box


Authorization roles

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

  • AOWNER
path Parameters
account_slug
required
string (Account Slug)
kb_slug
required
string (Kb Slug)

Responses

Response samples

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

Get Knowledge Box


Authorization roles

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

  • SOWNER
  • SCONTRIBUTOR
  • SMEMBER
path Parameters
account_slug
required
string (Account Slug)
kb_slug
required
string (Kb Slug)

Responses

Response samples

Content type
application/json
{
  • "admin": true,
  • "contrib": true,
  • "description": "string",
  • "id": "string",
  • "slug": "string",
  • "state": "PUBLISHED",
  • "title": "string",
  • "zone": "string"
}

Modify Knowledge Box

Modifies an existing knowledge box. The accepted values for the learning_configuration ara dynamic and may be dependant of the account used. Accepted field values needs to be checked on the 'Learning configuration schema' endpoint


Authorization roles

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

  • AOWNER
  • SOWNER
  • SCONTRIBUTOR
path Parameters
account_slug
required
string (Account Slug)
kb_slug
required
string (Kb Slug)
Request Body schema: application/json
anonymization
string (Anonymization)
description
string (Description)
object (Learning Configuration)
Default: {}
slug
string (Slug) ^[a-z0-9_-]+$
state
string (StashStates)
Enum: "PUBLISHED" "PRIVATE"

An enumeration.

title
string (Title) non-empty

Responses

Request samples

Content type
application/json
{
  • "anonymization": "string",
  • "description": "string",
  • "learning_configuration": { },
  • "slug": "string",
  • "state": "PUBLISHED",
  • "title": "string"
}

Response samples

Content type
application/json
null

Create Ephemeral Token

Create a ephemeral token to access this knowledge box


Authorization roles

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

  • SOWNER
  • SMEMBER
path Parameters
account_slug
required
string (Account Slug)
kb_slug
required
string (Kb Slug)

Responses

Response samples

Content type
application/json
null

Invite To Knowledge Box

Invite somebody by email


Authorization roles

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

  • SCONTRIBUTOR
  • SOWNER
  • AOWNER
path Parameters
account_slug
required
string (Account Slug)
kb_slug
required
string (Kb Slug)
Request Body schema: application/json
email
required
string (Email)
role
required
string (StashRoles)
Enum: "SOWNER" "SMEMBER" "SCONTRIBUTOR"

An enumeration.

Responses

Request samples

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

Response samples

Content type
application/json
null

Download Logo

Knowledge box logo


Authorization roles

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

  • SOWNER
  • SCONTRIBUTOR
  • SMEMBER
query Parameters
account_id
required
string (Account Id)
stash_id
required
string (Stash Id)

Responses

Response samples

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

Upload Logo

Knowledge box logo


Authorization roles

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

  • SOWNER
query Parameters
account_id
required
string (Account Id)
stash_id
required
string (Stash Id)

Responses

Response samples

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

Get Knowledge Box Permissions


Authorization roles

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

  • SOWNER
  • SCONTRIBUTOR
  • SMEMBER
query Parameters
account_id
required
string (Account Id)
stash_id
required
string (Stash Id)

Responses

Response samples

Content type
application/json
null

List Knowledge Boxes

List of knowledge box that user has access on this account


Authorization roles

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

  • AOWNER
  • AMEMBER
path Parameters
account_slug
required
string (Account Slug)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create Knowledge Box

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


Authorization roles

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

  • AOWNER
path Parameters
account_slug
required
string (Account Slug)
Request Body schema: application/json
anonymization
string (Anonymization)
description
string (Description)
object (Learning Configuration)
Default: {}
sentence_embedder
string (Sentence Embedder)
slug
required
string (Slug) ^[a-z0-9_-]+$
title
required
string (Title) non-empty
zone
string (Zone)

Responses

Request samples

Content type
application/json
{
  • "anonymization": "string",
  • "description": "string",
  • "learning_configuration": { },
  • "sentence_embedder": "string",
  • "slug": "string",
  • "title": "string",
  • "zone": "string"
}

Response samples

Content type
application/json
null

Knowledge Box Users

Management of users assigned on a Knowledge Box

Users

Stash user


Authorization roles

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

  • AOWNER
path Parameters
account_slug
required
string (Account Slug)
kb_slug
required
string (Kb Slug)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Update Users

Assign or remove users from a Knowledgebox


Authorization roles

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

  • AOWNER
path Parameters
account_slug
required
string (Account Slug)
kb_slug
required
string (Kb Slug)
Request Body schema: application/json
Array of objects (Add)
delete
Array of strings (Delete)
Array of objects (Update)

Responses

Request samples

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

Response samples

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

Knowledge Box Service Accounts

Management of api keys assigned on a Knowledge Box

Delete Service Account

Delete a new service account for a knowledge box


Authorization roles

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

  • AOWNER
path Parameters
account_slug
required
string (Account Slug)
kb_slug
required
string (Kb Slug)
sa_id
required
string (Sa Id)

Responses

Response samples

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

Delete Service Account Key

Delete a key of a knowledge box service account


Authorization roles

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

  • AOWNER
path Parameters
account_slug
required
string (Account Slug)
kb_slug
required
string (Kb Slug)
sa_id
required
string (Sa Id)
sa_key_id
required
string (Sa Key Id)

Responses

Response samples

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

Add Service Account Key

Create a key for a service account 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.

  • AOWNER
path Parameters
account_slug
required
string (Account Slug)
kb_slug
required
string (Kb Slug)
sa_id
required
string (Sa Id)
Request Body schema: application/json
expires
required
string <date-time> (Expires)

Responses

Request samples

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

Response samples

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

List Service Accounts

List of service accounts of this knowledge box


Authorization roles

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

  • AOWNER
path Parameters
account_slug
required
string (Account Slug)
kb_slug
required
string (Kb Slug)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Add Service Account

Create a new service account for a knowledge box


Authorization roles

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

  • AOWNER
path Parameters
account_slug
required
string (Account Slug)
kb_slug
required
string (Kb Slug)
Request Body schema: application/json
role
required
string (StashRoles)
Enum: "SOWNER" "SMEMBER" "SCONTRIBUTOR"

An enumeration.

title
required
string (Title) non-empty

Responses

Request samples

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

Response samples

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

User

Operations related to the currently authenticated user

Delete Authenticated User

Delete the logged in user


Authorization roles

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

  • Authenticated

Responses

Get Authenticated User

Information about user


Authorization roles

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

  • Authenticated

Responses

Response samples

Content type
application/json
{
  • "avatar": "string",
  • "email": "string",
  • "id": "string",
  • "language": "CA",
  • "last_login": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "type": "ROOT"
}

Modify User Profile

Set information about user

Request Body schema: application/json
avatar
string (Avatar)
email
string (Email)
language
string (Languages)
Enum: "CA" "ES" "EN"

An enumeration.

name
string (Name)

Responses

Request samples

Content type
application/json
{
  • "avatar": "string",
  • "email": "string",
  • "language": "CA",
  • "name": "string"
}

Response samples

Content type
application/json
null

Welcome

Welcome information for a new user


Authorization roles

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

  • Authenticated

Responses

Response samples

Content type
application/json
{
  • "accounts": [
    ],
  • "can_be_deleted": true,
  • "create": true,
  • "dependant_accounts": [
    ],
  • "preferences": {
    }
}

NucliaDB

Management of keys to access a NucliaDB

NUA Client

Delete Nua Client By Id

Deletes an existing Nuclia Understanding API client


Authorization roles

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

  • AOWNER
path Parameters
account_slug
required
string (Account Slug)
client_id
required
string (Client Id) ^[a-z0-9_-]+$

Responses

Response samples

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

Get Nua Client By Id

Gets the metadata of an existing Nuclia Understanding API


Authorization roles

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

  • AOWNER
path Parameters
account_slug
required
string (Account Slug)
client_id
required
string (Client Id) ^[a-z0-9_-]+$

Responses

Response samples

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

Set Account Nua Client Key

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


Authorization roles

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

  • AOWNER
path Parameters
account_slug
required
string (Account Slug)
client_id
required
string (Client Id) ^[a-z0-9_-]+$

Responses

Response samples

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

Get Account Nua Clients

Gets the list of Nuclia Understanding API clients of an account


Authorization roles

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

  • AOWNER
path Parameters
account_slug
required
string (Account Slug)
query Parameters
client_id
string (Client Id)

Responses

Response samples

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

Create Account Nua Client

Create a new Nuclia Understanding API clients for an account


Authorization roles

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

  • AOWNER
path Parameters
account_slug
required
string (Account Slug)
Request Body schema: application/json
client_id
string (Client Id) ^[a-z0-9_-]+$
contact
required
string (Contact)
description
string (Description)
Default: ""
object (ProcessingWebhook)
title
required
string (Title) non-empty

Responses

Request samples

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

Response samples

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

Zones

List Zones

Welcome information for a new user


Authorization roles

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

  • Authenticated

Responses

Response samples

Content type
application/json
[
  • {
    }
]