GitOps Commands
Use the GitOps endpoints when an administrator needs to inspect or explicitly reconcile selected hubs, clients, or ACLs.
Commit Flow
Section titled “Commit Flow”- Call
POST /v1/gitops/render-diffwith one or more resource references. - Review the returned manifests and diff.
- Call
POST /v1/gitops/commitwith the same references, a message, and anIdempotency-Keyheader. - Read
operationfrom the response and poll itslinks.selfURL. - Stop when the operation reaches
committed,failed, ortimed_out.
curl --fail-with-body \ -X POST \ -H "Authorization: Bearer $THALOVANT_TOKEN" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: gitops-sync-20260711-001" \ https://api.thalovant.com/v1/gitops/commit \ -d '{"message":"Reconcile selected hub","resources":[{"type":"hub","id":"HUB_ID"}]}'The API stores the operation and Git work item before responding. Git rendering, cleanup, commit, and push happen in the durable worker. Owner-scoped cleanup does not remove another tenant’s manifests, another resource type, or unannotated legacy paths.
Compatibility Envelope
Section titled “Compatibility Envelope”POST /v1/gitops/commit keeps the existing HTTP 200 response and legacy fields during the /api/v1 migration window. New clients use the additive operation field and Location header. On initial acceptance, commit_sha is null, created is false, and manifests is empty because the worker has not run yet.
See Operations for polling and failure handling.