Loading...
Loading...
Search, get, create, upload (single & multipart), update, and delete files in Spuree projects with checksum-verified upload flow
npx skill4agent add cheehoolabs/spureeskills file-managementsessionTypecreative_projectsessionAuthorization: Bearer $SPUREE_ACCESS_TOKENX-API-Key: $SPUREE_API_KEY| Base URL | Endpoints |
|---|---|
| File CRUD |
| Cross-project search |
| Parameter | Type | Default | Description |
|---|---|---|---|
| string | — | Search query (1–255 chars) |
| string | — | Filter: |
| string | — | Restrict results to a specific workspace |
| integer | 100 | Max results (1–100) |
{ "data": [...], "count": N }type"file""session"idnamesessionTypeworkspaceIdcreatedAtupdatedAtidfileNamefileFormatmimeTypesizeworkspaceIdsessionIdentitySessionIdcreatedAtupdatedAtcurl "https://data.spuree.com/api/v1/search?q=hero" \
-H "Authorization: Bearer $SPUREE_ACCESS_TOKEN"{ "data": { id, fileName, fileFormat, mimeType, size, workspaceId, sessionId, entitySessionId, downloadUrl, createdAt, updatedAt } }curl "https://data.spuree.com/api/v1/files/{fileId}" \
-H "Authorization: Bearer $SPUREE_ACCESS_TOKEN"mode: "single"mode: "multipart"POST /v1/files/{fileId}/upload/complete| Field | Type | Required | Description |
|---|---|---|---|
| string | Yes | File name without extension |
| string | Yes | Extension in lowercase (e.g., |
| integer | Yes | File size in bytes (accepts string for backward compat) |
| string | Yes | Target project or folder ObjectId |
| string | No | CRC32 base64 (8 chars) for end-to-end verification. When provided, the presigned URL is signed with the checksum and S3 verifies the upload matches. |
{ messageCode, fileId, mode: "single", uploadUrl, checksumBase64, contentType }{ messageCode, fileId, mode: "multipart", parts: [{partNumber, startByte, endByte, url}, ...], totalParts, expiresAt }| Code | Description |
|---|---|
| 200 | Record created, presigned URL(s) returned |
| 404 | Session not found |
| 409 | File already exists |
curl -X POST "https://data.spuree.com/api/v1/files" \
-H "Authorization: Bearer $SPUREE_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"fileName":"hero_walk","fileFormat":"fbx","fileSize":5242880,"sessionId":"...","checksum":"AAAAAA=="}'uploadIdListPartsCompleteMultipartUpload| Field | Type | Required | Description |
|---|---|---|---|
| string | Yes | Must match path parameter |
| string | No | Client-computed CRC32 for end-to-end verification |
{ messageCode, fileId, checksum, checksumCRC32 }checksumchecksumCRC32curl -X POST "https://data.spuree.com/api/v1/files/{fileId}/upload/complete" \
-H "Authorization: Bearer $SPUREE_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"fileId": "..."}'| Field | Type | Description |
|---|---|---|
| string | New name (without extension) |
| string | New extension (lowercase) |
| string | CRC32 base64 (write-once backfill, no edit permission needed) |
| string | Move to target project or folder |
creative_projectsession{ messageCode, fileId }| Code | Description |
|---|---|
| 200 | Updated |
| 409 | Filename conflict in target |
curl -X PATCH "https://data.spuree.com/api/v1/files/{fileId}" \
-H "Authorization: Bearer $SPUREE_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"fileName": "hero_run_cycle"}'POST /v1/filesfileSize| Field | Type | Required | Description |
|---|---|---|---|
| string | Yes | CRC32 base64 of current content (for conflict detection) |
| string | Yes | CRC32 base64 of new content to upload |
| integer | No | Size in bytes. If ≥ 100 MB, returns multipart mode. |
{ messageCode, fileId, mode: "single", uploadUrl, checksumBase64, contentType }{ messageCode, fileId, mode: "multipart", parts: [{partNumber, startByte, endByte, url}, ...], totalParts, expiresAt }POST /v1/files/{fileId}/upload/complete| Code | Description |
|---|---|
| 200 | Lock acquired, presigned URL(s) returned |
| 409 | Checksum mismatch or locked by another user |
curl -X PUT "https://data.spuree.com/api/v1/files/{fileId}" \
-H "Authorization: Bearer $SPUREE_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"expectedChecksum": "a1b2...","newChecksum": "f6e5..."}'| Parameter | Type | Required | Description |
|---|---|---|---|
| string | No | Client's expected uploadId for mismatch detection |
| string | No | Client's expected pendingChecksum for conflict detection |
{ messageCode, fileId, completedParts: [{partNumber, etag, size}, ...], remainingParts: [{partNumber, startByte, endByte, url}, ...], totalParts }| Code | Description |
|---|---|
| 200 | Success |
| 400 | No active multipart upload |
| 409 | Not in pending status or locked by another user |
curl "https://data.spuree.com/api/v1/files/{fileId}/upload" \
-H "Authorization: Bearer $SPUREE_ACCESS_TOKEN"{ "partNumbers": [1, 3, 5] }{ messageCode, urls: [{partNumber, startByte, endByte, url}, ...] }| Code | Description |
|---|---|
| 200 | Success |
| 400 | No active multipart upload or invalid part numbers |
curl -X POST "https://data.spuree.com/api/v1/files/{fileId}/upload/urls" \
-H "Authorization: Bearer $SPUREE_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"partNumbers": [1, 3, 5]}'{ messageCode, fileId, message }| Code | Description |
|---|---|
| 200 | Aborted |
| 400 | No active multipart upload |
curl -X DELETE "https://data.spuree.com/api/v1/files/{fileId}/upload" \
-H "Authorization: Bearer $SPUREE_ACCESS_TOKEN"{ messageCode, fileId }curl -X DELETE "https://data.spuree.com/api/v1/files/{fileId}" \
-H "Authorization: Bearer $SPUREE_ACCESS_TOKEN"CHECKSUM=$(python3 -c "import base64, zlib, sys; print(base64.b64encode(zlib.crc32(open('$FILE_PATH','rb').read()).to_bytes(4,'big')).decode())")sessionIdPOST /v1/files { fileName, fileFormat, fileSize, sessionId, checksum }
→ { fileId, mode: "single", uploadUrl, checksumBase64, contentType }PUT {uploadUrl}
Content-Type: {contentType}
x-amz-checksum-crc32: {checksumBase64}
Body: <file binary>POST /v1/files/{fileId}/upload/completeImportant: All three steps (create → S3 upload → complete) must be performed. Skipping complete leaves the file in a pending state.
fileSizePOST /v1/files { fileName, fileFormat, fileSize, sessionId, checksum }
→ { fileId, mode: "multipart", parts: [{partNumber, startByte, endByte, url}, ...], totalParts, expiresAt }PUT {part.url}
Content-Length: {part.endByte - part.startByte + 1}
Body: <file slice from startByte to endByte>GET /v1/files/{fileId}/uploadPOST /v1/files/{fileId}/upload/urlsCompleteMultipartUploadPOST /v1/files/{fileId}/upload/completeDELETE /v1/files/{fileId}/uploadPUT /v1/files/{fileId}fileSizePOST /v1/files/{fileId}/upload/completenavigate_page → https://studio.spuree.com/file/{fileId}https://studio.spuree.com/file/{fileId}| Use case | URL | Properties |
|---|---|---|
| Share with user / preview | | Permanent, permission-aware, renders preview UI |
| Programmatic download | | Short-lived presigned S3 URL — do not share, bypasses permissions and expires |
POST /v1/filesGET /v1/searchfileIddownloadUrlGET /v1/search?q=hero_walkGET /v1/files/{fileId}downloadUrlsessionIdcreative_projectsessionworks_{workspaceId}/sess_{sessionId}/file_{fileId}| Resource | URL Pattern |
|---|---|
| Project | |
| Folder (top-level) | |
| Folder (nested) | |
| File | |
| Code | Cause | Resolution |
|---|---|---|
| 400 | Invalid checksum format, missing fields, bad ID | Fix input format |
| 403 | No workspace access or edit permission | Check permissions |
| 404 | File or session not found | Verify IDs |
| 409 (checksum mismatch) | File modified by another user | Re-fetch checksum, retry |
| 409 (upload lock) | Another user is uploading | Wait (lock expires in 1 hour for single, 6 hours for multipart) |
| 409 (filename conflict) | Same name exists in target | Use different name or target |
| 401 | Invalid or expired token | Refresh via authentication skill |