# Document Store

## Get a specific document store

> Retrieves details of a specific document store by its ID

```json
{"tags":[{"name":"document-store"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"DocumentStore":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the document store"},"name":{"type":"string","description":"Name of the document store"},"description":{"type":"string","description":"Description of the document store"},"loaders":{"type":"string","description":"Loaders associated with the document store, stored as JSON string"},"whereUsed":{"type":"string","description":"Places where the document store is used, stored as JSON string"},"status":{"type":"string","enum":["EMPTY","SYNC","SYNCING","STALE","NEW","UPSERTING","UPSERTED"],"description":"Status of the document store"},"vectorStoreConfig":{"type":"string","description":"Configuration for the vector store, stored as JSON string"},"embeddingConfig":{"type":"string","description":"Configuration for the embedding, stored as JSON string"},"recordManagerConfig":{"type":"string","description":"Configuration for the record manager, stored as JSON string"},"createdDate":{"type":"string","format":"date-time","description":"Date and time when the document store was created"},"updatedDate":{"type":"string","format":"date-time","description":"Date and time when the document store was last updated"}}}}},"paths":{"/document-store/store/{id}":{"get":{"tags":["document-store"],"summary":"Get a specific document store","description":"Retrieves details of a specific document store by its ID","operationId":"getDocumentStoreById","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"},"description":"Document Store ID"}],"responses":{"200":{"description":"Successfully retrieved document store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentStore"}}}},"404":{"description":"Document store not found"},"500":{"description":"Internal server error"}}}}}}
```

## Get chunks from a specific document loader

> Get chunks from a specific document loader within a document store

```json
{"tags":[{"name":"document-store"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"DocumentStoreFileChunkPagedResponse":{"type":"object","properties":{"chunks":{"type":"array","items":{"$ref":"#/components/schemas/DocumentStoreFileChunk"}},"count":{"type":"number"},"file":{"$ref":"#/components/schemas/DocumentStoreLoaderForPreview"},"currentPage":{"type":"number"},"storeName":{"type":"string"},"description":{"type":"string"}}},"DocumentStoreFileChunk":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the file chunk"},"docId":{"type":"string","format":"uuid","description":"Document ID within the store"},"storeId":{"type":"string","format":"uuid","description":"Document Store ID"},"chunkNo":{"type":"integer","description":"Chunk number within the document"},"pageContent":{"type":"string","description":"Content of the chunk"},"metadata":{"type":"string","description":"Metadata associated with the chunk"}}},"DocumentStoreLoaderForPreview":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the document store loader"},"loaderId":{"type":"string","description":"ID of the loader"},"loaderName":{"type":"string","description":"Name of the loader"},"loaderConfig":{"type":"object","description":"Configuration for the loader"},"splitterId":{"type":"string","description":"ID of the text splitter"},"splitterName":{"type":"string","description":"Name of the text splitter"},"splitterConfig":{"type":"object","description":"Configuration for the text splitter"},"totalChunks":{"type":"number","description":"Total number of chunks"},"totalChars":{"type":"number","description":"Total number of characters"},"status":{"type":"string","enum":["EMPTY","SYNC","SYNCING","STALE","NEW","UPSERTING","UPSERTED"],"description":"Status of the document store loader"},"storeId":{"type":"string","description":"ID of the document store"},"files":{"type":"array","items":{"$ref":"#/components/schemas/DocumentStoreLoaderFile"}},"source":{"type":"string","description":"Source of the document store loader"},"credential":{"type":"string","description":"Credential associated with the document store loader"},"rehydrated":{"type":"boolean","description":"Whether the loader has been rehydrated"},"preview":{"type":"boolean","description":"Whether the loader is in preview mode"},"previewChunkCount":{"type":"number","description":"Number of chunks in preview mode"}}},"DocumentStoreLoaderFile":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the file"},"name":{"type":"string","description":"Name of the file"},"mimePrefix":{"type":"string","description":"MIME prefix of the file"},"size":{"type":"number","description":"Size of the file"},"status":{"type":"string","enum":["EMPTY","SYNC","SYNCING","STALE","NEW","UPSERTING","UPSERTED"],"description":"Status of the file"},"uploaded":{"type":"string","format":"date-time","description":"Date and time when the file was uploaded"}}}}},"paths":{"/document-store/chunks/{storeId}/{loaderId}/{pageNo}":{"get":{"tags":["document-store"],"summary":"Get chunks from a specific document loader","description":"Get chunks from a specific document loader within a document store","operationId":"getDocumentStoreFileChunks","parameters":[{"in":"path","name":"storeId","required":true,"schema":{"type":"string","format":"uuid"},"description":"Document Store ID"},{"in":"path","name":"loaderId","required":true,"schema":{"type":"string","format":"uuid"},"description":"Document loader ID"},{"in":"path","name":"pageNo","required":true,"schema":{"type":"string"},"description":"Pagination number"}],"responses":{"200":{"description":"Successfully retrieved chunks from document loader","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentStoreFileChunkPagedResponse"}}}},"404":{"description":"Document store not found"},"500":{"description":"Internal server error"}}}}}}
```

