D
DreamLake

API Reference

Datasets

A Dataset is a named container that groups related Collections together. Space-scoped.

Space
├── Dataset "training-v2"
│   ├── Collection "front-camera-clips"
│   └── Collection "good-detections"
└── Dataset "eval-set"
    └── Collection "edge-cases"

POST /namespaces/:slug/projects/:projectSlug/datasets

Create a dataset.

PropertyValue
AuthJWT
DB roundtrips3
#QueryCondition
1namespace.findUnique({ slug })Always
2space.findFirst({ nameprojectId, slug })Always
3dataset.create()Always

Body

FieldTypeRequiredDescription
namestringYesDataset name (unique within space)
descriptionstringNoDescription
tagsstring[]NoTags
metadataobjectNoArbitrary metadata

Response 201

{
  "id": "dataset-id",
  "name": "training-v2",
  "description": "Q1 training data",
  "tags": [],
  "projectId": "space-id",
  "metadata": null,
  "createdAt": "2026-04-15T...",
  "updatedAt": "2026-04-15T..."
}

Errors

StatusCondition
400name missing
404Namespace / project not found
409Dataset name already exists in this project

GET /namespaces/:slug/projects/:projectSlug/datasets

List datasets with pagination.

PropertyValue
AuthJWT
DB roundtrips4 (3 effective)
#QueryConditionParallel
1namespace.findUnique({ slug })Always
2space.findFirst({ nameprojectId, slug })Always
3dataset.findMany({ projectId })Always
4dataset.count({ projectId })Always

Query

ParamTypeDefaultDescription
pagenumber1Page number (1-based)
pageSizenumber50Items per page (max 200)

Response 200

{
  "datasets": [
    { "id": "...", "name": "training-v2", "description": "Q1 training data", "tags": [] }
  ],
  "page": 1,
  "pageSize": 50,
  "total": 1,
  "totalPages": 1
}

GET /namespaces/:slug/projects/:projectSlug/datasets/:name

Get a dataset with all its collections.

PropertyValue
AuthJWT
DB roundtrips4
#QueryCondition
1namespace.findUnique({ slug })Always
2space.findFirst({ nameprojectId, slug })Always
3dataset.findFirst({ projectId, name })Always
4collection.findMany({ datasetId })Always

Response 200

{
  "id": "dataset-id",
  "name": "training-v2",
  "description": "Q1 training data",
  "tags": [],
  "collections": [
    { "id": "...", "name": "front-camera-clips", "members": ["nodeId1", "nodeId2"] },
    { "id": "...", "name": "good-detections", "members": ["nodeId3"] }
  ]
}

Errors

StatusCondition
404Namespace /project / dataset not found

PATCH /namespaces/:slug/projects/:projectSlug/datasets/:name

Update a dataset. Only provided fields are updated.

PropertyValue
AuthJWT
DB roundtrips4

Body (all optional)

FieldTypeDescription
namestringNew name
descriptionstringDescription
tagsstring[]Tags
metadataobjectMetadata

Response 200 — updated dataset object.

Errors

StatusCondition
404Dataset not found

DELETE /namespaces/:slug/projects/:projectSlug/datasets/:name

Soft-delete a dataset. Collections inside are NOT deleted — they become standalone.

PropertyValue
AuthJWT
DB roundtrips4

Response 200{ "success": true }

Errors

StatusCondition
404Dataset not found