deleteData
The 'deleteData' route in the Flexibel API is designed for removing specific data sources or all data sources associated with a given API key from the AI chatbot system. This route is crucial for maintaining and managing the data your chatbot accesses and uses.
DELETE https://api.flexibel.ai/v0/deleteData
Request
To delete a specific data source or all data sources using curl:
curl -X DELETE https://api.flexibel.ai/v0/deleteData \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"source": "SOURCE_NAME_OR_IDENTIFIER",
"deleteAllSources": true_or_false
}'
Replace 'SOURCE_NAME_OR_IDENTIFIER' with the name or identifier of the source you wish to delete. Set 'deleteAllSources' to 'true' if you wish to delete all sources; otherwise, it defaults to 'false'.
Response
The response confirms the successful deletion of the specified source or sources:
{
"message": "Source(s) successfully deleted.",
"deleted": "SOURCE_NAME_OR_IDENTIFIER or All Sources"
}
Request Body
The table below outlines the parameters for the 'deleteData' route:
Parameter | Type | Required | Description |
---|---|---|---|
source | string | no | The name or identifier of the specific data source to delete. |
deleteAllSources | boolean | no | Set to 'true' to delete all sources. Defaults to 'false'. |
Usage
This route offers flexibility in data management:
- To delete a specific source, provide its name or identifier in the 'source' parameter.
- To delete all sources associated with your API key, set the deleteAllSources parameter to 'true'. This functionality ensures efficient control over the data sources feeding your chatbot, allowing for quick adjustments and updates to the chatbot's knowledge base. For adding new data sources or retrieving existing ones, refer to the 'importData' and 'retrieveSources' routes respectively.