## List all document stores

> Retrieves a list of all document stores

```json
{"tags":[{"name":"document-store"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"DocumentStore":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the document store"},"name":{"type":"string","description":"Name of the document store"},"description":{"type":"string","description":"Description of the document store"},"loaders":{"type":"string","description":"Loaders associated with the document store, stored as JSON string"},"whereUsed":{"type":"string","description":"Places where the document store is used, stored as JSON string"},"status":{"type":"string","enum":["EMPTY","SYNC","SYNCING","STALE","NEW","UPSERTING","UPSERTED"],"description":"Status of the document store"},"vectorStoreConfig":{"type":"string","description":"Configuration for the vector store, stored as JSON string"},"embeddingConfig":{"type":"string","description":"Configuration for the embedding, stored as JSON string"},"recordManagerConfig":{"type":"string","description":"Configuration for the record manager, stored as JSON string"},"createdDate":{"type":"string","format":"date-time","description":"Date and time when the document store was created"},"updatedDate":{"type":"string","format":"date-time","description":"Date and time when the document store was last updated"}}}}},"paths":{"/document-store/store":{"get":{"tags":["document-store"],"summary":"List all document stores","description":"Retrieves a list of all document stores","operationId":"getAllDocumentStores","responses":{"200":{"description":"A list of document stores","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentStore"}}}}},"500":{"description":"Internal server error"}}}}}}
```

## Upsert document to document store

> Upsert document to document store

