본문으로 건너뛰기

컨테이너

컨테이너는 서로 다른 리소스를 연결하고 저장하는데 사용됩니다. 표준 RESTful URI를 사용하여 식별되며 HTTP 메서드를 사용하여 데이터를 조작할 수 있습니다.

Note: 컨테이너를 식별하기 위하여 URI 마지막 문자열은 /로 나타냅니다.

MethodURLDescription
GET/{container}/컨테이너에 포함된 자식 컨테이너와 리소스의 리스트를 전달합니다.
POST/{container}/자식 컨테이너를 생성합니다.
PATCH/{container}/컨테이너의 설명을 수정합니다.
DELETE/{container}/(WIP)컨테이너를 삭제합니다.
OPTION/{container}/허용된 작업을 전달합니다.
HEAD/{container}/컨테이너의 메타 정보를 전달합니다.

GET

컨테이너 데이터를 조회할 수 있습니다. query에 따라서 다양한 데이터를 조회할 수 있습니다.

자식 컨테이너 및 리소스 리스트 조회

자식 컨테이너, 리소스를 조회할 수 있습니다. query를 이용하여 하위 리소스에 대한 모든 데이터를 모두 조회할 수 있습니다.

GET /{container}/
GET /{container}/?type=all

Response

200 OK

{
...
"contains": [
{
"type": "BasicContainer",
"uri": "https://alpha-asset.maxverse.io/container/sub-container/"
}
],
"resources": {
"assetResources": [
{
"type": "Asset",
"platform": "windows",
"name": "catalog.json",
"uri": "https://alpha-asset.maxverse.io/container/508f43b6-6f12-42b2-a523-7030cb1656ce?type=asset"
}
],
"commonResources": [
{
"type": "Resource",
"name": "image.jpg",
"uri": "https://alpha-asset.maxverse.io/container/a5eccee3-e200-4777-9acd-1cf8319e7274"
}
]
}
}

메타 데이터 조회

메타 데이터를 조회할 수 있습니다.

GET /{container}/?type=meta

Response

200 OK

{
"_id": "64479e975005c9084b0c5db2",
"uuid": "42190441-fefe-4cce-b7f1-a71d09fc7d05",
"type": "BasicContainer",
"name": "container",
"parents": "/",
"description": "container description",
"owners": ["client-id"]
}

POST

자식 컨테이너를 생성할 수 있습니다.

POST /{container}/

Request

{
"type": "BasicContainer",
"name": "sub-container",
"description": "sub-container-description"
}

Response

201 OK

{
"uuid": "609ede09-37f2-4bcd-adc6-7dc7095c708a",
"uri": "https://alpha-asset.maxverse.io/container/sub-container/"
}

PATCH

컨테이너 설명을 수정할 수 있습니다.

Patch /{container}/

Request

{
"description": "sub-container-description"
}

Response

204 OK

DELETE(WIP)

OPTION

Link Header를 통해 메타 데이터 조회 URI를 전달합니다.

Allow Header를 통해 허용된 HTTP Method를 전달합니다.

API 상세 내용은 API 문서 참고