API reference

Blobs

Content-addressed blobs: declare one inline or through a presigned upload, check it exists, and download it.

POST/v1/ci/blobs

Declare a blob

Declare a blob inline or get a presigned put.

Permission: ci:blobs.write

Request body

data_b64string or null
digeststringRequired
sha-256 digest as sha256:<64 hex>
kindstringRequired
One of diff, manifest, junit, outputs, archive, upload, tree
media_typestringRequired
sizeintegerRequired

Response201 Created

committedboolean
existsboolean
uploadobject or null
a presigned put
upload.expires_atstring (date-time)Required
upload.headersmap of string
upload.methodstringRequired
upload.urlstringRequired
curl -X POST "$CIRESK_API/v1/ci/blobs" \
  -H "Authorization: Bearer $CIRESK_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "data_b64": "acme/platform",
    "digest": "sha256:c21fa32a40d82233c44e76e6ae776b4d403ac1a564ca26de95a14c6bb47eaf49",
    "kind": "diff",
    "media_type": "application/zstd",
    "size": 18432000
  }'
GET/v1/ci/blobs/{digest}

Get a blob

Blob metadata and a presigned download.

Permission: ci:blobs.read

Parameters

NameTypeRequiredDescription
digestpathstringRequiredThe blob's digest: sha256:<64 hex>.

Response200 OK

digeststringRequired
sha-256 digest as sha256:<64 hex>
downloadobjectRequired
a presigned get
download.expires_atstring (date-time)Required
download.urlstringRequired
media_typestringRequired
sizeintegerRequired
curl "$CIRESK_API/v1/ci/blobs/sha256:181d6cb8f9e37b5f3cef1b5564e4919abe24a10634c4f54f3ba6c458aebddbb8" \
  -H "Authorization: Bearer $CIRESK_KEY"
HEAD/v1/ci/blobs/{digest}

Check a blob exists

Does the tenant hold this blob.

Permission: ci:blobs.read

Parameters

NameTypeRequiredDescription
digestpathstringRequiredThe blob's digest: sha256:<64 hex>.

Response200 OK

curl -I "$CIRESK_API/v1/ci/blobs/sha256:181d6cb8f9e37b5f3cef1b5564e4919abe24a10634c4f54f3ba6c458aebddbb8" \
  -H "Authorization: Bearer $CIRESK_KEY"
POST/v1/ci/blobs/{digest}/commit

Commit a presigned upload

Verify a presigned upload landed.

Permission: ci:blobs.writeCommand: send Idempotency-Key

Parameters

NameTypeRequiredDescription
digestpathstringRequiredThe blob's digest: sha256:<64 hex>.
Idempotency-KeyheaderstringRequired

Response201 Created

digeststringRequired
sha-256 digest as sha256:<64 hex>
sizeintegerRequired
verifiedbooleanRequired
curl -X POST "$CIRESK_API/v1/ci/blobs/sha256:181d6cb8f9e37b5f3cef1b5564e4919abe24a10634c4f54f3ba6c458aebddbb8/commit" \
  -H "Authorization: Bearer $CIRESK_KEY" \
  -H "Idempotency-Key: eac5ccf8-e726-49cd-9469-378e633879e3"