API Responses
Structure of success envelopes, headers, metadata properties, and certified state signatures.
API Responses
All ICBucket endpoints return standardized HTTP status codes and JSON payloads for control operations, or direct binary streams for file retrieval.
Prerequisites#
- Client that inspects HTTP response status codes.
Success Response Structure#
When uploading or mutating a file, ICBucket returns an envelope with both CDN and on-chain raw URLs:
{
"success": true,
"data": {
"name": "banner.webp",
"path": "assets/banner.webp",
"sizeBytes": 142058,
"contentType": "image/webp",
"publicUrl": "https://cloud.icpay.app/cloud/my-assets/assets/banner.webp",
"rawUrl": "https://6vbhm-nqaaa-aaaan-q6muq-cai.raw.icp0.io/my-assets/assets/banner.webp",
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"createdAt": 1728518400000
}
}Binary Stream Response Headers#
When fetching files via GET /cloud/{bucket}/{file}, headers include:
Content-Type: Original uploaded MIME typeContent-Length: Exact file size in bytesCache-Control: Configured cache policy (e.g.public, max-age=31536000, immutable)X-IC-Certificate: IC boundary node cryptographic witness
Related Pages#
Edit this page on GitLabUpdated recently
Search documentation
Quickly find guides, APIs, and reference docs