```json
{"tags":[{"name":"document-store"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"DocumentStoreLoaderForUpsert":{"type":"object","properties":{"docId":{"type":"string","format":"uuid","nullable":true,"description":"Document ID within the store. If provided, existing configuration from the document will be used for the new document"},"metadata":{"type":"object","nullable":true,"description":"Metadata associated with the document"},"replaceExisting":{"type":"boolean","nullable":true,"description":"Whether to replace existing document loader with the new upserted chunks. However this does not delete the existing embeddings in the vector store"},"createNewDocStore":{"type":"boolean","nullable":true,"description":"Whether to create a new document store"},"docStore":{"type":"object","nullable":true,"description":"Only when createNewDocStore is true, pass in the new document store configuration","properties":{"name":{"type":"string","description":"Name of the new document store to be created"},"description":{"type":"string","description":"Description of the new document store to be created"}}},"loader":{"type":"object","nullable":true,"properties":{"name":{"type":"string","description":"Name of the loader (camelCase)"},"config":{"type":"object","description":"Configuration for the loader"}}},"splitter":{"type":"object","nullable":true,"properties":{"name":{"type":"string","description":"Name of the text splitter (camelCase)"},"config":{"type":"object","description":"Configuration for the text splitter"}}},"embedding":{"type":"object","nullable":true,"properties":{"name":{"type":"string","description":"Name of the embedding generator (camelCase)"},"config":{"type":"object","description":"Configuration for the embedding generator"}}},"vectorStore":{"type":"object","nullable":true,"properties":{"name":{"type":"string","description":"Name of the vector store (camelCase)"},"config":{"type":"object","description":"Configuration for the vector store"}}},"recordManager":{"type":"object","nullable":true,"properties":{"name":{"type":"string","description":"Name of the record manager (camelCase)"},"config":{"type":"object","description":"Configuration for the record manager"}}}}},"VectorUpsertResponse":{"type":"object","properties":{"numAdded":{"type":"number","description":"Number of vectors added"},"numDeleted":{"type":"number","description":"Number of vectors deleted"},"numUpdated":{"type":"number","description":"Number of vectors updated"},"numSkipped":{"type":"number","description":"Number of vectors skipped (not added, deleted, or updated)"},"addedDocs":{"type":"array","items":{"$ref":"#/components/schemas/Document"}}}},"Document":{"type":"object","properties":{"pageContent":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"}}}}}},"paths":{"/document-store/upsert/{id}":{"post":{"tags":["document-store"],"summary":"Upsert document to document store","description":"Upsert document to document store","operationId":"upsertDocument","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"},"description":"Document Store ID"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentStoreLoaderForUpsert"}},"multipart/form-data":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"string","format":"binary"},"description":"Files to be uploaded"},"docId":{"type":"string","nullable":true,"description":"Document ID to use existing configuration"},"loader":{"type":"string","nullable":true,"description":"Loader configurations"},"splitter":{"type":"string","nullable":true,"description":"Splitter configurations"},"embedding":{"type":"string","nullable":true,"description":"Embedding configurations"},"vectorStore":{"type":"string","nullable":true,"description":"Vector Store configurations"},"recordManager":{"type":"string","nullable":true,"description":"Record Manager configurations"},"metadata":{"type":"object","nullable":true,"description":"Metadata associated with the document"},"replaceExisting":{"type":"boolean","nullable":true,"description":"Whether to replace existing document loader with the new upserted chunks. However this does not delete the existing embeddings in the vector store"},"createNewDocStore":{"type":"boolean","nullable":true,"description":"Whether to create a new document store"},"docStore":{"type":"object","nullable":true,"description":"Only when createNewDocStore is true, pass in the new document store configuration","properties":{"name":{"type":"string","description":"Name of the new document store to be created"},"description":{"type":"string","description":"Description of the new document store to be created"}}}},"required":["files"]}}},"required":true},"responses":{"200":{"description":"Successfully execute upsert operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VectorUpsertResponse"}}}},"400":{"description":"Invalid request body"},"500":{"description":"Internal server error"}}}}}}
```

## Re-process and upsert all documents in document store

> Re-process and upsert all existing documents in document store

