Delete data source¶
Removes a source from the knowledge base; the original Catalog table or file is not deleted. Before deleting, confirm that there are no processing tasks still running on this source.
DELETE $CLOUDSIGMA_API_BASE/semantic-models/{model_id}/sources/{source_row_id}
Before you call this API¶
Configure the regional API endpoint and authentication, and select the target workspace.
First query the data source list to obtain the source record ID, and confirm that there are no processing tasks still running in this source.
Set the operation-specific values used in the request:
$MODEL_ID: Knowledge Base ID.$SOURCE_ROW_ID: Source record ID to be deleted.
Request¶
curl -X DELETE "$CLOUDSIGMA_API_BASE/semantic-models/$MODEL_ID/sources/$SOURCE_ROW_ID" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Path parameters
Parameters |
Type |
Description |
|---|---|---|
|
integer |
Knowledge base ID. |
|
string |
Source record ID. |
Successful response¶
The source record was deleted when code was OK and data.deleted was true in the response.
{
"code": "OK",
"msg": "OK",
"data": {
"deleted": true
}
}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
boolean |
|
Error response¶
{
"code": "ErrNotFound",
"msg": "resource not found",
"data": null
}
Common HTTP errors¶
HTTP status code |
error code |
Common causes |
Recommended actions |
|---|---|---|---|
|
|
|
Query the source list again, using the returned |
|
|
The API Key is invalid or has expired. |
Check API Key. |
|
|
The caller does not have permission to delete the source. |
Check workspace and object authorization. |
|
|
The knowledge base or source does not exist or is not visible to the current caller. |
Reconfirm the path ID. |
|
|
The service failed to delete the source. |
Keep the desensitized response information and try again. |
Follow-up operations¶
Query data source list Confirm that the source has been removed.