Implementation:FlowiseAI Flowise CreateDocumentStore
| Attribute | Value |
|---|---|
| Sources | packages/ui/src/api/documentstore.js:L6 |
| Domains | Document_Store_Ingestion |
| Last Updated | 2026-02-12 14:00 GMT |
Overview
CreateDocumentStore is the API client function that creates a new document store container on the server. It sends a POST request to the document store endpoint with the store's name and description, returning the created store object with its server-assigned identifier.
Code Reference
Source Location
- File:
packages/ui/src/api/documentstore.js, Line 6 - Repository: FlowiseAI/Flowise
Signature
const createDocumentStore = (body) => client.post(`/document-store/store`, body)
This function sends a POST request to the /api/v1/document-store/store endpoint via the configured axios client instance.
Import
import documentStoreApi from '@/api/documentstore'
The function is accessed as documentStoreApi.createDocumentStore(body) after importing the default export from the documentstore API module.
I/O Contract
Inputs
| Parameter | Type | Required | Description |
|---|---|---|---|
| body | object | Yes | The document store configuration object |
| body.name | string | Yes | The display name of the document store |
| body.description | string | No | A description of the store's purpose and contents |
Outputs
| Field | Type | Description |
|---|---|---|
| data | DocumentStore | The created document store object |
| data.id | string | Server-assigned unique identifier for the store |
| data.name | string | The name provided in the request |
| data.description | string | The description provided in the request |
The function returns a Promise<{data: DocumentStore}> from the axios response.
Usage Examples
Basic Store Creation
import documentStoreApi from '@/api/documentstore'
const createNewStore = async () => {
const body = {
name: 'Product Documentation',
description: 'Technical documentation for product v2.0'
}
const response = await documentStoreApi.createDocumentStore(body)
const store = response.data
console.log('Created store with id:', store.id)
return store
}
Store Creation in a Dialog Workflow
import documentStoreApi from '@/api/documentstore'
// Typical usage within a dialog confirm handler
const handleConfirm = async (name, description) => {
try {
const response = await documentStoreApi.createDocumentStore({
name,
description
})
// Navigate to the newly created store detail page
navigate(`/document-stores/${response.data.id}`)
} catch (error) {
console.error('Failed to create document store:', error)
}
}
Related Pages
- Principle:FlowiseAI_Flowise_Document_Store_Creation
- Environment:FlowiseAI_Flowise_Database_Environment
- Implementation:FlowiseAI_Flowise_GetDocumentLoaders -- Fetching available loaders after store creation
- Implementation:FlowiseAI_Flowise_PreviewChunks -- Previewing document chunks within the store