SWU Packager

Builds signed .swu archives for swupdate on AT Sensors cameras. Package contents are described in YAML manifests; this service exposes the build over a REST API so signing and encryption keys stay in openbao rather than with the caller.

checking API…

API

Every /v1 route requires a bearer token. Builds are asynchronous: submitting returns a job id that you poll until it succeeds, then download the artifact.

Authorization: Bearer <token>
EndpointPurpose
POST /v1/jobs Submit a gzipped tar bundle (job.json + manifest + payload artifacts). The body is the archive — no multipart wrapper. Returns 202 with a job id.
GET /v1/jobs/{id} Poll job state: queued, running, succeeded, failed, cancelled.
DELETE /v1/jobs/{id} Cancel a job and drop its artifacts.
GET /v1/jobs/{id}/artifacts/{name} Download a finished .swu. Artifacts expire, so fetch them promptly.
GET /healthz Liveness: the process is serving HTTP. No token required.
GET /readyz Readiness: openbao reachable, token valid, signing material on disk. 503 when not. No token required. Check this before submitting — a process that is live but not ready answers 200 on /healthz and then fails every build. This is what the indicator above calls.

Submitting a build

tar czf bundle.tar.gz job.json package.yml files/

curl -sS -X POST \
  -H "Authorization: Bearer $TOKEN" \
  --data-binary @bundle.tar.gz \
  https://this-host/v1/jobs