Skip to main content

Account REST API (v1)

API documentation for managing Nuclia accounts, including all related endpoints.

Accounts

Operations for creating, reading, updating, and deleting accounts.

Get Usage

Retrive statistics for a knowledgebox or account

path Parameters
account_id
required
string <uuid> (Account Id)
query Parameters
aggregation
string (Aggregation)
Enum: "hour" "day" "week" "month" "quarter" "year" "millennium"
Knowledgebox (string) or Knowledgebox (null) (Knowledgebox)
from
required
string <date-time> (From)
To (string) or To (null) (To)
Default: "2024-12-19T15:25:26.777429"

Responses

Response samples

Content type
application/json
[
  • {
    }
]

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_or_id
required
string (Account Slug Or Id)

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "slug": "string",
  • "title": "string",
  • "type": "stash-trial",
  • "description": "string",
  • "can_manage_account": true,
  • "current_users": 0,
  • "max_users": 0,
  • "current_kbs": 0,
  • "max_kbs": 0,
  • "blocking_state": "unblocked",
  • "blocked_features": [ ],
  • "limits": {
    },
  • "creation_date": "2019-08-24T14:15:22Z",
  • "trial_expiration_date": "2019-08-24T14:15:22Z",
  • "domain": "string",
  • "saml_entity_id": "string",
  • "saml_sso_url": "string",
  • "saml_x509_cert": "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)
Request Body schema: application/json
required
Title (string) or Title (null) (Title)
Description (string) or Description (null) (Description)
SAMLConfig (object) or null
Slug (string) or Slug (null) (Slug)

Responses

Request samples

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

Response samples

Content type
application/json
null

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": [
    ]
}

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
required
file
required
string <binary> (File)

Responses

Response samples

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

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 <uuid> (Account Id)

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 <uuid> (Account Id)
stash_id
required
string (Stash Id)

Responses

Response samples

Content type
application/json
null

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
required
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
string (Title)
Description (string) or Description (null) (Description)
Email (string) or Email (null) (Email)
Zone (string) or Zone (null) (Zone)

Responses

Request samples

Content type
application/json
{
  • "slug": "string",
  • "title": "string",
  • "description": "string",
  • "email": "user@example.com",
  • "zone": "string"
}

Response samples

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

Authenticated User

Operations related to the currently authenticated user.

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
{
  • "id": "string",
  • "name": "string",
  • "email": "string",
  • "language": "CA",
  • "type": "ROOT",
  • "last_login": "2019-08-24T14:15:22Z",
  • "avatar": "string"
}

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

Modify User Profile

Set information about user

Request Body schema: application/json
required
Name (string) or Name (null) (Name)
Avatar (string) or Avatar (null) (Avatar)
Email (string) or Email (null) (Email)
Languages (string) or null

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "avatar": "string",
  • "email": "user@example.com",
  • "language": "CA"
}

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
{
  • "preferences": {
    },
  • "accounts": [
    ],
  • "create": true,
  • "can_be_deleted": true,
  • "dependant_accounts": [
    ]
}

Users

Management of users assigned to 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 <uuid> (User Id)

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "email": "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
required
Array of Add (objects) or Add (null) (Add)
Array of Delete (strings) or Delete (null) (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
[
  • {
    }
]

Zones

Management of zones.

List Zones

List available zones


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
[
  • {
    }
]

Invites

Manage inviting users to an account, list and invalidate invites

Delete Invite

Invalidate an invite to join an account


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_id
required
string <uuid> (Account Id)
email
required
string <email> (Email)

Responses

Response samples

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

Invited Users

List of users invited to an account, but not yet joined


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_id
required
string <uuid> (Account Id)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

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
required
email
required
string <email> (Email)
role
string (AccountRoles)
Enum: "AOWNER" "AMEMBER"

Responses

Request samples

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

Response samples

Content type
application/json
null