Skip to content

Under developmentMica is experimental at v0.10.0 and not ready for production.Follow the releases.

Docs/Health endpoints

Reference

Health endpoints

What /health and /ready of a self-hosted Mica answer, and how to use them in a container platform.

2 min read

A self-hosted Mica answers two public endpoints. Neither one needs a sign-in, and neither one names the repository, the branch or the uptime. The local editor answers both; its /ready has no reasons.

/health

curl -s https://cms.example.com/health
{ "status": "ok" }

/health checks only that the process answers. It does no input or output, so a problem at the Git host does not restart the container. Use it as the liveness check of your platform, for example the Docker HEALTHCHECK (the image has one).

/ready

curl -s https://cms.example.com/ready
{ "status": "ok", "repository": "ok", "reasons": [], "lastSyncAt": "2026-10-14T10:00:00.000Z" }

/ready tells whether editors can work. It answers with HTTP 200 when status is ok or degraded, and with 503 when it is error. Mica keeps a result for 30 seconds, so many requests do not cause many checks.

KeyValuesMeaning
statusok, degraded, errorok: editors can save and publish. degraded: editors can save, but something needs a person, such as a Publish that cannot work. error: editors cannot work.
repositoryok, degraded, unavailableThe state of the clone.
reasonsa list of codesWhy somebody should look.
lastSyncAta time, or nullWhen a sync last reached the Git host.

The reason codes. Each code makes the status degraded, except cloning (error) and conflict (no change):

CodeMeaningWhat to do
cloningThe first clone runs. /ready answers 503 until it is done.Wait.
auth_failedThe Git host refused the token.Renew the token.
write_forbiddenThe token cannot push.Give the token write access, or check branch protection.
repo_not_foundThe Git host does not know the repository, or the token cannot see it.Correct MICA_REPOSITORY_URL, or the token's access.
branch_not_foundThe branch does not exist at the Git host.Create the branch, or correct MICA_REPOSITORY_BRANCH.
networkThe Git host cannot be reached.Check DNS and outgoing HTTPS from the container. Mica tries again at each sync.
divergedThe branch was rewritten during a publication.Nothing: the next sync follows the branch. See "Troubleshooting" in Self-hosting.
prefetch_incompleteA sync could not fetch all files of the new version.Mica tries again at each sync. If it stays, read the log.
fast_forward_failedA sync could not bring the clone to the new version.Read the log.
sync_failingAnother sync problem.Read the log, and run docker compose run --rm mica check.
pending_pushA publication is committed in the clone, but the Git host did not take it yet.Mica tries again at each sync. Look at the other codes for the cause.
lfs_refusedThe new version of the branch assigns Git LFS to files under the content root. Mica keeps the old version, and Publish waits.Keep LFS out of the content root.
model_unreadableThis Mica cannot read the content model of the new version. Mica keeps the old version, and Publish waits.Upgrade Mica, or push a model that it can read.
read_onlyA sync failed while it changed the files, and Mica could not undo it. Editors cannot save or publish.Read the log, then restart the container: the start finishes the sync.
conflictAn editor's draft and a change at the Git host touch the same entry.Nothing: the editor chooses a version in the editor.

While a sync fails, editors can still edit and save: their work is in the clone. Publish works again when the Git host accepts the push.

Use /ready for a readiness check or for monitoring, not for a restart. See Self-hosting and Command line.

What to alert on

  • Alert when status is not ok for longer than a few sync intervals. A short network problem is normal.
  • Alert at once on auth_failed, write_forbidden and read_only: they do not go away without a person.
  • Alert when lastSyncAt is older than one hour.
  • Do not alert on conflict.