```json
{"tags":[{"name":"document-store"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"DocumentStoreLoaderForRefresh":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/DocumentStoreLoaderForUpsert"}}}},"DocumentStoreLoaderForUpsert":{"type":"object","properties":{"docId":{"type":"string","format":"uuid","nullable":true,"description":"Document ID within the store. If provided, existing configuration from the document will be used for the new document"},"metadata":{"type":"object","nullable":true,"description":"Metadata associated with the document"},"replaceExisting":{"type":"boolean","nullable":true,"description":"Whether to replace existing document loader with the new upserted chunks. However this does not delete the existing embeddings in the vector store"},"createNewDocStore":{"type":"boolean","nullable":true,"description":"Whether to create a new document store"},"docStore":{"type":"object","nullable":true,"description":"Only when createNewDocStore is true, pass in the new document store configuration","properties":{"name":{"type":"string","description":"Name of the new document store to be created"},"description":{"type":"string","description":"Description of the new document store to be created"}}},"loader":{"type":"object","nullable":true,"properties":{"name":{"type":"string","description":"Name of the loader (camelCase)"},"config":{"type":"object","description":"Configuration for the loader"}}},"splitter":{"type":"object","nullable":true,"properties":{"name":{"type":"string","description":"Name of the text splitter (camelCase)"},"config":{"type":"object","description":"Configuration for the text splitter"}}},"embedding":{"type":"object","nullable":true,"properties":{"name":{"type":"string","description":"Name of the embedding generator (camelCase)"},"config":{"type":"object","description":"Configuration for the embedding generator"}}},"vectorStore":{"type":"object","nullable":true,"properties":{"name":{"type":"string","description":"Name of the vector store (camelCase)"},"config":{"type":"object","description":"Configuration for the vector store"}}},"recordManager":{"type":"object","nullable":true,"properties":{"name":{"type":"string","description":"Name of the record manager (camelCase)"},"config":{"type":"object","description":"Configuration for the record manager"}}}}},"VectorUpsertResponse":{"type":"object","properties":{"numAdded":{"type":"number","description":"Number of vectors added"},"numDeleted":{"type":"number","description":"Number of vectors deleted"},"numUpdated":{"type":"number","description":"Number of vectors updated"},"numSkipped":{"type":"number","description":"Number of vectors skipped (not added, deleted, or updated)"},"addedDocs":{"type":"array","items":{"$ref":"#/components/schemas/Document"}}}},"Document":{"type":"object","properties":{"pageContent":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"}}}}}},"paths":{"/document-store/refresh/{id}":{"post":{"tags":["document-store"],"summary":"Re-process and upsert all documents in document store","description":"Re-process and upsert all existing documents in document store","operationId":"refreshDocument","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"},"description":"Document Store ID"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentStoreLoaderForRefresh"}}},"required":true},"responses":{"200":{"description":"Successfully execute refresh operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VectorUpsertResponse"}}}}},"400":{"description":"Invalid request body"},"500":{"description":"Internal server error"}}}}}}
```

## Retrieval query

> Retrieval query for the upserted chunks

```json
{"tags":[{"name":"document-store"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Document":{"type":"object","properties":{"pageContent":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"}}}}}},"paths":{"/document-store/vectorstore/query":{"post":{"tags":["document-store"],"summary":"Retrieval query","description":"Retrieval query for the upserted chunks","operationId":"queryVectorStore","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["storeId","query"],"properties":{"storeId":{"type":"string","description":"Document Store ID"},"query":{"type":"string","description":"Query to search for"}}}}},"required":true},"responses":{"200":{"description":"Successfully executed query on vector store","content":{"application/json":{"schema":{"type":"object","properties":{"timeTaken":{"type":"number","description":"Time taken to execute the query (in milliseconds)"},"docs":{"type":"array","items":{"$ref":"#/components/schemas/Document"}}}}}}},"400":{"description":"Invalid request body"},"500":{"description":"Internal server error"}}}}}}
```

## Create a new document store

> Creates a new document store with the provided details

```json
{"tags":[{"name":"document-store"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"DocumentStore":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the document store"},"name":{"type":"string","description":"Name of the document store"},"description":{"type":"string","description":"Description of the document store"},"loaders":{"type":"string","description":"Loaders associated with the document store, stored as JSON string"},"whereUsed":{"type":"string","description":"Places where the document store is used, stored as JSON string"},"status":{"type":"string","enum":["EMPTY","SYNC","SYNCING","STALE","NEW","UPSERTING","UPSERTED"],"description":"Status of the document store"},"vectorStoreConfig":{"type":"string","description":"Configuration for the vector store, stored as JSON string"},"embeddingConfig":{"type":"string","description":"Configuration for the embedding, stored as JSON string"},"recordManagerConfig":{"type":"string","description":"Configuration for the record manager, stored as JSON string"},"createdDate":{"type":"string","format":"date-time","description":"Date and time when the document store was created"},"updatedDate":{"type":"string","format":"date-time","description":"Date and time when the document store was last updated"}}}}},"paths":{"/document-store/store":{"post":{"tags":["document-store"],"summary":"Create a new document store","description":"Creates a new document store with the provided details","operationId":"createDocumentStore","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentStore"}}},"required":true},"responses":{"200":{"description":"Successfully created document store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentStore"}}}},"400":{"description":"Invalid request body"},"500":{"description":"Internal server error"}}}}}}
```

## Update a specific chunk

