Data Bundle 생성
캡처 데이터를 업로드하기 전에, 특정 캡처 디바이스에 연결된 빈 data bundle이 필요합니다. 생성은 2단계 플로입니다. data bundle 디바이스 입력 트리를 가져온 다음, 선택한 리프 디바이스의 완전히 확인된 dbuPath로 번들을 생성합니다. 입력 트리는 한 번의 호출로 반환됩니다. 리프에 도달할 때까지 로컬에서(name과 children으로) 트리를 탐색하세요. 리프 노드는 생성 시 전달하는 dbuPath 문자열을 가지고 있으며, 브랜치 노드는 dbuPath: null입니다.
엔드포인트
섹션 제목: “엔드포인트”| 메서드 | 경로 | 스코프 | 목적 |
|---|---|---|---|
GET | /v1/organization/{organizationId}/data-bundle-input-tree | read:bundle | 디바이스 입력 트리 가져오기 |
POST | /v1/nodes/{parentId}/bundle | write:bundle | data bundle 생성 |
1단계: 입력 트리 가져오기
섹션 제목: “1단계: 입력 트리 가져오기”GET {api_url}/v1/organization/{organizationId}/data-bundle-input-treeAuthorization: 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": [] } ] } ] } ]}isLeaf가 true가 될 때까지 트리를 탐색한 다음 dbuPath(여기서는 POINTCLOUD/ZF/ZFSLAM)를 복사하세요.
2단계: 번들 생성
섹션 제목: “2단계: 번들 생성”권한이 있는 상위 노드(일반적으로 사이트 또는 폴더) 아래에 번들을 생성합니다. 번들 이름과 1단계의 리프 dbuPath를 전달하세요.
POST {api_url}/v1/nodes/{parentId}/bundleAuthorization: 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 Request | dbuPath가 알 수 없거나, 리프가 아니거나, 사용할 수 없음 |
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에 데이터 업로드로 계속 진행하세요.