Knowledge Bases

Get Knowledge Bases

get

List all available knowledge bases for the specified flow.

Authorizations
Query parameters
cursorany ofOptional

Optional identifier for the page that should be returned. If it is not provided, the first page will be returned.

Example: ZXhhbXBsZV9jdXJzb3I=
stringOptional
or
nullOptional
page_sizeinteger · min: 1 · max: 1000Optional

Number of items to be returned in the page.

Default: 50
directionstring · enumOptional

Direction for pagination: 'next' to advance through pages (older items), 'prev' to go back (newer items)

Default: nextPossible values:
Responses
chevron-right
200

Successful Response

application/json

Knowledge base response payload for public API endpoints.

knowledge_base_idstring · uuidRequired
connection_idany ofRequired
string · uuidOptional
or
nullOptional
created_atstring · date-timeRequired
updated_atstring · date-timeRequired
connection_source_idsstring[]Required
connection_provider_typeany ofOptional
stringOptional
or
nullOptional
is_emptybooleanOptionalDefault: true
total_sizeintegerOptional

Total size of all the files in the KB in bytes

Default: 0
total_filesintegerOptional

Total number of files in the KB

Default: 0
total_indexed_filesintegerOptional

Total number of indexed files in the KB

Default: 0
total_error_filesintegerOptional

Total number of error files in the KB

Default: 0
last_synced_atany ofOptional

Timestamp when the knowledge base was last successfully synced from its source

string · date-timeOptional
or
nullOptional
namestring · min: 1 · max: 2048OptionalDefault: Unnamed Knowledge Base
descriptionstring · max: 2048OptionalDefault: ""
org_idstringRequired
roleany ofOptional
string · enumOptional

Enumerates all the possible roles for a user in a knowledge base.

Attributes

  • ADMIN: Admin permissions allow full control over the knowledge base, including deletion.
  • EDITOR: Editor permissions allow the user to modify the knowledge base, but not delete it.
  • VIEWER: Viewer permissions allow the user to view the knowledge base, but not modify it.
Possible values:
or
nullOptional
org_level_roleany ofOptional
string · enumOptional

Enumerates all the possible roles for a user in a knowledge base.

Attributes

  • ADMIN: Admin permissions allow full control over the knowledge base, including deletion.
  • EDITOR: Editor permissions allow the user to modify the knowledge base, but not delete it.
  • VIEWER: Viewer permissions allow the user to view the knowledge base, but not modify it.
Possible values:
or
nullOptional
user_metadata_schemaany ofOptional
or
nullOptional
dataloader_metadata_schemaany ofOptional
or
nullOptional
get
/v1/knowledge-bases

Create Knowledge Base

post

Create a new knowledge base.

Authorizations
Body

Model for FastAPI endpoints.

connection_idany ofOptional
string · uuidOptional
or
nullOptional
connection_source_idsstring[]Optional
namestring · min: 1 · max: 2048OptionalDefault: Unnamed Knowledge Base
descriptionstring · max: 2048OptionalDefault: ""
org_level_roleany ofOptional
string · enumOptional

Enumerates all the possible roles for a user in a knowledge base.

Attributes

  • ADMIN: Admin permissions allow full control over the knowledge base, including deletion.
  • EDITOR: Editor permissions allow the user to modify the knowledge base, but not delete it.
  • VIEWER: Viewer permissions allow the user to view the knowledge base, but not modify it.
Possible values:
or
nullOptional
Responses
post
/v1/knowledge-bases

Get Knowledge Base By Id

get

Get a knowledge base by its ID in the current organization.

Authorizations
Path parameters
knowledge_base_idstring · uuidRequired
Responses
chevron-right
200

Successful Response

application/json

Knowledge base response payload for public API endpoints.

