Knowledge Box & Zone REST API (v1)
API documentation for managing Knowledge Boxes, NUA keys, and API Keys within designated zones.
Get Knowledge Box
path Parameters
| account_id required | string <uuid> (Account Id) |
| kb_id required | string <uuid> (Kb Id) |
Responses
Response samples
- 200
- 422
{- "id": "string",
- "slug": "string",
- "account_id": "string",
- "zone": "string",
- "title": "string",
- "description": "string",
- "state": "PUBLISHED",
- "created": "2019-08-24T14:15:22Z",
- "admin": true,
- "contrib": true,
- "allowed_origins": [
- "string"
], - "allowed_ip_addresses": [
- "string"
], - "search_configs": { },
- "external_index_provider": "string"
}Modify Knowledge Box
Modifies an existing Knowledge Box.
path Parameters
| account_id required | string <uuid> (Account Id) |
| kb_id required | string <uuid> (Kb Id) |
Request Body schema: application/jsonrequired
Slug (string) or Slug (null) (Slug) | |
Title (string) or Title (null) (Title) | |
KbState (string) or null | |
Description (string) or Description (null) (Description) | |
Array of Allowed Origins (strings) or Allowed Origins (null) (Allowed Origins) | |
Array of Allowed Ip Addresses (strings) or Allowed Ip Addresses (null) (Allowed Ip Addresses) | |
Search Configs (object) or Search Configs (null) (Search Configs) |
Responses
Request samples
- Payload
{- "slug": "string",
- "title": "string",
- "state": "PUBLISHED",
- "description": "string",
- "allowed_origins": [
- "string"
], - "allowed_ip_addresses": [
- "string"
], - "search_configs": { }
}Response samples
- 200
- 422
{ }Create Ephemeral Token
Create an ephemeral token to access the Knowledge Box
path Parameters
| account_id required | string <uuid> (Account Id) |
| kb_id required | string <uuid> (Kb Id) |
Request Body schema: application/json
"ephemeral" (string) or Agent Session (string) or Agent Session (null) (Agent Session) | |
Ttl (integer) or Ttl (null) (Ttl) |
Responses
Request samples
- Payload
{- "agent_session": "ephemeral",
- "ttl": 0
}Response samples
- 201
- 422
{- "token": "string"
}List Knowledge Boxes
List all region Knowledge Boxes that belongs to an specific account that the authenticated user can see
path Parameters
| account_id required | string <uuid> (Account Id) |
query Parameters
| mode | string (Mode) Default: "kb" Enum: "kb" "agent" "agent_no_memory" "agents" Optional mode filter. 'kb' for standard KBs, 'agent' for agents with memory, 'agent_no_memory' for agents without memory, 'agents' for all agent types (agent + agent_no_memory). Defaults to 'kb'. |
Responses
Response samples
- 200
- 422
[- {
- "id": "string",
- "slug": "string",
- "zone": "string",
- "title": "string",
- "state": "PUBLISHED",
- "description": "string",
- "role_on_kb": "SOWNER",
- "allowed_origins": [
- "string"
], - "allowed_ip_addresses": [
- "string"
], - "search_configs": { },
- "external_index_provider": "string"
}
]Create Knowledge Box
Creates a new Knowledge Box. The accepted values for the learning_configuration are dynamic and may be dependant of the account used. Accepted field values needs to be checked on the 'Learning configuration schema' endpoint
path Parameters
| account_id required | string <uuid> (Account Id) |
Request Body schema: application/jsonrequired
| slug required | string (Slug) ^[a-z0-9_-]+$ |
| title required | string (Title) non-empty |
Description (string) or Description (null) (Description) | |
| mode | string (KBMode) Default: "kb" Enum: "kb" "agent" "agent_no_memory" Mode of the Knowledge Box (immutable after creation). 'kb': Standard KB with NucliaDB storage. 'agent': Agent with memory backed by NucliaDB. 'agent_no_memory': Agent without memory (no NucliaDB KB created). |
object (Learning Configuration) | |
Array of Allowed Origins (strings) or Allowed Origins (null) (Allowed Origins) | |
Array of Allowed Ip Addresses (strings) or Allowed Ip Addresses (null) (Allowed Ip Addresses) | |
DummyKBIndexProvider (object) or External index provider (null) (External index provider) External index provider configuration for the Knowledge Box. If not set, the default NucliaDB's index will be used. | |
object (Search Configs) Default: {} |
Responses
Request samples
- Payload
{- "slug": "string",
- "title": "string",
- "description": "string",
- "mode": "kb",
- "learning_configuration": { },
- "allowed_origins": [
- "string"
], - "allowed_ip_addresses": [
- "string"
], - "external_index_provider": {
- "type": "unset"
}, - "search_configs": { }
}Response samples
- 201
- 422
{- "id": "string"
}Create Ephemeral Token From Sa
Create an ephemeral token to access the Knowledge Box using a Service Account
Request Body schema: application/jsonrequired
"ephemeral" (string) or Agent Session (string) or Agent Session (null) (Agent Session) | |
Ttl (integer) or Ttl (null) (Ttl) |
Responses
Request samples
- Payload
{- "agent_session": "ephemeral",
- "ttl": 0
}Response samples
- 201
- 422
{- "token": "string"
}Users
List of users of a Knowledge Box
path Parameters
| account_id required | string <uuid> (Account Id) |
| kb_id required | string <uuid> (Kb Id) |
query Parameters
| include_user_detail | boolean (Include User Detail) Default: false |
Responses
Response samples
- 200
- 422
[- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "role": "SOWNER",
- "email": "string",
- "name": "string"
}
]Update Users
Assign or remove users from a Knowledge Box
path Parameters
| account_id required | string <uuid> (Account Id) |
| kb_id required | string <uuid> (Kb Id) |
Request Body schema: application/jsonrequired
Array of Add (objects) or Add (null) (Add) | |
Array of Update (objects) or Update (null) (Update) | |
Array of Delete (strings) or Delete (null) (Delete) |
Responses
Request samples
- Payload
{- "add": [
- {
- "id": "string",
- "role": "SOWNER"
}
], - "update": [
- {
- "id": "string",
- "role": "SOWNER"
}
], - "delete": [
- "string"
]
}Response samples
- 422
{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string",
- "input": null,
- "ctx": { }
}
]
}Invite To Knowledge Box
Send an invitation to join a Knowledge Box via email.
path Parameters
| account_id required | string <uuid> (Account Id) |
| kb_id required | string <uuid> (Kb Id) |
Request Body schema: application/jsonrequired
| email required | string <email> (Email) |
| role required | string (KbRole) Enum: "SOWNER" "SMEMBER" "SCONTRIBUTOR" |
Responses
Request samples
- Payload
{- "email": "user@example.com",
- "role": "SOWNER"
}Response samples
- 422
{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string",
- "input": null,
- "ctx": { }
}
]
}Delete Invite
Invalidate an invite to join a Knowledge Box
path Parameters
| account_id required | string <uuid> (Account Id) |
| kb_id required | string <uuid> (Kb Id) |
query Parameters
| email required | string <email> (Email) |
Responses
Response samples
- 422
{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string",
- "input": null,
- "ctx": { }
}
]
}Invited Users
List of users invited to a Knowledge Box, but not yet joined
path Parameters
| account_id required | string <uuid> (Account Id) |
| kb_id required | string <uuid> (Kb Id) |
Responses
Response samples
- 200
- 422
[- {
- "email": "string",
- "role": "SOWNER",
- "expires": "2019-08-24T14:15:22Z"
}
]Delete Service Account
Delete a new Service Account for a Knowledge Box
path Parameters
| account_id required | string <uuid> (Account Id) |
| kb_id required | string <uuid> (Kb Id) |
| sa_id required | string <uuid> (Sa Id) |
Responses
Response samples
- 422
{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string",
- "input": null,
- "ctx": { }
}
]
}Delete Api Key
Delete an API Key of a Knowledge Box
path Parameters
| account_id required | string <uuid> (Account Id) |
| kb_id required | string <uuid> (Kb Id) |
| sa_id required | string <uuid> (Sa Id) |
| sa_key_id required | string <uuid> (Sa Key Id) |
Responses
Response samples
- 422
{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string",
- "input": null,
- "ctx": { }
}
]
}Add Service Account Key
Create an API Key for a Service Account of a Knowledge Box
path Parameters
| account_id required | string <uuid> (Account Id) |
| kb_id required | string <uuid> (Kb Id) |
| sa_id required | string <uuid> (Sa Id) |
Request Body schema: application/jsonrequired
| expires required | string <date-time> (Expires) |
Responses
Request samples
- Payload
{- "expires": "2019-08-24T14:15:22Z"
}Response samples
- 201
- 422
{- "id": "string",
- "token": "string"
}List Service Accounts
List of Service Accounts of a Knowledge Box
path Parameters
| account_id required | string <uuid> (Account Id) |
| kb_id required | string <uuid> (Kb Id) |
Responses
Response samples
- 200
- 422
[- {
- "id": "string",
- "title": "string",
- "role": "SOWNER",
- "keys": [
- {
- "id": "string",
- "created": "2019-08-24T14:15:22Z",
- "expires": "2019-08-24T14:15:22Z"
}
]
}
]Add Service Account
Create a new Service Account for a Knowledge Box
path Parameters
| account_id required | string <uuid> (Account Id) |
| kb_id required | string <uuid> (Kb Id) |
Request Body schema: application/jsonrequired
| title required | string (Title) non-empty |
| role required | string (KbRole) Enum: "SOWNER" "SMEMBER" "SCONTRIBUTOR" |
Responses
Request samples
- Payload
{- "title": "string",
- "role": "SOWNER"
}Response samples
- 201
- 422
{- "id": "string"
}Create Temporal Agent Key
Creates a temporal key to use an agent session
Request Body schema: application/jsonrequired
| agent_session required | string (Agent Session) |
| ttl | integer (Ttl) [ 1 .. 10 ] Default: 10 |
Responses
Request samples
- Payload
{- "agent_session": "string",
- "ttl": 10
}Response samples
- 201
- 422
{- "token": "string"
}Create Temporal Secure Token
Creates a temporal key for a service account.
The key accepts
Request Body schema: application/json
| ttl | integer (Ttl) [ 1 .. 10 ] Default: 10 |
Array of Security Groups (strings) or Security Groups (null) (Security Groups) |
Responses
Request samples
- Payload
{- "ttl": 10,
- "security_groups": [
- "string"
]
}Response samples
- 201
- 422
{- "token": "string"
}Delete Nua Client By Id
Deletes an existing Nuclia Understanding API client
path Parameters
| account_id required | string <uuid> (Account Id) |
| client_id required | string (Client Id) ^[a-z0-9_-]+$ |
Responses
Response samples
- 422
{- "detail": [
- {
- "loc": [
- "string"
], - "msg": "string",
- "type": "string",
- "input": null,
- "ctx": { }
}
]
}Get Nua Client By Id
Gets the metadata of an existing Nuclia Understanding API
path Parameters
| account_id required | string <uuid> (Account Id) |
| client_id required | string (Client Id) ^[a-z0-9_-]+$ |
Responses
Response samples
- 200
- 422
{- "title": "string",
- "description": "",
- "contact": "string",
- "created": "2019-08-24T14:15:22Z",
- "partitions": 0,
- "client_id": "string",
- "account_id": "string",
- "processing_webhook": {
- "uri": "string",
- "headers": { }
}
}Set Account Nua Client Key
Recreates a new session key for an existing Nuclia Understanding API client
path Parameters
| account_id required | string <uuid> (Account Id) |
| client_id required | string (Client Id) ^[a-z0-9_-]+$ |
Responses
Response samples
- 201
- 422
{- "token": "string",
- "client_id": "string"
}Get Account Nua Clients
Gets the list of Nuclia Understanding API clients of an account
path Parameters
| account_id required | string <uuid> (Account Id) |
query Parameters
Client Id (string) or Client Id (null) (Client Id) |
Responses
Response samples
- 200
- 422
{- "clients": [
- {
- "title": "string",
- "description": "",
- "contact": "string",
- "created": "2019-08-24T14:15:22Z",
- "partitions": 0,
- "client_id": "string",
- "account_id": "string",
- "processing_webhook": {
- "uri": "string",
- "headers": { }
}
}
]
}Create Account Nua Client
Create a new Nuclia Understanding API client for an account
path Parameters
| account_id required | string <uuid> (Account Id) |
Request Body schema: application/jsonrequired
| contact required | string (Contact) |
| title required | string (Title) non-empty |
Description (string) or Description (null) (Description) Default: "" | |
Client Id (string) or Client Id (null) (Client Id) | |
ProcessingWebhook (object) or null | |
| allow_kb_management | boolean (Allow Kb Management) Default: false |
Responses
Request samples
- Payload
{- "contact": "string",
- "title": "string",
- "description": "",
- "client_id": "string",
- "processing_webhook": {
- "uri": "string",
- "headers": { }
}, - "allow_kb_management": false
}Response samples
- 201
- 422
{- "token": "string",
- "client_id": "string"
}Get Download Status
Get the status of a download request by Knowledgebox ID and request ID
path Parameters
| kb_id required | string (Kb Id) |
| request_id required | string <uuid1> (Request Id) |
Responses
Response samples
- 200
- 422
{- "request_id": "string",
- "download_type": "query",
- "download_format": "ndjson",
- "event_type": "visited",
- "requested_at": "2019-08-24T14:15:22Z",
- "kb_id": "string",
- "download_url": "string"
}Activity Logs Metrics
Get metrics for search and ask logs
path Parameters
| kb_id required | string (Kb Id) |
query Parameters
| aggregation | string (Aggregation) Default: "millennium" Enum: "hour" "day" "week" "month" "quarter" "year" "millennium" |
| from required | string <date-time> (From) |
To (string) or To (null) (To) Default: "2026-02-27T09:26:54.588433" |
Responses
Response samples
- 200
- 422
[- {
- "timestamp": "2019-08-24T14:15:22Z",
- "search": 0,
- "chat": 0,
- "ask": 0
}
]Get Knowledgebox Activity Downloads List
Get the list of monthly activity audit files available to download
path Parameters
| kb_id required | string (Kb Id) |
| event_type required | string (EventType) Enum: "visited" "modified" "deleted" "new" "search" "suggest" "indexed" "chat" "ask" "retrieve" "augment" "started" "stopped" "processed" |
Responses
Response samples
- 200
- 422
{- "downloads": [
- "string"
]
}Query Knowledgebox Activity Logs
Query Knowledgebox Activity Logs
path Parameters
| kb_id required | string (Kb Id) |
| event_type required | string (EventType) Enum: "visited" "modified" "deleted" "new" "search" "suggest" "indexed" "chat" "ask" "retrieve" "augment" "started" "stopped" "processed" |
Request Body schema: application/jsonrequired
object (Pagination) Default: {"limit":10} | |
| year_month required | string (Year Month) |
Array of Show (strings) or "all" (string) (Show) Default: ["id","date"] | |
required | object (QueryFiltersCommon) |
Responses
Request samples
- Payload
{- "pagination": {
- "limit": 10,
- "starting_after": 0,
- "ending_before": 0
}, - "year_month": "string",
- "show": [
- "id",
- "date"
], - "filters": {
- "id": {
- "eq": 0,
- "gt": 0,
- "ge": 0,
- "lt": 0,
- "le": 0,
- "ne": 0,
- "isnull": true
}, - "user_id": {
- "eq": "string",
- "gt": "string",
- "ge": "string",
- "lt": "string",
- "le": "string",
- "ne": "string",
- "isnull": true
}, - "user_type": {
- "eq": "user",
- "gt": "user",
- "ge": "user",
- "lt": "user",
- "le": "user",
- "ne": "user",
- "isnull": true
}, - "client_type": {
- "eq": "api",
- "gt": "api",
- "ge": "api",
- "lt": "api",
- "le": "api",
- "ne": "api",
- "isnull": true
}, - "total_duration": {
- "eq": 0,
- "gt": 0,
- "ge": 0,
- "lt": 0,
- "le": 0,
- "ne": 0,
- "isnull": true
}, - "audit_metadata": [
- {
- "eq": "string",
- "gt": "string",
- "ge": "string",
- "lt": "string",
- "le": "string",
- "ne": "string",
- "isnull": true,
- "like": "string",
- "ilike": "string",
- "key": "string"
}
], - "nuclia_tokens": {
- "eq": 0,
- "gt": 0,
- "ge": 0,
- "lt": 0,
- "le": 0,
- "ne": 0,
- "isnull": true
}
}
}Response samples
- 200
- 422
"{\"question\":null,\"id\":0,\"date\":null,\"user_id\":null,\"user_type\":null,\"client_type\":null,\"total_duration\":null,\"audit_metadata\":null,\"resource_id\":null,\"nuclia_tokens\":null,\"token_details\":null,\"rephrased_question\":null,\"answer\":null,\"learning_id\":null,\"retrieved_context\":null,\"chat_history\":null,\"feedback_good\":null,\"feedback_comment\":null,\"feedback_good_all\":null,\"feedback_good_any\":null,\"feedback\":null,\"model\":null,\"rag_strategies_names\":null,\"rag_strategies\":null,\"status\":null,\"generative_answer_first_chunk_time\":null,\"generative_reasoning_first_chunk_time\":null,\"generative_answer_time\":null,\"remi_scores\":null,\"user_request\":null,\"reasoning\":null,\"resources_count\":null,\"filter\":null,\"retrieval_rephrased_question\":null,\"vectorset\":null,\"security\":null,\"min_score_bm25\":null,\"min_score_semantic\":null,\"result_per_page\":null,\"retrieval_time\":null}\n"Request The Preparation Of Knowledgebox Activity Logs Download
Request Knowledgebox Activity Logs download
path Parameters
| kb_id required | string (Kb Id) |
| event_type required | string (EventType) Enum: "visited" "modified" "deleted" "new" "search" "suggest" "indexed" "chat" "ask" "retrieve" "augment" "started" "stopped" "processed" |
header Parameters
| accept required | string (Accept) Enum: "application/x-ndjson" "text/csv" |
Request Body schema: application/jsonrequired
| year_month required | string (Year Month) |
Array of Show (strings) or "all" (string) (Show) Default: ["id","date"] | |
required | object (QueryFiltersCommon) |
Email Address (string) or Email Address (null) (Email Address) | |
| notify_via_email | boolean (Notify Via Email) Default: false |
Responses
Request samples
- Payload
{- "year_month": "string",
- "show": [
- "id",
- "date"
], - "filters": {
- "id": {
- "eq": 0,
- "gt": 0,
- "ge": 0,
- "lt": 0,
- "le": 0,
- "ne": 0,
- "isnull": true
}, - "user_id": {
- "eq": "string",
- "gt": "string",
- "ge": "string",
- "lt": "string",
- "le": "string",
- "ne": "string",
- "isnull": true
}, - "user_type": {
- "eq": "user",
- "gt": "user",
- "ge": "user",
- "lt": "user",
- "le": "user",
- "ne": "user",
- "isnull": true
}, - "client_type": {
- "eq": "api",
- "gt": "api",
- "ge": "api",
- "lt": "api",
- "le": "api",
- "ne": "api",
- "isnull": true
}, - "total_duration": {
- "eq": 0,
- "gt": 0,
- "ge": 0,
- "lt": 0,
- "le": 0,
- "ne": 0,
- "isnull": true
}, - "audit_metadata": [
- {
- "eq": "string",
- "gt": "string",
- "ge": "string",
- "lt": "string",
- "le": "string",
- "ne": "string",
- "isnull": true,
- "like": "string",
- "ilike": "string",
- "key": "string"
}
], - "nuclia_tokens": {
- "eq": 0,
- "gt": 0,
- "ge": 0,
- "lt": 0,
- "le": 0,
- "ne": 0,
- "isnull": true
}
}, - "email_address": "user@example.com",
- "notify_via_email": false
}Response samples
- 202
- 422
{- "request_id": "string",
- "download_type": "query",
- "download_format": "ndjson",
- "event_type": "visited",
- "requested_at": "2019-08-24T14:15:22Z",
- "kb_id": "string",
- "download_url": "string"
}Query Rag Requests By Scores
Get a list of rag request that matches a remi scores query
path Parameters
| kb_uuid required | string (Kb Uuid) |
Request Body schema: application/jsonrequired
ContextRelevanceQuery (object) or null | |
| month required | string (Month) |
Feedback Good (boolean) or Feedback Good (null) (Feedback Good) | |
Status (string) or null | |
object (Pagination) Default: {"limit":10} |
Responses
Request samples
- Payload
{- "context_relevance": {
- "value": 0,
- "operation": "gt",
- "aggregation": "average"
}, - "month": "string",
- "feedback_good": true,
- "status": "SUCCESS",
- "pagination": {
- "limit": 10,
- "starting_after": 0,
- "ending_before": 0
}
}Response samples
- 200
- 422
{- "data": [
- {
- "id": 0,
- "question": "string",
- "answer": "string",
- "remi": {
- "answer_relevance": {
- "score": 0,
- "reason": "string"
}, - "context_relevance": [
- 0
], - "groundedness": [
- 0
]
}
}
], - "has_more": true
}Aggregated Remi Scores Across Time
Get the evolution of remi scores of a kb on a period of time
path Parameters
| kb_uuid required | string (Kb Uuid) |
query Parameters
| aggregation | string (Aggregation) Default: "millennium" Enum: "hour" "day" "week" "month" "quarter" "year" "millennium" |
| from required | string <date-time> (From) |
To (string) or To (null) (To) Default: "2026-02-27T09:26:54.594276" |
Responses
Response samples
- 200
- 422
[- {
- "timestamp": "2019-08-24T14:15:22Z",
- "metrics": [
- {
- "name": "string",
- "min": 0,
- "max": 0,
- "average": 0
}
]
}
]Restore
Restore a backup into a new knowledgebox
path Parameters
| account_id required | string (Account Id) |
| backup_id required | string (Backup Id) |
Request Body schema: application/jsonrequired
| slug required | string (Slug) ^[a-z0-9_-]+$ The slug of the new restored knowledgebox. |
| title required | string (Title) The title of the new restored knowledgebox. |
Responses
Request samples
- Payload
{- "slug": "string",
- "title": "string"
}Response samples
- 201
- 422
{- "id": "string"
}Create
Create knowledgebox backup
path Parameters
| account_id required | string (Account Id) |
Request Body schema: application/jsonrequired
| kb_id required | string <uuid4> (Kb Id) The unique identifier of the knowledgebox to backup. |
Responses
Request samples
- Payload
{- "kb_id": "string"
}Response samples
- 201
- 422
{- "id": "string"
}List
Get all backups from an account in a region
path Parameters
| account_id required | string (Account Id) |
Responses
Response samples
- 200
- 422
[- {
- "id": "string",
- "account_id": "string",
- "started_at": "2019-08-24T14:15:22Z",
- "kb_data": {
- "id": "string",
- "slug": "string",
- "title": "string",
- "created": "2019-08-24T14:15:22Z"
}, - "finished_at": "2019-08-24T14:15:22Z",
- "size": 0
}
]Get External Connection
path Parameters
| kb_id required | string <uuid> (Kb Id) |
| connection_id required | string <uuid> (Connection Id) |
Responses
Response samples
- 200
- 422
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "kb_id": "999c0e19-1947-4a4f-b165-815dc3353cfe",
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "provider": "google_oauth",
- "capabilities": {
- "has_sites": false,
- "requires_site_search": false,
- "requires_site_url_resolution": false
}
}Browse Storage
Browse cloud storage to discover sites, drives and folders.
Use this endpoint to help users select a drive and folder path when creating a sync configuration.
SharePoint/OneDrive flow (OAuth):
- Resolve site URL: use the
/resolve_siteendpoint with a site URL → getsite_id - List drives in a site: provide
site_id→ returns drives for that site- Use
site_id=mefor personal OneDrive (OAuth only)
- Use
- List folders in a drive: provide
drive_id→ returns folders at root - Navigate folders: provide
drive_idandpath→ returns subfolders
SharePoint flow (certificate auth):
- List sites: no parameters → returns all sites (max 50)
- Or use
site_searchto search for specific sites
- Or use
- List drives in a site: provide
site_id→ returns drives for that site - List folders in a drive: provide
drive_id→ returns folders at root - Navigate folders: provide
drive_idandpath→ returns subfolders
Google Drive flow:
- List drives: no parameters → returns My Drive and Shared Drives
- List folders: provide
drive_idand optionallypath
AWS S3 flow:
- List buckets: no parameters → returns available buckets
- List folders: provide
drive_id(bucket name) and optionallypath(prefix)
ShareFile flow:
- List roots: no parameters → returns root folders
- List folders: provide
drive_idand optionallypath
Dropbox flow:
- List root folders: no parameters → returns folders at the Dropbox root
- Navigate folders: provide
path(e.g./Documents) → returns subfolders
- Dropbox does not have drives. Do not pass
drive_id.
Parameter validation:
site_searchcannot be combined withsite_id,drive_id, orpathsite_searchis only supported for certificate auth connections (not OAuth)site_idis only valid for SharePoint/Azure connections- SharePoint OAuth connections require
site_idto browse (use/resolve_siteto get it) - When
drive_idis provided,site_idis ignored (drive_id is sufficient)
path Parameters
| kb_id required | string <uuid> (Kb Id) |
| connection_id required | string <uuid> (Connection Id) |
query Parameters
Site Search (string) or Site Search (null) (Site Search) Search query for SharePoint sites. Only supported for certificate auth connections. For OAuth, use the /resolve_site endpoint instead. | |
Site Id (string) or Site Id (null) (Site Id) Site ID to list drives for. Use 'me' for personal OneDrive (OAuth only). | |
Drive Id (string) or Drive Id (null) (Drive Id) Drive ID to browse folders in. | |
Path (string) or Path (null) (Path) Folder path to list within the drive. | |
Page Token (string) or Page Token (null) (Page Token) Pagination token |
Responses
Response samples
- 200
- 422
{- "sites": [
- {
- "id": "string",
- "name": "string",
- "web_url": "string"
}
], - "drives": [
- {
- "id": "string",
- "name": "string",
- "drive_type": "string",
- "web_url": "string"
}
], - "folders": [
- {
- "id": "string",
- "name": "string",
- "path": "string",
- "web_url": "string"
}
], - "next_page_token": "string"
}Resolve Site
Resolve a SharePoint site URL to its site ID.
Given a full SharePoint site URL, this endpoint returns the site ID,
name, and web URL. The returned site ID can then be used with the
/browse endpoint to list drives for that site.
This endpoint works with the Sites.Selected permission scope, as long as the specific site has been granted access to the application.
Usage flow:
- Call this endpoint with a site URL → get
site_id - Call
/browse?site_id={site_id}→ get drives - Call
/browse?drive_id={drive_id}→ get folders
path Parameters
| kb_id required | string <uuid> (Kb Id) |
| connection_id required | string <uuid> (Connection Id) |
query Parameters
| site_url required | string (Site Url) Full SharePoint site URL to resolve. Example: https://contoso.sharepoint.com/sites/TeamSite |
Responses
Response samples
- 200
- 422
{- "id": "string",
- "name": "string",
- "web_url": "string"
}Response samples
- 200
- 422
[- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "kb_id": "999c0e19-1947-4a4f-b165-815dc3353cfe",
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "provider": "google_oauth",
- "capabilities": {
- "has_sites": false,
- "requires_site_search": false,
- "requires_site_url_resolution": false
}
}
]Create External Connection
Create an external connection for cloud storage sync.
For OAuth providers (google_oauth, azure_oauth, sharefile_oauth):
- Only
provideris required in the request body - Returns an
authorize_urlthat the user should visit to complete the OAuth flow - After successful authorization, an ExternalConnection will be created
- Returns HTTP 200
For aws_s3_assume_role:
- Both
providerandcredentialsare required in the request body - Returns the created ExternalConnection directly
- Returns HTTP 201
path Parameters
| kb_id required | string <uuid> (Kb Id) |
Request Body schema: application/jsonrequired
| provider required | string (Provider) Enum: "google_oauth" "azure_oauth" "azure_certificate_credentials" "aws_s3_assume_role" "sharefile_oauth" "dropbox_oauth" |
AWSS3AssumeRoleCredentials (object) or AzureCertificateCredentials (object) or Credentials (null) (Credentials) |
Responses
Request samples
- Payload
{- "provider": "google_oauth",
- "credentials": {
- "role_arn": "string",
- "external_id": "string"
}
}Response samples
- 200
- 201
- 422
{- "authorize_url": "string"
}Get S3 Assume Role Info
Returns the AWS assume-role information that a client needs to create an IAM role in their own AWS account for cross-account S3 access. The client should use the returned external_id, role_name, and aws_account_id to configure the IAM role trust policy.
path Parameters
| kb_id required | string <uuid> (Kb Id) |
Responses
Response samples
- 200
- 422
{- "external_id": "string",
- "role_name": "string",
- "aws_account_id": "string"
}Get Config
path Parameters
| kb_id required | string <uuid> (Kb Id) |
| config_id required | string <uuid> (Config Id) |
Responses
Response samples
- 200
- 422
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "kb_id": "999c0e19-1947-4a4f-b165-815dc3353cfe",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "sync_root_path": "string",
- "sync_interval_minutes": 0,
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "external_connection": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "kb_id": "999c0e19-1947-4a4f-b165-815dc3353cfe",
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "provider": "google_oauth",
- "capabilities": {
- "has_sites": false,
- "requires_site_search": false,
- "requires_site_url_resolution": false
}
}, - "drive_id": "string",
- "last_sync_run": "2019-08-24T14:15:22Z"
}Validate Resources
Validate that the user has read access to the specified resources.
This endpoint checks if the provided credentials have access to the files/items specified in the request. The provider is determined from the sync config. Credentials must be encrypted using the same encryption key used for external connections.
Args: kb_id: The knowledge base ID. config_id: The sync config ID (determines the provider). item: The validation input containing encrypted credentials and resources to validate.
Returns: ResourceValidationOutput with lists of valid and invalid resources.
path Parameters
| kb_id required | string <uuid> (Kb Id) |
| config_id required | string <uuid> (Config Id) |
Request Body schema: application/jsonrequired
required | object (Credentials) |
required | Array of GoogleDriveResourceIdentifier (object) or SharePointResourceIdentifier (object) or S3ResourceIdentifier (object) or ShareFileResourceIdentifier (object) or DropboxResourceIdentifier (object) (Resources) |
Responses
Request samples
- Payload
{- "credentials": { },
- "resources": [
- {
- "file_id": "string"
}
]
}Response samples
- 200
- 422
{- "valid_resources": [
- {
- "file_id": "string"
}
], - "invalid_resources": [
- {
- "resource": {
- "file_id": "string"
}, - "reason": "string"
}
]
}Response samples
- 200
- 422
[- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "kb_id": "999c0e19-1947-4a4f-b165-815dc3353cfe",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "sync_root_path": "string",
- "sync_interval_minutes": 0,
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "external_connection": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "kb_id": "999c0e19-1947-4a4f-b165-815dc3353cfe",
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "provider": "google_oauth",
- "capabilities": {
- "has_sites": false,
- "requires_site_search": false,
- "requires_site_url_resolution": false
}
}, - "drive_id": "string",
- "last_sync_run": "2019-08-24T14:15:22Z"
}
]Add Config
path Parameters
| kb_id required | string <uuid> (Kb Id) |
Request Body schema: application/jsonrequired
| name required | string (Name) |
| sync_root_path required | string (Sync Root Path) |
| external_connection_id required | string <uuid> (External Connection Id) |
Drive Id (string) or Drive Id (null) (Drive Id) |
Responses
Request samples
- Payload
{- "name": "string",
- "sync_root_path": "string",
- "external_connection_id": "02487ec4-86a5-4d8b-a68d-9ad194251584",
- "drive_id": "string"
}Response samples
- 201
- 422
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "kb_id": "999c0e19-1947-4a4f-b165-815dc3353cfe",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "sync_root_path": "string",
- "sync_interval_minutes": 0,
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "external_connection": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "kb_id": "999c0e19-1947-4a4f-b165-815dc3353cfe",
- "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z",
- "provider": "google_oauth",
- "capabilities": {
- "has_sites": false,
- "requires_site_search": false,
- "requires_site_url_resolution": false
}
}, - "drive_id": "string",
- "last_sync_run": "2019-08-24T14:15:22Z"
}List Jobs
List sync jobs for a sync config with cursor-based pagination.
Use the next_cursor from the response to fetch the next page of results.
path Parameters
| kb_id required | string <uuid> (Kb Id) |
| config_id required | string <uuid> (Config Id) |
query Parameters
| limit | integer (Limit) [ 1 .. 100 ] Default: 20 Maximum number of jobs to return (1-100) |
Cursor (string) or Cursor (null) (Cursor) Pagination cursor from previous response to fetch next page | |
| order | string (SortOrder) Default: "desc" Enum: "asc" "desc" Sort order by creation time: 'desc' (newest first) or 'asc' (oldest first) |
Responses
Response samples
- 200
- 422
{- "items": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "finished_at": "2019-08-24T14:15:22Z",
- "config_id": "d1d31429-d888-4f1c-b9c1-4e842f9bce5b",
- "status": "pending",
- "options": {
- "full_sync": false
}
}
], - "next_cursor": "string"
}Trigger Sync
Trigger an immediate sync for a sync config.
Creates a new pending sync job that will be processed by the sync job runner. Returns 409 Conflict if there's already an active (pending or in-progress) job for the specified config.
Args: data: Optional input. Set options.full_sync=True to ignore incremental sync state and perform a full re-sync. Note: S3 and ShareFile providers always perform full syncs as they don't support delta tracking.
path Parameters
| kb_id required | string <uuid> (Kb Id) |
| config_id required | string <uuid> (Config Id) |
Request Body schema: application/json
| full_sync | boolean (Full Sync) Default: false If True, ignore incremental sync state and perform a full sync. Note: S3 and ShareFile providers always perform full syncs as they don't support delta tracking. |
Responses
Request samples
- Payload
{- "full_sync": false
}Response samples
- 201
- 422
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "created_at": "2019-08-24T14:15:22Z",
- "finished_at": "2019-08-24T14:15:22Z",
- "config_id": "d1d31429-d888-4f1c-b9c1-4e842f9bce5b",
- "status": "pending",
- "options": {
- "full_sync": false
}
}Get Job Logs
Get logs for a sync job with cursor-based pagination.
Use the next_cursor from the response to fetch the next page of results.
Supports optional filtering by:
level: Log level (DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL)start_date/end_date: Timestamp range
path Parameters
| kb_id required | string <uuid> (Kb Id) |
| job_id required | string <uuid> (Job Id) |
query Parameters
| limit | integer (Limit) [ 1 .. 500 ] Default: 50 Maximum number of log entries to return (1-500) |
Cursor (integer) or Cursor (null) (Cursor) ID-based cursor from previous response to fetch next page (logs with id < cursor) | |
LogLevel (string) or Level (null) (Level) Filter by log level | |
Start Date (string) or Start Date (null) (Start Date) Filter logs with timestamp >= start_date (ISO 8601 format) | |
End Date (string) or End Date (null) (End Date) Filter logs with timestamp <= end_date (ISO 8601 format) | |
| order | string (SortOrder) Default: "desc" Enum: "asc" "desc" Sort order by ID: 'desc' (newest first) or 'asc' (oldest first) |
Responses
Response samples
- 200
- 422
{- "items": [
- {
- "id": 0,
- "timestamp": "2019-08-24T14:15:22Z",
- "level": "string",
- "message": "string",
- "extra": { }
}
], - "next_cursor": 0
}