Delete a connector¶
Delete a saved connector. Deletion cannot be reversed and does not delete data that was previously written through the connector.
DELETE https://moi.matrixorigin.cn/newmoi/connectors/{connector_id}
Before you call¶
First get connector details and check related_task_ids. Prepare a personal access token that can access the target workspace, the target workspace ID, and the connector ID.
The example uses:
$AI_STUDIO_API_KEY: your personal access token, sent in theX-API-Keyheader.$WORKSPACE_ID: the target workspace ID, sent in theX-Workspace-IDheader.$CONNECTOR_ID: the connector ID to delete.
The deletion request is rejected while incomplete import tasks still use the connector. Handle those tasks first.
Request example¶
curl -X DELETE "https://moi.matrixorigin.cn/newmoi/connectors/$CONNECTOR_ID" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Path parameters¶
Parameter |
Type |
Description |
|---|---|---|
|
string |
Connector ID to delete. |
Successful response¶
When the response code is OK, the deletion request has been accepted and data is null. The endpoint does not return the deleted object. After confirming that the connector no longer appears in the list, deletion cannot be reversed.
{
"code": "OK",
"msg": "OK",
"data": null
}
Response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
Processing message for the deletion request. |
|
null |
This endpoint does not return the deleted object. |
Error response¶
HTTP 200 does not necessarily mean that the deletion request was accepted. Always check code; only code: "OK" means the endpoint accepted it.
{
"code": "ErrConnectorInUse",
"msg": "connector is in use",
"data": null
}
Common HTTP errors¶
HTTP status |
Error code |
Common cause |
Recommended action |
|---|---|---|---|
|
|
The connector is still used by incomplete import tasks. |
Stop, migrate, or delete the related tasks first. |
|
|
The service could not delete the connector. |
Check |
|
|
The service is temporarily unable to complete deletion. |
Retry later. |
Next steps¶
Use List connectors to confirm that the connector no longer appears. The deletion endpoint does not return a resource object, and a details response cannot replace that confirmation.