Skip to content

Upload a Scan

Upload a scan to Structure Cloud using a POST request to the /scans endpoint.

Note

At this time, only PLY foot files are accepted.

curl -X "POST" \
    "https://cloud.structure.io/api/v0.1/scans" \
    -H "accept: application/json" \
    -H "Authorization: Bearer $SCP_TOKEN" \
    -H "Content-Type: multipart/form-data" \
    -F 'scan_info={
    "kind": "foot",
    "format": "ply",
    "labels": ["left"]
    }' \
    -F 'scan_data=@foot_scan.ply'
scan_info = {
    "kind": "foot",
    "format": "ply",
    "labels": ["left"]
}

response = session.post(
    "https://cloud.structure.io/api/v0.1/scans",
    data={"scan_info": json.dumps(scan_info)},
    files={"scan_data": open("foot_scan.ply", "rb")},
)