Sailfin Registry usage
Read-only endpoints are public. Publishing requires the shared bearer token injected into the API Deployment. Use the Sailfin CLI for end-to-end workflows or cURL for raw API interaction.
Discover artefacts
# Index curl -s https://pkg.sfn.dev/index.json | jq . # Download a capsule package curl -LO https://pkg.sfn.dev/capsules/sfn/http/0.11.2.sfnpkg
Publish with sfn
export PUBLISH_TOKEN=... # retrieve from registry-publish secret sfn publish --registry https://pkg.sfn.dev --capsule myscope/tooling --version 0.2.0
Raw API publish
cat > payload.json <<'JSON'
{
"type": "capsule",
"capsule": "myscope/example",
"version": "0.0.1",
"digest": "sha256:$(shasum -a 256 artefact.sfnpkg | cut -d' ' -f1)",
"content_b64": "$(openssl base64 -A -in artefact.sfnpkg)"
}
JSON
curl -X POST https://pkg.sfn.dev/publish -H "Authorization: Bearer $PUBLISH_TOKEN" -H "Content-Type: application/json" --data-binary @payload.jsonTroubleshooting
- 401 Unauthorized: verify the bearer token matches the
registry-publishsecret and that the pod sees it asPUBLISH_TOKEN. - 404 Not Found: ensure the capsule scope/name and version match the index or check if the artefact exists on disk under
/data/registry. - Digest mismatch: recompute the SHA-256 digest locally before uploading; the API stores the provided value verbatim for provenance checks.