For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign Up
DocumentationAPI ReferenceSDKs
DocumentationAPI ReferenceSDKs
  • Documents
    • Ingest Documents
    • Ingest Directories
    • POSTcrawl_website
    • GETget_processing_status_by_id
    • GETlist
    • GETget
    • GETlookup
    • DELdelete (singular)
    • DELdelete (multiple)
    • GETget_processes
    • POSTcopy
    • PUTupdate
    • DELcancel_process
    • GETget_extract
    • GETget_xray
  • Search
    • POSTsearch.content
    • POSTsearch.documents
  • Buckets
    • GETlist
    • GETget
    • POSTcreate
    • PUTupdate
    • DELdelete
  • Groups
    • GETlist
    • GETget
    • POSTcreate
    • PUTupdate
    • DELdelete
    • POSTaddBucket
    • DELremoveBucket
  • Workflows
    • GETlist
    • POSTcreate
    • GETget_account
    • POSTadd_to_account
    • DELremove_from_account
    • POSTadd_to_id
    • DELremove_from_id
    • GETget
    • PUTupdate
    • DELdelete
  • Customer
    • GETget
  • API Key
    • GETlist
    • POSTcreate
    • PUTupdate
    • DELdelete
  • Health
    • GETlist
    • GETget
Sign Up
LogoLogo
Documents

delete (singular)

DELETE
https://api.groundx.ai/api/v1/ingest/document/:documentId
DELETE
/api/v1/ingest/document/:documentId
1from groundx import GroundX
2
3client = GroundX(
4 api_key="YOUR_API_KEY_HERE",
5)
6
7client.documents.delete_by_id(
8 document_id="documentId",
9)
1{
2 "ingest": {
3 "processId": "d290f1ee-6c54-4b01-90e6-d701748f0851",
4 "status": "complete",
5 "id": 42,
6 "progress": {
7 "cancelled": {
8 "documents": [
9 {
10 "documentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
11 "bucketId": 7,
12 "fileName": "cancelled_report.pdf",
13 "fileSize": "2.3MB",
14 "fileType": "pdf",
15 "filter": {
16 "category": "finance",
17 "year": 2023
18 },
19 "processId": "d290f1ee-6c54-4b01-90e6-d701748f0851",
20 "processLevel": "none",
21 "searchData": {},
22 "sourceUrl": "https://example.com/docs/cancelled_report.pdf",
23 "status": "cancelled",
24 "statusMessage": "Document processing was cancelled by user",
25 "textUrl": "https://storage.groundx.ai/texts/cancelled_report.txt",
26 "xrayUrl": "https://storage.groundx.ai/xray/cancelled_report.json"
27 }
28 ],
29 "total": 1
30 },
31 "complete": {
32 "documents": [
33 {
34 "documentId": "1c6b147a-3f3a-4a2a-9f3e-8a1b2c3d4e5f",
35 "bucketId": 7,
36 "fileName": "annual_summary_2023.xlsx",
37 "fileSize": "1.4MB",
38 "fileType": "xlsx",
39 "filter": {
40 "department": "sales",
41 "quarter": "Q4"
42 },
43 "processId": "d290f1ee-6c54-4b01-90e6-d701748f0851",
44 "processLevel": "full",
45 "searchData": {},
46 "sourceUrl": "https://example.com/docs/annual_summary_2023.xlsx",
47 "status": "complete",
48 "statusMessage": "Document processed successfully",
49 "textUrl": "https://storage.groundx.ai/texts/annual_summary_2023.txt",
50 "xrayUrl": "https://storage.groundx.ai/xray/annual_summary_2023.json"
51 }
52 ],
53 "total": 1
54 },
55 "errors": {
56 "documents": [
57 {
58 "documentId": "7b9f3c2d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
59 "bucketId": 7,
60 "fileName": "corrupted_data.csv",
61 "fileSize": "0.9MB",
62 "fileType": "csv",
63 "filter": {
64 "source": "external",
65 "priority": "high"
66 },
67 "processId": "d290f1ee-6c54-4b01-90e6-d701748f0851",
68 "processLevel": "full",
69 "searchData": {},
70 "sourceUrl": "https://example.com/docs/corrupted_data.csv",
71 "status": "error",
72 "statusMessage": "File corrupted during upload",
73 "textUrl": "https://storage.groundx.ai/texts/corrupted_data.txt",
74 "xrayUrl": "https://storage.groundx.ai/xray/corrupted_data.json"
75 }
76 ],
77 "total": 1
78 },
79 "processing": {
80 "documents": [
81 {
82 "documentId": "9f8e7d6c-5b4a-3c2d-1e0f-9a8b7c6d5e4f",
83 "bucketId": 7,
84 "fileName": "project_plan.pptx",
85 "fileSize": "3.1MB",
86 "fileType": "pptx",
87 "filter": {
88 "team": "development",
89 "phase": "planning"
90 },
91 "processId": "d290f1ee-6c54-4b01-90e6-d701748f0851",
92 "processLevel": "full",
93 "searchData": {},
94 "sourceUrl": "https://example.com/docs/project_plan.pptx",
95 "status": "processing",
96 "statusMessage": "Currently processing document",
97 "textUrl": "https://storage.groundx.ai/texts/project_plan.txt",
98 "xrayUrl": "https://storage.groundx.ai/xray/project_plan.json"
99 }
100 ],
101 "total": 1
102 },
103 "queued": {
104 "documents": [
105 {
106 "documentId": "2a3b4c5d-6e7f-8a9b-0c1d-2e3f4a5b6c7d",
107 "bucketId": 7,
108 "fileName": "meeting_notes.txt",
109 "fileSize": "0.2MB",
110 "fileType": "txt",
111 "filter": {
112 "meeting": "weekly_sync",
113 "date": "2024-04-20"
114 },
115 "processId": "d290f1ee-6c54-4b01-90e6-d701748f0851",
116 "processLevel": "none",
117 "searchData": {},
118 "sourceUrl": "https://example.com/docs/meeting_notes.txt",
119 "status": "queued",
120 "statusMessage": "Document queued for processing",
121 "textUrl": "https://storage.groundx.ai/texts/meeting_notes.txt",
122 "xrayUrl": "https://storage.groundx.ai/xray/meeting_notes.json"
123 }
124 ],
125 "total": 1
126 }
127 },
128 "statusMessage": "Document deletion completed successfully"
129 }
130}
Delete a single document hosted on GroundX
Was this page helpful?
Previous

delete (multiple)

Next
Built with

Authentication

X-API-Keystring
API Key authentication via header

Path parameters

documentIdstringRequiredformat: "uuid"
A documentId which correspond to a document ingested by GroundX

Response

Document successfully deleted
ingestobject

Errors

400
Bad Request Error
401
Unauthorized Error