Collections API
컬렉션(Collection)은 데이터셋, 코드, 파이프라인 등 관련된 자산들을 그룹화하여 관리하는 단위입니다.
1. List Collections
모든 컬렉션 목록을 조회합니다.
Request
GET /collections/
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | No | 조회할 최대 항목 수 (기본값: 100) |
token | string | No | 페이징을 위한 토큰 |
Response
{
"items": {
"collection-1": "{\"id\": \"collection-1\", \"name\": \"my-collection\", ...}",
"collection-2": "..."
},
"token": "next-page-token"
}
2. Create Collection
새로운 컬렉션을 생성합니다.
Request
POST /collections/
Body Schema (Collection)
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | 컬렉션 이름 (고유값) |
alias | string | No | 별칭 (표시용 이름) |
type | string | No | 컬렉션 유형 |
groups | array[string] | No | 그룹 목록 |
tags | array[string] | No | 태그 목록 |
comment | string | No | 설명 및 주석 |
Example
{
"name": "marketing_data",
"alias": "마케팅 데이터",
"tags": ["marketing", "2024"],
"comment": "마케팅 부서 전용 컬렉션"
}
Response
{
"item": "collection-uuid-1234"
}
3. Get Collection
특정 컬렉션의 상세 정보를 조회합니다.
Request
GET /collections/{collection_id}
| Parameter | Type | Required | Description |
|---|---|---|---|
collection_id | string | Yes | 컬렉션 ID |
collection_version | string | No | 특정 버전 조회 시 사용 |
Response
{
"id": "collection-uuid-1234",
"name": "marketing_data",
"alias": "마케팅 데이터",
"category": "collection",
"created_at": 1704067200000,
"updated_at": 1704067200000,
...
}
4. Update Collection
컬렉션 정보를 수정합니다.
Request
PUT /collections/{collection_id}
Body Schema (CollectionUpdate)
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | 이름 변경 |
alias | string | No | 별칭 변경 |
type | string | No | 유형 변경 |
groups | array[string] | No | 그룹 목록 전체 교체 |
tags | array[string] | No | 태그 목록 전체 교체 |
comment | string | No | 설명 변경 |
Example
{
"alias": "마케팅 데이터 (수정됨)",
"tags": ["marketing", "updated"]
}
5. Delete Collection
컬렉션을 삭제합니다. 삭제 시 해당 컬렉션에 속한 자산들의 그룹 정보에서도 컬렉션 이름이 제거됩니다.
Request
DELETE /collections/{collection_id}
Response
{
"message": "Collection deleted successfully"
}