API reference
A small, pragmatic surface. The management endpoints below sit next to the Galaxy V1 & V3 serving endpoints on the same TCP tree, so one instance is both control plane and one of the best-behaved Galaxy mirrors your playbooks have talked to.
Serving endpoints (the Galaxy half)
Galaxy V1 API — the surface ansible-galaxy talks to. No client changes needed.
Galaxy V3 API — collection indexes and artifact downloads, as served by Galaxy.
Point your clients here and requirement installs resolve against the mirror. Theansible.cfg below is the entire client story:
[galaxy]
server_list = orbitron
[galaxy_server.orbitron]
url = https://orbitron.internal/api/
# token = YOUR_ORBITRON_TOKEN # if require_auth_pull is enabledManagement endpoints
Unauthenticated liveness — 200 when the storage path is writable, 503 when degraded.
Ingest role & collection YAML manifests. Content-addressed by SHA-256, mirrored by parallel workers.
Re-run every stored manifest, or poll progress and a bounded history of finished syncs.
Lists every stored requirements manifest, grouped by type, with the content sha256 used for idempotent ingestion.
Full cached-version inventory. DELETE /storage/{type}/{name}/{version} purges a single cached version.
Access-based cleanup with retention window — preview with {"dry_run": true}, nothing is deleted.
Token lifecycle: create, list, revoke and rotate admin tokens, with optional per-token TTLs.
Prometheus exposition — uptime, cache counts, version totals and storage bytes.
Every endpoint above except /healthz requires a Bearer token or HTTP Basic auth.
Examples
curl -i http://127.0.0.1:8080/healthz
HTTP/1.1 200 OKcurl http://127.0.0.1:8080/api/v1/manifests \
-H "Authorization: Bearer $ORBITRON_TOKEN"
{
"roles": [{"file": "roles_x_requirements.yml", "sha256": "737690a6..."}],
"collections": []
}curl http://127.0.0.1:8080/api/v1/storage \
-H "Authorization: Bearer $ORBITRON_TOKEN"
{
"roles": [
{"type": "role", "name": "geerlingguy.nginx",
"versions": [{"version": "1.2.3", "declared": true, "size_bytes": 20480}]}
],
"collections": []
}curl -X POST http://127.0.0.1:8080/api/v1/prune \
-H "Authorization: Bearer $ORBITRON_TOKEN" \
-H "Content-Type: application/json" \
-d '{"dry_run": true, "days": 90}'
{
"items": ["/var/lib/orbitron/storage/roles/geerlingguy.nginx/2.0.1"],
"freed_bytes": 40960,
"executed": false
}