Organization registry managing customers and agencies in the Hydra platform.
| Server | hydraorganization.experiencenet.com (46.225.184.72) |
| hcloud | hydraexperiencenet context, cx23 nbg1 |
| Config | /root/.hydraorganization/config.yaml |
| Data | /root/.hydraorganization/ |
| Service | systemctl status hydraorganization |
| Logs | journalctl -u hydraorganization -f |
| Health | GET /api/v1/health |
curl -s https://hydraorganization.experiencenet.com/api/v1/health
The response includes the service version and the current count of organizations stored.
All mutating endpoints (POST, PUT, DELETE) require a bearer token in the Authorization header. Read endpoints (GET) do not require auth.
| Method | Path | Auth | Description |
|---|---|---|---|
GET |
/api/v1/health |
No | Service health and organization count |
GET |
/api/v1/runbook |
No | This runbook (served as Markdown) |
GET |
/api/v1/events |
Yes | SSE stream of organization change events |
GET |
/api/v1/organizations |
No | List all organizations (optional ?type= filter) |
GET |
/api/v1/organizations/{id} |
No | Get a single organization by ID |
POST |
/api/v1/organizations |
Yes | Create a new organization |
PUT |
/api/v1/organizations/{id} |
Yes | Update an existing organization |
DELETE |
/api/v1/organizations/{id} |
Yes | Delete an organization |
curl -X POST https://hydraorganization.experiencenet.com/api/v1/organizations \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"id": "visit-flanders",
"name": "Visit Flanders",
"type": "customer",
"description": "Flemish tourism board",
"contact_name": "Jane Doe",
"contact_email": "jane@visitflanders.com"
}'
The id field is required and must be unique. The name field is required. The type field accepts any string; the conventional values are customer (end users operating venues) and agency (content creators submitting builds).
curl -s https://hydraorganization.experiencenet.com/api/v1/organizations/visit-flanders
curl -s https://hydraorganization.experiencenet.com/api/v1/organizations | jq .
Filter by type:
curl -s "https://hydraorganization.experiencenet.com/api/v1/organizations?type=customer" | jq .
curl -X PUT https://hydraorganization.experiencenet.com/api/v1/organizations/visit-flanders \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"name": "Visit Flanders",
"type": "customer",
"contact_email": "new-contact@visitflanders.com"
}'
curl -X DELETE https://hydraorganization.experiencenet.com/api/v1/organizations/visit-flanders \
-H "Authorization: Bearer <token>"
A successful delete returns HTTP 204 with no body.
HydraOrganization is a Go service (Cobra CLI + YAML store + systemd) that acts as the central registry for organizations in the Hydra platform.
YAML store: organization records live in /root/.hydraorganization/. The store has two layers:
organizations.yaml -- index file with lightweight entries (id, name, type, timestamps) used for fast listingorganizations/<id>/organization.yaml -- full per-organization record including description and contact fieldsAll writes use atomic rename (write to .tmp then rename into place) to prevent partial writes from corrupting the store.
Auth: mutating endpoints are protected by a static bearer token configured in config.yaml under server.admin_token. Token validation is handled by hydraauth.
SSE events: every create, update, and delete emits a server-sent event on /api/v1/events. Downstream services (HydraPipeline, HydraVenues) subscribe to this stream to react to organization changes.
Auto-updates: on startup the service registers a background poller that checks releases.experiencenet.com every 6 hours. If a newer version is available it downloads, replaces the binary, and restarts via systemd. Setting HYDRA_AUTO_UPDATE=off skips the poller entirely (logged as Auto-update: disabled (HYDRA_AUTO_UPDATE=off)); the container image sets this, since there the image is the unit of update and there is no systemd unit to restart.
Container image: v* tags also publish a multi-arch (amd64 + arm64) OCI image to scaleregistry.experiencenet.com/hydraorganization:<tag> and :latest. It runs serve --dev --listen :8080 — plain HTTP, with TLS terminated upstream — and expects /root/.hydraorganization to be supplied as an Incus disk device (or a Docker bind mount); the image deliberately declares no VOLUME, because Incus's OCI runtime cannot satisfy an anonymous volume and the container would fail to start.
TLS: production mode uses autocert (Let's Encrypt) with the certificate cache at /root/.hydraorganization/certs.
ssh root@46.225.184.72 systemctl status hydraorganization
ssh root@46.225.184.72 journalctl -u hydraorganization -f
Show last 100 lines:
ssh root@46.225.184.72 journalctl -u hydraorganization -n 100 --no-pager
ssh root@46.225.184.72 systemctl restart hydraorganization
ssh root@46.225.184.72 hydraorganization version
Never manually deploy. Use the release pipeline:
git -C /home/claude-user/hydraorganization tag v<X.Y.Z>git -C /home/claude-user/hydraorganization push origin v<X.Y.Z>releases.experiencenet.com.ssh root@46.225.184.72 hydraorganization updatehydrarelease verify --project hydraorganizationIf the YAML store becomes corrupted (partial writes, disk issues):
ssh root@46.225.184.72 systemctl stop hydraorganizationssh root@46.225.184.72 ls -la /root/.hydraorganization/ssh root@46.225.184.72 cat /root/.hydraorganization/organizations.yaml.tmp files left by a crashed write: ssh root@46.225.184.72 find /root/.hydraorganization -name '*.tmp'.tmp files: ssh root@46.225.184.72 find /root/.hydraorganization -name '*.tmp' -deletessh root@46.225.184.72 systemctl start hydraorganizationssh root@46.225.184.72 journalctl -u hydraorganization -n 50 --no-pagerssh root@46.225.184.72 cat /root/.hydraorganization/config.yamlserver.admin_token is set in the config -- the service refuses to start without itssh root@46.225.184.72 ss -tlnp | grep 443ssh root@46.225.184.72 ls -la $(which hydraorganization)ssh root@46.225.184.72 hydraorganization servecurl -s https://hydraauth.experiencenet.com/api/v1/verify -H "Authorization: Bearer <token>"ssh root@46.225.184.72 curl -s https://hydraauth.experiencenet.com/api/v1/healthssh root@46.225.184.72 dateIf a venue's organization_id points to a deleted organization:
curl -s https://hydraorganization.experiencenet.com/api/v1/organizations | jq .If downstream subscribers (HydraPipeline, HydraVenues) stop receiving organization events:
curl -s -N -H "Authorization: Bearer <token>" https://hydraorganization.experiencenet.com/api/v1/eventsssh root@46.225.184.72 systemctl restart hydraorganizationHetzner automated daily server snapshots are enabled on hydraorganization (46.225.184.72), context hydraexperiencenet. Backup window: 22:00--02:00 UTC, 7-day retention.
The snapshot covers the entire server disk, including:
/root/.hydraorganization//root/.hydraorganization/config.yaml/root/.hydraorganization/certs/usr/local/bin/hydraorganizationhydraexperiencenet project.ssh root@46.225.184.72 poweroff).curl -s https://hydraorganization.experiencenet.com/api/v1/health
curl -s https://hydraorganization.experiencenet.com/api/v1/organizations | jq 'length'