Disconnect a source
curl --request DELETE \
--url https://api.conare.ai/sources/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.conare.ai/sources/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.conare.ai/sources/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text){
"deleted": true
}{
"run": {
"id": "run_8c1e0f3a2b4d5c6e7f8a9b0c",
"source_id": "<string>",
"kind": "snapshot",
"trigger": "api",
"state": "queued",
"phase": "receiving",
"attempt": 123,
"sweep": "none",
"sweep_reason": "<string>",
"expected": 123,
"counts": {},
"error": {},
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"progress": {
"done": 123,
"expected": 123,
"rate_per_s": 123,
"eta_s": 123,
"eta_is_estimate": true
}
},
"source": {
"id": "src_5d2f0c4e9a1b7c3d8e6f0a12",
"kind": "custom",
"type": "<string>",
"namespace": "docs",
"user": "<string>",
"name": "<string>",
"status": "active",
"health": "ok",
"display": {
"state": "ok",
"warning": "<string>",
"action": "<string>"
},
"sync": {
"state": "idle",
"run_id": "<string>",
"phase": "<string>",
"last_success_at": "2023-11-07T05:31:56Z",
"last_failure_at": "2023-11-07T05:31:56Z",
"next_run_at": "2023-11-07T05:31:56Z",
"last_error": {}
},
"documents": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"documents_verified_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "invalid_request",
"message": "text is required",
"request_id": "7d0f4c1e-2b8a-4e39-9a61-3c5e8b2f9d04"
}
}{
"error": {
"code": "invalid_request",
"message": "text is required",
"request_id": "7d0f4c1e-2b8a-4e39-9a61-3c5e8b2f9d04"
}
}{
"error": {
"code": "invalid_request",
"message": "text is required",
"request_id": "7d0f4c1e-2b8a-4e39-9a61-3c5e8b2f9d04"
}
}{
"error": {
"code": "invalid_request",
"message": "text is required",
"request_id": "7d0f4c1e-2b8a-4e39-9a61-3c5e8b2f9d04"
}
}{
"error": {
"code": "invalid_request",
"message": "text is required",
"request_id": "7d0f4c1e-2b8a-4e39-9a61-3c5e8b2f9d04"
}
}数据源
Disconnect a source
Stops syncing and removes the source; delete_documents=true also deletes what it synced.
- A custom source answers 202 with its delete run and refuses pushes (
source_deleting) until it isdeleted.
DELETE
https://api.conare.ai
/
sources
/
{id}
Disconnect a source
curl --request DELETE \
--url https://api.conare.ai/sources/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.conare.ai/sources/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.conare.ai/sources/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text){
"deleted": true
}{
"run": {
"id": "run_8c1e0f3a2b4d5c6e7f8a9b0c",
"source_id": "<string>",
"kind": "snapshot",
"trigger": "api",
"state": "queued",
"phase": "receiving",
"attempt": 123,
"sweep": "none",
"sweep_reason": "<string>",
"expected": 123,
"counts": {},
"error": {},
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"progress": {
"done": 123,
"expected": 123,
"rate_per_s": 123,
"eta_s": 123,
"eta_is_estimate": true
}
},
"source": {
"id": "src_5d2f0c4e9a1b7c3d8e6f0a12",
"kind": "custom",
"type": "<string>",
"namespace": "docs",
"user": "<string>",
"name": "<string>",
"status": "active",
"health": "ok",
"display": {
"state": "ok",
"warning": "<string>",
"action": "<string>"
},
"sync": {
"state": "idle",
"run_id": "<string>",
"phase": "<string>",
"last_success_at": "2023-11-07T05:31:56Z",
"last_failure_at": "2023-11-07T05:31:56Z",
"next_run_at": "2023-11-07T05:31:56Z",
"last_error": {}
},
"documents": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"documents_verified_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "invalid_request",
"message": "text is required",
"request_id": "7d0f4c1e-2b8a-4e39-9a61-3c5e8b2f9d04"
}
}{
"error": {
"code": "invalid_request",
"message": "text is required",
"request_id": "7d0f4c1e-2b8a-4e39-9a61-3c5e8b2f9d04"
}
}{
"error": {
"code": "invalid_request",
"message": "text is required",
"request_id": "7d0f4c1e-2b8a-4e39-9a61-3c5e8b2f9d04"
}
}{
"error": {
"code": "invalid_request",
"message": "text is required",
"request_id": "7d0f4c1e-2b8a-4e39-9a61-3c5e8b2f9d04"
}
}{
"error": {
"code": "invalid_request",
"message": "text is required",
"request_id": "7d0f4c1e-2b8a-4e39-9a61-3c5e8b2f9d04"
}
}授权
A key from conare.ai/dashboard/keys with full access, some namespaces, or models only (/embed, /rerank, /v1, /v2/rerank, /parse).
请求头
One key (a UUID) per logical write, sent again on each retry: a repeat within 24 hours replays the first successful answer.
Required string length:
1 - 255Pattern:
^[\x21-\x7e]+$路径参数
The source id, src_….
查询参数
Also delete the documents the source synced.
响应
Deleted.
此页面对您有帮助吗?