Collections API
A Collection is a unit for grouping and managing related assets such as datasets, codes, and pipelines.
1. List Collections
Retrieves a list of all collections.
Request
GET /collections/
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | No | Maximum number of items to retrieve (default: 100) |
token | string | No | Token for pagination |
Response
{
"items": {
"collection-1": "{\"id\": \"collection-1\", \"name\": \"my-collection\", ...}",
"collection-2": "..."
},
"token": "next-page-token"
}
2. Create Collection
Creates a new collection.
Request
POST /collections/
Body Schema (Collection)
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Collection name (unique) |
alias | string | No | Alias (display name) |
type | string | No | Collection type |
groups | array[string] | No | List of groups |
tags | array[string] | No | List of tags |
comment | string | No | Description and notes |
Example
{
"name": "marketing_data",
"alias": "Marketing Data",
"tags": ["marketing", "2024"],
"comment": "Collection for marketing department"
}
Response
{
"item": "collection-uuid-1234"
}
3. Get Collection
Retrieves detailed information of a specific collection.
Request
GET /collections/{collection_id}
| Parameter | Type | Required | Description |
|---|---|---|---|
collection_id | string | Yes | Collection ID |
collection_version | string | No | Used for querying specific versions |
Response
{
"id": "collection-uuid-1234",
"name": "marketing_data",
"alias": "Marketing Data",
"category": "collection",
"created_at": 1704067200000,
"updated_at": 1704067200000,
...
}
4. Update Collection
Updates collection information.
Request
PUT /collections/{collection_id}
Body Schema (CollectionUpdate)
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Change name |
alias | string | No | Change alias |
type | string | No | Change type |
groups | array[string] | No | Replace entire group list |
tags | array[string] | No | Replace entire tag list |
comment | string | No | Change description |
Example
{
"alias": "Marketing Data (Updated)",
"tags": ["marketing", "updated"]
}
5. Delete Collection
Deletes a collection. Upon deletion, the collection name is also removed from the group information of assets belonging to that collection.
Request
DELETE /collections/{collection_id}
Response
{
"message": "Collection deleted successfully"
}