Retrieve, update, and delete a dataset
Endpoints: GET /api/datasets/{dataset_id}/ PATCH /api/datasets/{dataset_id}/ DELETE /api/datasets/{dataset_id}/
Superadmin: Can READ any dataset across all organizations via JWT. Cannot WRITE via JWT - must use API key for write operations. Regular users: Can only access datasets in their organization.
Defense-in-depth:
Args (PATCH):
Returns (GET 200): { “id”: “dataset_id”, “name”: “Support Conversations - July”, “type”: “sampling”, “description”: “Sampled support chats for July”, “created_at”: “2025-07-26T00:00:00Z”, “updated_at”: “2025-07-27T08:10:00Z”, “organization”: 123, “initial_log_filters”: {“status_code”: {“operator”: “eq”, “value”: 200}}, “unique_organization_ids”: [], “timestamps”: [], “log_count”: 250, “evaluator”: null, “status”: “ready”, “running_status”: “pending”, “running_progress”: 0, “running_at”: null, “completed_annotation_count”: 0 }
Returns (PATCH 200): Same shape as GET with updated fields Returns (DELETE 204): No content
Defense-in-depth: SuperAdminMixin provides queryset routing + object-level ownership.