Skip to main content
DELETE
/
v1
/
namespace
/
{namespaceId}
/
ingest-jobs
/
{jobId}
TypeScript
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>",
    "name": "<string>",
    "namespaceId": "<string>",
    "tenantId": "<string>",
    "externalId": "<string>",
    "status": "BACKLOG",
    "error": "<string>",
    "payload": {
      "type": "<string>",
      "text": "<string>",
      "fileName": "<string>"
    },
    "config": {
      "chunkSize": 123,
      "maxChunkSize": 123,
      "chunkOverlap": 123,
      "metadata": {},
      "chunkingStrategy": "basic",
      "strategy": "auto"
    },
    "createdAt": "<string>",
    "queuedAt": "<string>",
    "preProcessingAt": "<string>",
    "processingAt": "<string>",
    "completedAt": "<string>",
    "failedAt": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Default authentication mechanism

Headers

x-tenant-id
string

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.

Path Parameters

namespaceId
string
required

The id of the namespace (prefixed with ns_)

Examples:

"ns_123"

jobId
string
required

The id of the job (prefixed with job_)

Examples:

"job_123"

Response

The deleted ingest job

success
boolean
required
data
object
required
I