Get Chunks By Condition
This API returns the complete list of chunks that satisfy the given condition in the request body.| Field | Value |
|---|---|
| Method | POST |
| Endpoint | <host_url>/api/public/bot/:botId/chunk/list |
| Content-Type | application/json |
| Authorization | auth: <JWT Token> |
| API Scope | Chunk Management |
Query Parameters
| Parameter | Description | Mandatory |
|---|---|---|
| Bot ID | Provide your application ID here. | Yes |
Request Parameters
| Parameter | Description | Mandatory |
|---|---|---|
filters | Used to set filters for selecting chunks. filters contains: Conditions — an array of conditions where each condition is a set of operands applied on the conditions; and Operand — the operand applied on all conditions in the array. For example, a logical OR on sourceName, another OR on recordTitle, and an AND combining both results. See the example below. | No. If no filters are provided, all chunks are returned. |
enableFilters | Set to true to apply the filter field to chunks in the response. | No |
nextCursor | Used for cursor-based pagination. Omit on first request; use the cursor value from the previous response to fetch the next set of results. | No |
prevCursor | Used for cursor-based pagination. Use the cursor value from the previous request. | No |
Sample Response
Update Chunks
This API updates a given chunk. Only parameters included in the request body are updated; omitted parameters retain their existing values.| Field | Value |
|---|---|
| Method | POST |
| Endpoint | <host_url>/api/public/bot/:botId/chunk/:chunkId |
| Content-Type | application/json |
| Authorization | auth: <JWT Token> |
| API Scope | Chunk Management |
Query Parameters
| Parameter | Description | Mandatory |
|---|---|---|
| Bot ID | Provide your application ID here. | Yes |
| ChunkID | Unique ID of the chunk to be updated. | Yes |
Request Parameters
Pass the full chunk info in the request body. Field names must match the example below.Sample Request
Sample Response
Delete Chunks by ID
This API enables targeted deletion of indexed content without a full re-index. Provide a list of chunk IDs to identify and delete the corresponding chunks from the Search Index. Useful for incremental cleanup, partial refresh scenarios, and lifecycle management of structured uploads.| Field | Value |
|---|---|
| Method | POST |
| URL | /api/public/bot/{AppId}/search/delete-chunks-by-cond |
| Content-Type | application/json |
| Authentication | auth: <JWT Token> |
| API Scope | Chunk Management |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
AppId | string | Yes | Your application ID. To view it, go to Dev Tools under App Settings and check the API scopes. |
Request Body Parameters
| Field | Type | Required | Description |
|---|---|---|---|
chunkId | string[] | No | An array of chunk IDs to delete. |
Sample Request
Example: Delete by chunkIdResponse
Response Fields| Field | Description |
|---|---|
status | Status of the chunk deletion job. |
totalRequested | Number of chunks requested for deletion. |
totalDeleted | Number of chunks successfully deleted. |
totalNotFound | Number of chunks that were not found. |
Sample Response
Error Messages
| Error Code | Message | When It Occurs | Recommended Action |
|---|---|---|---|
| 400 | One or more chunkIds don’t exist. | chunkId is not provided in the request body. | Provide exactly one of the required fields. |
| 401 | Unauthorized | Missing, invalid, or expired JWT token. | Verify the auth header and regenerate the token. |
| 404 | Resource not found | Invalid AppId or resource doesn’t exist. | Verify the AppID. |
| 500 | Internal server error | Unexpected server-side failure. | Retry the request or contact support if the issue persists. |