knowledge_base_idstring · uuidRequired
connection_idany ofRequired
string · uuidOptional
or
nullOptional
created_atstring · date-timeRequired
updated_atstring · date-timeRequired
connection_source_idsstring[]Required
connection_provider_typeany ofOptional
stringOptional
or
nullOptional
is_emptybooleanOptionalDefault: true
total_sizeintegerOptional

Total size of all the files in the KB in bytes

Default: 0
total_filesintegerOptional

Total number of files in the KB

Default: 0
total_indexed_filesintegerOptional

Total number of indexed files in the KB

Default: 0
total_error_filesintegerOptional

Total number of error files in the KB

Default: 0
last_synced_atany ofOptional

Timestamp when the knowledge base was last successfully synced from its source

string · date-timeOptional
or
nullOptional
namestring · min: 1 · max: 2048OptionalDefault: Unnamed Knowledge Base
descriptionstring · max: 2048OptionalDefault: ""
org_idstringRequired
roleany ofOptional
string · enumOptional

Enumerates all the possible roles for a user in a knowledge base.

Attributes

  • ADMIN: Admin permissions allow full control over the knowledge base, including deletion.
  • EDITOR: Editor permissions allow the user to modify the knowledge base, but not delete it.
  • VIEWER: Viewer permissions allow the user to view the knowledge base, but not modify it.
Possible values:
or
nullOptional
org_level_roleany ofOptional
string · enumOptional

Enumerates all the possible roles for a user in a knowledge base.

Attributes

  • ADMIN: Admin permissions allow full control over the knowledge base, including deletion.
  • EDITOR: Editor permissions allow the user to modify the knowledge base, but not delete it.
  • VIEWER: Viewer permissions allow the user to view the knowledge base, but not modify it.
Possible values:
or
nullOptional
user_metadata_schemaany ofOptional
or
nullOptional
dataloader_metadata_schemaany ofOptional
or
nullOptional
get
/v1/knowledge-bases/{knowledge_base_id}

Delete Kowledge Base

delete

Delete a knowledge base by its ID.

Authorizations
Path parameters
knowledge_base_idstring · uuidRequired
Responses
delete
/v1/knowledge-bases/{knowledge_base_id}

No content

Update Knowledge Base

patch

Update a knowledge base.

Authorizations
Path parameters
knowledge_base_idstring · uuidRequired
Body

Request model to update a knowledge base.

connection_idany ofOptional
string · uuidOptional
or
nullOptional
connection_source_idsstring[]Optional
namestring · min: 1 · max: 2048OptionalDefault: Unnamed Knowledge Base
descriptionstring · max: 2048OptionalDefault: ""
indexing_paramsany ofOptional
or
nullOptional
org_level_roleany ofOptional
string · enumOptional

Enumerates all the possible roles for a user in a knowledge base.

Attributes

  • ADMIN: Admin permissions allow full control over the knowledge base, including deletion.
  • EDITOR: Editor permissions allow the user to modify the knowledge base, but not delete it.
  • VIEWER: Viewer permissions allow the user to view the knowledge base, but not modify it.
Possible values:
or
nullOptional
Responses
chevron-right
200

Successful Response

application/json

Knowledge base response payload for public API endpoints.

knowledge_base_idstring · uuidRequired
connection_idany ofRequired
string · uuidOptional
or
nullOptional
created_atstring · date-timeRequired
updated_atstring · date-timeRequired
connection_source_idsstring[]Required
connection_provider_typeany ofOptional
stringOptional
or
nullOptional
is_emptybooleanOptionalDefault: true
total_sizeintegerOptional

Total size of all the files in the KB in bytes

Default: 0
total_filesintegerOptional

Total number of files in the KB

Default: 0
total_indexed_filesintegerOptional

Total number of indexed files in the KB

Default: 0
total_error_filesintegerOptional

Total number of error files in the KB

Default: 0
last_synced_atany ofOptional

Timestamp when the knowledge base was last successfully synced from its source

