Skip to main content

Manage Datasets and Entries

Once documents are uploaded, you will need to correct them, retitle them, and eventually remove them. This guide covers updating and deleting datasets and entries, what a deletion actually removes, and the points where it is not instantaneous.

Where the data lives​

A dataset and its entries exist in two places:

WhereWhat it holdsRole
The data clusterThe dataset and entry records, the files in object storage, the vectors, the search indexThe source of truth. Updates and deletions are made here.
The platform catalogA mirror of each dataset and entry (name, status, size, ownership), used for discovery, billing and access rulesKept up to date by the cluster, asynchronously.

You manage datasets and entries through the cluster's Data API, reached through the platform's cluster proxy:

/clusters/{cluster_id}/proxy/api/v1/...

The dashboard's edit and delete actions on a dataset or an entry use these same routes. The calls need write access to the cluster: a token that carries the cluster:write ability and a user who may write to the cluster's organization.

Delete on the cluster, not in the catalog

The Platform API also has PATCH/DELETE /datasets/{dataset_id} and PATCH/DELETE /entries/{entry_id}. They act on the catalog mirror only and never reach the cluster: its files, vectors and search index stay where they are. A catalog-only deletion also does not stick: the next time the cluster reports that dataset or entry, the catalog row can come back. To remove data, always delete it on the cluster as shown below.

Update a dataset​

PATCH /api/v1/datasets/{dataset_id} changes any combination of name, slug, description and dataset_type. Fields you leave out are unchanged.

curl -X PATCH https://api.alien.club/clusters/17/proxy/api/v1/datasets/303 \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ "name": "Product Manuals 2026", "description": "Technical documentation for all product lines" }'

The dataset's version is increased with every update, the keyword-search index is refreshed with the new name and description, and the catalog follows shortly after.

To change the fields entries must carry, update the schema instead with PATCH /api/v1/datasets/{dataset_id}/schema. The schema version is bumped for you (v3 becomes v4), and existing entries are not rewritten: they can be identified as needing reprocessing (see Datasets and Entries).

Update an entry​

PATCH /api/v1/entries/{entry_id} changes name, description, status, metadata and error_message. Fields you leave out are unchanged.

curl -X PATCH https://api.alien.club/clusters/17/proxy/api/v1/entries/123456 \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ "name": "paper-2024-001-v2.pdf", "metadata": { "title": "Corrected title", "doi": "10.1234/abcd" } }'
  • metadata replaces the entry's original metadata as a whole: send every field you want to keep.
  • Every update increments the entry's version.
  • Changing metadata does not re-run the pipeline. To process an entry again after changing its files or the dataset's pipeline, trigger it with POST /api/v1/entries/{entry_id}/trigger-pipeline (see Upload Documents).
  • To replace the document itself, upload the new file to the entry (POST /api/v1/entries/{entry_id}/upload) and process it again.
  • POST /api/v1/entries/{entry_id}/move moves an entry, with its files, to another dataset of the same cluster.

Guard against concurrent writers​

Add if_version to apply the update only if nobody changed the entry since you read it:

{ "status": "error", "error_message": "Stuck in OCR", "if_version": 7 }

If the entry is no longer at version 7 the call answers 409 and changes nothing. Use it whenever your update depends on what you read, for example a job that marks entries as failed: without it, a slow job can overwrite the result of a pipeline that finished in the meantime.

Delete an entry​

curl -X DELETE https://api.alien.club/clusters/17/proxy/api/v1/entries/123456 \
-H "Authorization: Bearer $TOKEN"

Deletion is permanent. The cluster removes, in this order:

  1. The entry's files in object storage (original, processed and figures).
  2. Its vectors in the vector database.
  3. Its documents in the keyword-search index.
  4. The entry record itself.

On success the answer lists what was cleaned up:

