콘텐츠로 이동

Data Bundle 생성

캡처 데이터를 업로드하기 전에, 특정 캡처 디바이스에 연결된 빈 data bundle이 필요합니다. 생성은 2단계 플로입니다. data bundle 디바이스 입력 트리를 가져온 다음, 선택한 리프 디바이스의 완전히 확인된 dbuPath로 번들을 생성합니다. 입력 트리는 한 번의 호출로 반환됩니다. 리프에 도달할 때까지 로컬에서(namechildren으로) 트리를 탐색하세요. 리프 노드는 생성 시 전달하는 dbuPath 문자열을 가지고 있으며, 브랜치 노드는 dbuPath: null입니다.


메서드경로스코프목적
GET/v1/organization/{organizationId}/data-bundle-input-treeread:bundle디바이스 입력 트리 가져오기
POST/v1/nodes/{parentId}/bundlewrite:bundledata bundle 생성
GET {api_url}/v1/organization/{organizationId}/data-bundle-input-tree
Authorization: Bearer {access_token}

응답은 중첩된 트리입니다. 각 노드에는 다음이 포함됩니다.

필드의미
name경로를 만드는 데 사용되는 안정적인 식별자
label사람이 읽을 수 있는 표시 이름
isLeaf노드가 선택 가능한 캡처 디바이스일 때 true
dbuPath리프 노드에서 완전히 확인된 디바이스 경로. 브랜치에서는 null
children자식 노드(리프에서는 빈 배열)

예시(축약됨):

{
"nodes": [
{
"name": "POINTCLOUD",
"label": "Point Cloud",
"isLeaf": false,
"dbuPath": null,
"children": [
{
"name": "ZF",
"label": "ZF",
"isLeaf": false,
"dbuPath": null,
"children": [
{
"name": "ZFSLAM",
"label": "ZF SLAM",
"isLeaf": true,
"dbuPath": "POINTCLOUD/ZF/ZFSLAM",
"children": []
}
]
}
]
}
]
}

isLeaftrue가 될 때까지 트리를 탐색한 다음 dbuPath(여기서는 POINTCLOUD/ZF/ZFSLAM)를 복사하세요.

권한이 있는 상위 노드(일반적으로 사이트 또는 폴더) 아래에 번들을 생성합니다. 번들 이름과 1단계의 리프 dbuPath를 전달하세요.

POST {api_url}/v1/nodes/{parentId}/bundle
Authorization: Bearer {access_token}
Content-Type: application/json
{ "name": "ZF capture 2026-06-01", "dbuPath": "POINTCLOUD/ZF/ZFSLAM" }
{
"id": "a6f75b3c-f261-4b27-9a2a-9a6cc1234c53",
"name": "ZF capture 2026-01-01",
"dbuPath": "POINTCLOUD/ZF/ZFSLAM"
}

반환된 id를 업로드, 처리, 다운로드 단계에서 bundleId로 사용하세요.

상태원인
400 Bad RequestdbuPath가 알 수 없거나, 리프가 아니거나, 사용할 수 없음
403 Forbidden상위 노드에 대한 권한이 없거나 콘텐츠 접근 권한이 없음
import requests
API_URL = "https://<your-regional-api-url>"
TOKEN = "<access_token>"
ORG_ID = "<organization_id>"
PARENT_ID = "<site-or-folder-id>"
headers = {"Authorization": f"Bearer {TOKEN}"}
tree = requests.get(
f"{API_URL}/v1/organization/{ORG_ID}/data-bundle-input-tree",
headers=headers,
).json()
# Walk the tree to find the ZF SLAM leaf (your navigation logic may differ).
def find_dbu_path(nodes, *path):
node = nodes
for segment in path:
node = next(n for n in node if n["name"] == segment)
node = node["children"]
leaf = node[0]
assert leaf["isLeaf"]
return leaf["dbuPath"]
dbu_path = find_dbu_path(tree["nodes"], "POINTCLOUD", "ZF", "ZFSLAM")
bundle = requests.post(
f"{API_URL}/v1/nodes/{PARENT_ID}/bundle",
headers=headers,
json={"name": "ZF capture 2026-01-01", "dbuPath": dbu_path},
).json()
bundle_id = bundle["id"]
print(f"Created bundle {bundle_id} for device {bundle['dbuPath']}")

bundleId를 확보했다면, Data Bundle에 데이터 업로드로 계속 진행하세요.