> Updates a specific chunk from a document loader

```json
{"tags":[{"name":"document-store"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Document":{"type":"object","properties":{"pageContent":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"type":"string"}}}},"DocumentStoreFileChunkPagedResponse":{"type":"object","properties":{"chunks":{"type":"array","items":{"$ref":"#/components/schemas/DocumentStoreFileChunk"}},"count":{"type":"number"},"file":{"$ref":"#/components/schemas/DocumentStoreLoaderForPreview"},"currentPage":{"type":"number"},"storeName":{"type":"string"},"description":{"type":"string"}}},"DocumentStoreFileChunk":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the file chunk"},"docId":{"type":"string","format":"uuid","description":"Document ID within the store"},"storeId":{"type":"string","format":"uuid","description":"Document Store ID"},"chunkNo":{"type":"integer","description":"Chunk number within the document"},"pageContent":{"type":"string","description":"Content of the chunk"},"metadata":{"type":"string","description":"Metadata associated with the chunk"}}},"DocumentStoreLoaderForPreview":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the document store loader"},"loaderId":{"type":"string","description":"ID of the loader"},"loaderName":{"type":"string","description":"Name of the loader"},"loaderConfig":{"type":"object","description":"Configuration for the loader"},"splitterId":{"type":"string","description":"ID of the text splitter"},"splitterName":{"type":"string","description":"Name of the text splitter"},"splitterConfig":{"type":"object","description":"Configuration for the text splitter"},"totalChunks":{"type":"number","description":"Total number of chunks"},"totalChars":{"type":"number","description":"Total number of characters"},"status":{"type":"string","enum":["EMPTY","SYNC","SYNCING","STALE","NEW","UPSERTING","UPSERTED"],"description":"Status of the document store loader"},"storeId":{"type":"string","description":"ID of the document store"},"files":{"type":"array","items":{"$ref":"#/components/schemas/DocumentStoreLoaderFile"}},"source":{"type":"string","description":"Source of the document store loader"},"credential":{"type":"string","description":"Credential associated with the document store loader"},"rehydrated":{"type":"boolean","description":"Whether the loader has been rehydrated"},"preview":{"type":"boolean","description":"Whether the loader is in preview mode"},"previewChunkCount":{"type":"number","description":"Number of chunks in preview mode"}}},"DocumentStoreLoaderFile":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the file"},"name":{"type":"string","description":"Name of the file"},"mimePrefix":{"type":"string","description":"MIME prefix of the file"},"size":{"type":"number","description":"Size of the file"},"status":{"type":"string","enum":["EMPTY","SYNC","SYNCING","STALE","NEW","UPSERTING","UPSERTED"],"description":"Status of the file"},"uploaded":{"type":"string","format":"date-time","description":"Date and time when the file was uploaded"}}}}},"paths":{"/document-store/chunks/{storeId}/{loaderId}/{chunkId}":{"put":{"tags":["document-store"],"summary":"Update a specific chunk","description":"Updates a specific chunk from a document loader","operationId":"editDocumentStoreFileChunk","parameters":[{"in":"path","name":"storeId","required":true,"schema":{"type":"string"},"description":"Document Store ID"},{"in":"path","name":"loaderId","required":true,"schema":{"type":"string"},"description":"Document Loader ID"},{"in":"path","name":"chunkId","required":true,"schema":{"type":"string"},"description":"Document Chunk ID"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}},"required":true},"responses":{"200":{"description":"Successfully updated chunk","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentStoreFileChunkPagedResponse"}}}},"404":{"description":"Document store not found"},"500":{"description":"Internal server error"}}}}}}
```

## Update a specific document store

> Updates the details of a specific document store by its ID

