curl --request DELETE \
--url https://ndi-api.nace.ai/v1/tenants/{external_ref} \
--header 'X-API-Key: <api-key>'{
"created_at": "2023-11-07T05:31:56Z",
"data_retention": "short",
"disabled": true,
"display_name": "<string>",
"external_ref": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"limits": {
"max_concurrent_jobs": 123,
"rpm": 123
},
"retention_tier": "paid"
}{
"created_at": "2023-11-07T05:31:56Z",
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"cost": {
"lines": [
{
"amount_usd": "<string>",
"execution": "fresh",
"operation": "parse",
"quantity": 1,
"unit": "page",
"unit_price_usd": "<string>",
"reuse_reason": "reused_parse"
}
],
"pricing_version": "<string>",
"total_usd": "<string>",
"currency": "USD"
},
"credit_schedule_version": 123,
"credits": 123,
"deleted_at": "2023-11-07T05:31:56Z",
"effort": "<string>",
"error": {
"code": "invalid_request",
"message": "<string>",
"retryable": true,
"detail": {},
"request_id": "<string>"
},
"finished_at": "2023-11-07T05:31:56Z",
"force": true,
"idempotency_key": "<string>",
"kind": "tenant_purge",
"name": "<string>",
"payload_expires_at": "2023-11-07T05:31:56Z",
"progress": {
"items_done": 0,
"items_failed": 0,
"items_total": 123,
"knowledge_graph": {
"countable": true,
"phase_count": 123,
"phase_index": 123,
"documents": 123,
"mentions": 123,
"step": "<string>",
"step_done": 123,
"step_total": 123
},
"routing": {
"final": "fact",
"reason": "<string>",
"router_model": "<string>",
"selected": "fact",
"delegated_wall_ms": 123,
"fact_wall_ms": 123,
"router": {
"kind": "llm"
},
"router_wall_ms": 123
},
"stage": "<string>",
"units_done": 0,
"units_total": 123
},
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"query": "<string>",
"query_scope": {
"type": "workspace"
},
"result": {
"billing_record_kept": true,
"external_ref": "<string>",
"stores": [
{
"remaining": 1,
"store": "jobs"
}
],
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"verified": true,
"result_type": "tenant_purge"
},
"result_state": "available",
"source": {
"upload_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "upload"
},
"started_at": "2023-11-07T05:31:56Z",
"surface": "deep_search",
"units": 0,
"usage": {
"lines": [
{
"credits": 1,
"credits_per_unit": 1,
"multiplier": 2,
"part": "parse",
"quantity": 1,
"unit": "page",
"waiver": {
"part": "parse",
"reason": "reused_parse",
"source_job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
]
},
"usage_final": false,
"usage_finalized_at": "2023-11-07T05:31:56Z",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"code": "invalid_request",
"detail": null,
"message": "Request body has extra fields that this operation does not accept.",
"request_id": "req-01j9k2n3p4q5r6s7t8v9",
"retryable": false
}
}{
"error": {
"code": "invalid_request",
"detail": null,
"message": "Request body has extra fields that this operation does not accept.",
"request_id": "req-01j9k2n3p4q5r6s7t8v9",
"retryable": false
}
}delete_tenant
Disable the tenant and keep its data (default), or with purge=true delete all of it. Cost class: write.
A disabled tenant is re-enabled with PUT and disabled: false. A purge cannot be undone: the
tenant is disabled at once, its jobs are cancelled, and every workspace, file, result, cache entry and
key is deleted. Only the content-free billing record (job ids, kinds, timestamps, units, credits) is
kept. A purge already queued or running is returned as is; one that failed or ended unverified is
started again. Once a purge has verified clean the external_ref no longer resolves, so a repeat of
this call answers tenant_not_found and a later PUT creates a new, empty tenant.
curl --request DELETE \
--url https://ndi-api.nace.ai/v1/tenants/{external_ref} \
--header 'X-API-Key: <api-key>'{
"created_at": "2023-11-07T05:31:56Z",
"data_retention": "short",
"disabled": true,
"display_name": "<string>",
"external_ref": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"limits": {
"max_concurrent_jobs": 123,
"rpm": 123
},
"retention_tier": "paid"
}{
"created_at": "2023-11-07T05:31:56Z",
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"cost": {
"lines": [
{
"amount_usd": "<string>",
"execution": "fresh",
"operation": "parse",
"quantity": 1,
"unit": "page",
"unit_price_usd": "<string>",
"reuse_reason": "reused_parse"
}
],
"pricing_version": "<string>",
"total_usd": "<string>",
"currency": "USD"
},
"credit_schedule_version": 123,
"credits": 123,
"deleted_at": "2023-11-07T05:31:56Z",
"effort": "<string>",
"error": {
"code": "invalid_request",
"message": "<string>",
"retryable": true,
"detail": {},
"request_id": "<string>"
},
"finished_at": "2023-11-07T05:31:56Z",
"force": true,
"idempotency_key": "<string>",
"kind": "tenant_purge",
"name": "<string>",
"payload_expires_at": "2023-11-07T05:31:56Z",
"progress": {
"items_done": 0,
"items_failed": 0,
"items_total": 123,
"knowledge_graph": {
"countable": true,
"phase_count": 123,
"phase_index": 123,
"documents": 123,
"mentions": 123,
"step": "<string>",
"step_done": 123,
"step_total": 123
},
"routing": {
"final": "fact",
"reason": "<string>",
"router_model": "<string>",
"selected": "fact",
"delegated_wall_ms": 123,
"fact_wall_ms": 123,
"router": {
"kind": "llm"
},
"router_wall_ms": 123
},
"stage": "<string>",
"units_done": 0,
"units_total": 123
},
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"query": "<string>",
"query_scope": {
"type": "workspace"
},
"result": {
"billing_record_kept": true,
"external_ref": "<string>",
"stores": [
{
"remaining": 1,
"store": "jobs"
}
],
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"verified": true,
"result_type": "tenant_purge"
},
"result_state": "available",
"source": {
"upload_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "upload"
},
"started_at": "2023-11-07T05:31:56Z",
"surface": "deep_search",
"units": 0,
"usage": {
"lines": [
{
"credits": 1,
"credits_per_unit": 1,
"multiplier": 2,
"part": "parse",
"quantity": 1,
"unit": "page",
"waiver": {
"part": "parse",
"reason": "reused_parse",
"source_job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
]
},
"usage_final": false,
"usage_finalized_at": "2023-11-07T05:31:56Z",
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"code": "invalid_request",
"detail": null,
"message": "Request body has extra fields that this operation does not accept.",
"request_id": "req-01j9k2n3p4q5r6s7t8v9",
"retryable": false
}
}{
"error": {
"code": "invalid_request",
"detail": null,
"message": "Request body has extra fields that this operation does not accept.",
"request_id": "req-01j9k2n3p4q5r6s7t8v9",
"retryable": false
}
}Authorizations
Path Parameters
The partner's own reference for the tenant, such as its account id.
1 - 128^\S(.*\S)?$Query Parameters
True permanently deletes the tenant's data instead of disabling it. Answers 202 with a tenant_purge job to poll on GET /v1/jobs/{job_id} without X-NDI-Tenant.
Response
Successful Response
- Tenant
- TenantPurgeJob
One of the partner's child tenants. Send X-NDI-Tenant: ext:<external_ref> to act for it.
When the tenant was created.
The data-retention setting in force for the tenant. A stored zero_retention reads as short while this deployment does not offer zero retention.
short, zero_retention Whether the tenant is disabled. Its data is kept.
Human-readable name of the tenant.
The partner's own reference for the tenant, unique per partner.
NDI's id for the tenant; X-NDI-Tenant accepts it too.
The limits in force for the tenant.
Show child attributes
Show child attributes
The tenant's account tier for job retention: a paid tenant's job inputs, outputs and processing files are removed 48 hours after the job finishes, a free tenant's 7 days after. A failed or cancelled job counts from the failure or cancel.
paid, free