Delete an ingest job for the authenticated organization.
import { Agentset } from "agentset";
const agentset = new Agentset({ apiKey: 'agentset_xxx' });
const ns = agentset.namespace('ns_xxx');
await ns.ingestion.delete("job_123");
console.log("Ingest job deleted successfully");{
"success": true,
"data": {
"id": "<string>",
"namespaceId": "<string>",
"tenantId": "<string>",
"externalId": "<string>",
"status": "BACKLOG",
"error": "<string>",
"payload": {
"type": "<string>",
"text": "<string>",
"fileName": "<string>"
},
"config": {
"chunkSize": 4503599627370512,
"metadata": {},
"languageCode": "af",
"forceOcr": true,
"mode": "fast",
"disableImageExtraction": true,
"disableOcrMath": true,
"useLlm": true,
"chunkOverlap": 123,
"maxChunkSize": 123,
"chunkingStrategy": "basic",
"strategy": "auto"
},
"createdAt": "<string>",
"queuedAt": "<string>",
"preProcessingAt": "<string>",
"processingAt": "<string>",
"completedAt": "<string>",
"failedAt": "<string>",
"name": "<string>"
}
}Default authentication mechanism
Optional tenant id to use for the request. If not provided, the namespace will be used directly. Must be alphanumeric and up to 64 characters. Optional tenant id to use for the request. If not provided, the namespace will be used directly. Must be alphanumeric and up to 64 characters.
The id of the namespace (prefixed with ns_) The id of the namespace (prefixed with ns_)
The id of the job (prefixed with job_) The id of the job (prefixed with job_)
The deleted ingest job
Show child attributes
The unique ID of the ingest job.
The namespace ID of the ingest job.
The tenant ID of the ingest job.
A unique external ID of the ingest job. You can use this to identify the ingest job in your system.
The status of the ingest job.
BACKLOG, QUEUED, QUEUED_FOR_RESYNC, QUEUED_FOR_DELETE, PRE_PROCESSING, PROCESSING, DELETING, CANCELLING, COMPLETED, FAILED, CANCELLED The error message of the ingest job. Only exists when the status is failed.
The ingest job config.
Show child attributes
Chunk size (in characters). Controls approximately how much text is included in each chunk. Defaults to 2048.
32 <= x <= 9007199254740991Language code to use for text processing (for example, en, ar, or fr). When omitted, the partition API will attempt to detect the language automatically.
af, am, ar, bg, bn, ca, cs, cy, da, de, en, es, et, fa, fi, fr, ga, gl, he, hi, hr, hu, id, is, it, jp, kr, lt, lv, mk, ms, mt, ne, nl, no, pl, pt, ro, ru, sk, sl, sr, sv, sw, ta, te, th, tl, tr, uk, ur, vi, zh, zu Force OCR on the document even if selectable text exists. Useful for scanned documents with unreliable embedded text. Defaults to false.
Processing mode for the parser. fast favors speed, accurate (pro subscription only) favors quality and layout fidelity, and balanced offers a compromise between the two. Defaults to balanced.
fast, balanced, accurate Disable image extraction from the document. When combined with useLlm, images may still be automatically captioned by the partition API. Defaults to false.
Disable inline math recognition in OCR. This can be useful if the document contains content that is frequently misclassified as math. Defaults to false.
Enable LLM-assisted parsing to improve tables, forms, inline math, and layout detection. May increase latency and token usage. Defaults to true.
Custom chunk overlap (in characters) between consecutive chunks. Helps preserve context across chunk boundaries.
[Deprecated] Hard chunk size. This option is ignored by the current partition pipeline and kept only for backwards compatibility.
[Deprecated] The legacy chunking strategy. This option is ignored by the current partition pipeline and kept only for backwards compatibility.
basic, by_title [Deprecated] Legacy processing strategy used by the previous partition API. This option is ignored by the current pipeline and kept only for backwards compatibility.
auto, fast, hi_res, ocr_only The date and time the namespace was created.
The date and time the ingest job was queued.
The date and time the ingest job was pre-processed.
The date and time the ingest job was processed.
The date and time the ingest job was completed.
The date and time the ingest job failed.
The name of the ingest job.
import { Agentset } from "agentset";
const agentset = new Agentset({ apiKey: 'agentset_xxx' });
const ns = agentset.namespace('ns_xxx');
await ns.ingestion.delete("job_123");
console.log("Ingest job deleted successfully");{
"success": true,
"data": {
"id": "<string>",
"namespaceId": "<string>",
"tenantId": "<string>",
"externalId": "<string>",
"status": "BACKLOG",
"error": "<string>",
"payload": {
"type": "<string>",
"text": "<string>",
"fileName": "<string>"
},
"config": {
"chunkSize": 4503599627370512,
"metadata": {},
"languageCode": "af",
"forceOcr": true,
"mode": "fast",
"disableImageExtraction": true,
"disableOcrMath": true,
"useLlm": true,
"chunkOverlap": 123,
"maxChunkSize": 123,
"chunkingStrategy": "basic",
"strategy": "auto"
},
"createdAt": "<string>",
"queuedAt": "<string>",
"preProcessingAt": "<string>",
"processingAt": "<string>",
"completedAt": "<string>",
"failedAt": "<string>",
"name": "<string>"
}
}