```json
{"tags":[{"name":"document-store"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"DocumentStore":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier for the document store"},"name":{"type":"string","description":"Name of the document store"},"description":{"type":"string","description":"Description of the document store"},"loaders":{"type":"string","description":"Loaders associated with the document store, stored as JSON string"},"whereUsed":{"type":"string","description":"Places where the document store is used, stored as JSON string"},"status":{"type":"string","enum":["EMPTY","SYNC","SYNCING","STALE","NEW","UPSERTING","UPSERTED"],"description":"Status of the document store"},"vectorStoreConfig":{"type":"string","description":"Configuration for the vector store, stored as JSON string"},"embeddingConfig":{"type":"string","description":"Configuration for the embedding, stored as JSON string"},"recordManagerConfig":{"type":"string","description":"Configuration for the record manager, stored as JSON string"},"createdDate":{"type":"string","format":"date-time","description":"Date and time when the document store was created"},"updatedDate":{"type":"string","format":"date-time","description":"Date and time when the document store was last updated"}}}}},"paths":{"/document-store/store/{id}":{"put":{"tags":["document-store"],"summary":"Update a specific document store","description":"Updates the details of a specific document store by its ID","operationId":"updateDocumentStore","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"},"description":"Document Store ID"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentStore"}}},"required":true},"responses":{"200":{"description":"Successfully updated document store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentStore"}}}},"404":{"description":"Document store not found"},"500":{"description":"Internal server error"}}}}}}
```

## Delete a specific document store

> Deletes a document store by its ID

```json
{"tags":[{"name":"document-store"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/document-store/store/{id}":{"delete":{"tags":["document-store"],"summary":"Delete a specific document store","description":"Deletes a document store by its ID","operationId":"deleteDocumentStore","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"},"description":"Document Store ID"}],"responses":{"200":{"description":"Successfully deleted document store"},"404":{"description":"Document store not found"},"500":{"description":"Internal server error"}}}}}}
```

## Delete a specific chunk from a document loader

> Delete a specific chunk from a document loader

```json
{"tags":[{"name":"document-store"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/document-store/chunks/{storeId}/{loaderId}/{chunkId}":{"delete":{"tags":["document-store"],"summary":"Delete a specific chunk from a document loader","description":"Delete a specific chunk from a document loader","operationId":"deleteDocumentStoreFileChunk","parameters":[{"in":"path","name":"storeId","required":true,"schema":{"type":"string"},"description":"Document Store ID"},{"in":"path","name":"loaderId","required":true,"schema":{"type":"string"},"description":"Document Loader ID"},{"in":"path","name":"chunkId","required":true,"schema":{"type":"string"},"description":"Document Chunk ID"}],"responses":{"200":{"description":"Successfully deleted chunk"},"400":{"description":"Invalid ID provided"},"404":{"description":"Document Store not found"},"500":{"description":"Internal server error"}}}}}}
```

## Delete specific document loader and associated chunks from document store

> Delete specific document loader and associated chunks from document store. This does not delete data from vector store.

```json
{"tags":[{"name":"document-store"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/document-store/loader/{storeId}/{loaderId}":{"delete":{"tags":["document-store"],"summary":"Delete specific document loader and associated chunks from document store","description":"Delete specific document loader and associated chunks from document store. This does not delete data from vector store.","operationId":"deleteLoaderFromDocumentStore","parameters":[{"in":"path","name":"storeId","required":true,"schema":{"type":"string"},"description":"Document Store ID"},{"in":"path","name":"loaderId","required":true,"schema":{"type":"string"},"description":"Document Loader ID"}],"responses":{"200":{"description":"Successfully deleted loader from document store"},"400":{"description":"Invalid ID provided"},"404":{"description":"Document Store not found"},"500":{"description":"Internal server error"}}}}}}
```

## Delete data from vector store

> Only data that were upserted with Record Manager will be deleted from vector store

```json
{"tags":[{"name":"document-store"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/document-store/vectorstore/{id}":{"delete":{"tags":["document-store"],"summary":"Delete data from vector store","description":"Only data that were upserted with Record Manager will be deleted from vector store","operationId":"deleteVectorStoreFromStore","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"},"description":"Document Store ID"}],"responses":{"200":{"description":"Successfully deleted data from vector store"},"400":{"description":"Invalid ID provided"},"404":{"description":"Document Store not found"},"500":{"description":"Internal server error"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flowiseai.com/api-reference/document-store.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