{
"message": "Entry 123456 deleted successfully",
"cleanup_status": { "storage": true, "qdrant": true, "meilisearch": true, "database": true, "webhook": true }
}
StatusMeaning
200The entry is gone.
404The entry does not exist (already deleted, or never existed).
409A blocking step (storage, vectors or database) failed. The entry is kept and set to the error status. The body names the failed_components. Fix the cause and delete again.
503Object storage refused the cluster's access. The entry is untouched.

What is not instantaneous​

  • The keyword-search index is the one step that never blocks a deletion. If it cannot be updated right then, the entry is deleted anyway and the removal is queued for repair. Until the repair lands, a keyword search can still return the deleted entry, while reading it answers 404. The same applies to a dataset's own document in the datasets index. cleanup_status.meilisearch is false in that case.
  • The platform catalog learns about the deletion from the cluster's next sync, usually within seconds, with retries if the platform is briefly unreachable. Until then the catalog still lists the entry, and the entry counters can lag.

Delete a dataset​

curl -X DELETE https://api.alien.club/clusters/17/proxy/api/v1/datasets/303 \
-H "Authorization: Bearer $TOKEN"

Deleting a dataset is a cascade: the cluster deletes every weight and every entry of the dataset one by one (files, vectors, search documents, as above), and only then the dataset itself. It answers 204 with no body once everything is gone.

  • If a step fails for an entry, the cascade stops, the dataset is kept and the answer is 409 with the entries already deleted and the errors found. Entries that were deleted stay deleted. Fix the cause and send the same request again: it resumes.
  • Entries in the error status are what usually blocks a cascade. ?force=true deletes them anyway even if their external cleanup fails. This can leave orphaned files, vectors or search documents behind, so use it only to clear a stuck dataset.
  • If the cluster's object storage refuses access, or the cascade exceeds its time budget (15 minutes by default), the answer is 503, the dataset is kept, and a repeat resumes where it stopped.

Large datasets: the delete can outlive your request​

The cascade runs synchronously on the cluster, and its duration grows with the number of entries. Through the proxy, a DELETE is allowed 110 seconds. A bigger dataset exceeds that, and you receive:

{
"success": false,
"message": "Cluster 'my-cluster' did not answer the DELETE within 110s, it may still complete it. Check the resource before sending it again.",
"error": { "status": 504, "name": "CLUSTER_REQUEST_TIMEOUT" }
}

This does not mean the deletion failed or was cancelled. The cluster keeps working after the proxy has given up, so the dataset may be gone a moment later. The platform never resends a DELETE for you. To finish safely:

  1. Check before you repeat. GET /clusters/{cluster_id}/proxy/api/v1/datasets/{dataset_id}. A 404 means the delete completed. Otherwise the dataset is still being emptied, or was kept (see below).
  2. Wait, and read the entry count. While the cascade runs, the dataset's entry_count falls. If it stops falling and the dataset is still there, the cascade stopped.
  3. Repeat the same DELETE. It is safe to do so: each entry is deleted on its own, so the request resumes with what is left.

If you need a result you can wait for, delete the entries of a large dataset in batches first (list them, then DELETE each one), and delete the empty dataset last: that last call is fast.

Retired in the catalog, not erased​

When the cluster reports a dataset as deleted, the platform retires the catalog row instead of erasing it, because past requests and invoices refer to it. A retired dataset no longer appears in listings or search, and its name and slug are free again. Billing history for it is kept.

Summary​

You want toCall (under /clusters/{cluster_id}/proxy)Notes
Rename or redescribe a datasetPATCH /api/v1/datasets/{dataset_id}Name, slug, description, type.
Change a dataset's schemaPATCH /api/v1/datasets/{dataset_id}/schemaVersion bumped automatically.
Correct an entryPATCH /api/v1/entries/{entry_id}Use if_version to guard against races.
Delete an entryDELETE /api/v1/entries/{entry_id}Permanent. Search can lag briefly.
Delete a datasetDELETE /api/v1/datasets/{dataset_id}Cascade. 504 is not a failure: check, then repeat.

What's Next​