GitOps

GitOps sync status, history, manual sync, webhook.

All paths are relative to the base path /api/v1 (same origin as the UI). Authentication, roles, pagination and the error format are described in the overview; the types are on the page Data types.

OperationRequestPermission
Sync status, applied/latest commit, validation issuesGET /gitops/statusread (viewer)
Sync history (newest first)GET /gitops/syncsread (viewer)
All synced objects with their source fileGET /gitops/objectsread (viewer)
Request an immediate sync (performed by the leader replica)POST /gitops/actions/syncgitops:sync (operator)
Push webhook from GitLab (X-Gitlab-Token) or GitHub (X-Hub-Signature-256)POST /gitops/webhookcustom

Sync status, applied/latest commit, validation issues

GET /api/v1/gitops/status

Operation getGitOpsStatus. Permission read (lowest role: viewer).

Responses

StatusDescriptionContent typeType
200Statusapplication/jsonGitOpsSyncStatus
401Not authenticated (code unauthorized)application/problem+jsonProblem

Sync history (newest first)

GET /api/v1/gitops/syncs

Operation listGitOpsSyncs. Permission read (lowest role: viewer).

Parameters

NameInTypeRequiredDescription
limitqueryintegernoRange 1 to 500. Default 50.
offsetqueryintegernoRange 0 to 100000. Default 0.

Responses

StatusDescriptionContent typeType
200Syncsapplication/jsonGitOpsSyncPage
401Not authenticated (code unauthorized)application/problem+jsonProblem

All synced objects with their source file

GET /api/v1/gitops/objects

Operation listGitOpsObjects. Permission read (lowest role: viewer).

Responses

StatusDescriptionContent typeType
200Objectsapplication/jsonGitOpsObjectRefList
401Not authenticated (code unauthorized)application/problem+jsonProblem

Request an immediate sync (performed by the leader replica)

POST /api/v1/gitops/actions/sync

Operation triggerGitOpsSync. Permission gitops:sync (lowest role: operator).

Parameters

NameInTypeRequiredDescription
X-CSRF-TokenheaderstringnoRequired for cookie-authenticated mutating requests (value of cookie myriarch_csrf).

Responses

StatusDescriptionContent typeType
202Sync requestedapplication/jsonActionAccepted
401Not authenticated (code unauthorized)application/problem+jsonProblem

Push webhook from GitLab (X-Gitlab-Token) or GitHub (X-Hub-Signature-256)

POST /api/v1/gitops/webhook

Operation gitopsWebhook. Permission custom. Neither a session nor an API token is checked: the operation checks its own credential (see below).

Authenticated with the shared secret gitops.webhookSecret (not a session/API token).

Request body

Content type application/json, optional. Type: map of string to any.

{}

Responses

StatusDescriptionContent typeType
202Sync requestedapplication/jsonActionAccepted
401Not authenticated (code unauthorized)application/problem+jsonProblem