string · date-timeOptional
or
nullOptional
namestring · min: 1 · max: 2048OptionalDefault: Unnamed Knowledge Base
descriptionstring · max: 2048OptionalDefault: ""
org_idstringRequired
roleany ofOptional
string · enumOptional

Enumerates all the possible roles for a user in a knowledge base.

Attributes

  • ADMIN: Admin permissions allow full control over the knowledge base, including deletion.
  • EDITOR: Editor permissions allow the user to modify the knowledge base, but not delete it.
  • VIEWER: Viewer permissions allow the user to view the knowledge base, but not modify it.
Possible values:
or
nullOptional
org_level_roleany ofOptional
string · enumOptional

Enumerates all the possible roles for a user in a knowledge base.

Attributes

  • ADMIN: Admin permissions allow full control over the knowledge base, including deletion.
  • EDITOR: Editor permissions allow the user to modify the knowledge base, but not delete it.
  • VIEWER: Viewer permissions allow the user to view the knowledge base, but not modify it.
Possible values:
or
nullOptional
user_metadata_schemaany ofOptional
or
nullOptional
dataloader_metadata_schemaany ofOptional
or
nullOptional
patch
/v1/knowledge-bases/{knowledge_base_id}

List Resources

get

List files in the knowledge base with optional cursor pagination.

Authorizations
Path parameters
knowledge_base_idstring · uuidRequired
Query parameters
cursorany ofOptional

Optional identifier for the page that should be returned. If it is not provided, the first page will be returned.

Example: NTUwZTg0MDAtZTI5Yi00MWQ0LWE3MTYtNDQ2NjU1NDQwMDAw
stringOptional
or
nullOptional
page_sizeinteger · min: 1 · max: 100Optional

Number of items to be returned in the page.

Default: 50
directionstring · enumOptional

Direction for pagination: 'next' to advance through pages (older items), 'prev' to go back (newer items)

Default: nextPossible values:
Responses
chevron-right
200

Successful Response

application/json
Other propertiesanyOptional
get
/v1/knowledge-bases/{knowledge_base_id}/resources

Create Resource

post

Upload a file directly to a knowledge base and start indexing.

This endpoint allows API users to upload files directly without needing to use presigned URLs. The file is uploaded to storage and indexing is started automatically.

Authorizations
Path parameters
knowledge_base_idstring · uuidRequired
Body
filestring · binaryRequired

The file to upload to the knowledge base

Responses
post
/v1/knowledge-bases/{knowledge_base_id}/resources

Get Resource By Id

get

Get one file resource by ID from the knowledge base.

Authorizations
Path parameters
knowledge_base_idstring · uuidRequired
resource_idstring · uuidRequired
Responses
chevron-right
200

Successful Response

application/json

API response model for a KB file (without signed download URL).

knowledge_base_idstring · uuidRequired
created_atstring · date-timeRequired
modified_atstring · date-timeRequired
indexed_atany ofOptional
string · date-timeOptional
or
nullOptional
resource_idany ofRequired
string · uuidOptional
or
nullOptional
resource_pathstring · min: 1Required
dataloader_metadataobject · Dataloader MetadataOptional
user_metadataobject · User MetadataOptional
content_hashstring · min: 1Required
content_mimestring · min: 1Required
sizeintegerRequired
statusstring · enumRequired

Enumerates all the possible status of a file in the Stack Virtual File System.

Possible values:
get
/v1/knowledge-bases/{knowledge_base_id}/resources/{resource_id}

Delete Resource By Id

delete

Delete a file resource by inode ID.

Authorizations
Path parameters
knowledge_base_idstring · uuidRequired
resource_idstring · uuidRequired
Responses
delete
/v1/knowledge-bases/{knowledge_base_id}/resources/{resource_id}

No content

Synchronize Knowledge Base

post

Synchronize the knowledge base.

Authorizations
Path parameters
knowledge_base_idstring · uuidRequired
Responses
post
/v1/knowledge-bases/{knowledge_base_id}/sync

Last updated

Was this helpful?