git.repositories.get-mirror-status

A mirror's last day (syncs, failures, lag), recent syncs and failures

GET /git/api/repositories/{repoId}/mirrorIAM git:GetRepositoryRead

Request syntax

GET /git/api/repositories/{repoId}/mirror

Path parameters

  • repoIdRequired

    string

    Constraints: uuid

Response

200 with `mirror` (its settings), `last24h` (syncs, failed, refsChanged, lagP50Seconds, lagP95Seconds), `syncs` (the last 50) and `failures` (the last 20). 409 for a repository that is not a mirror.

A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.

Fields of data

  • mirrorAlways

    object

    How the mirror follows its source
  • mirror.​providerAlways

    one of github, gitlab, git

    Where it comes from: GitHub, GitLab, or any git URL
  • mirror.​sourceUrlAlways

    string

    The source followed, without credentials
  • mirror.​intervalMinutesAlways

    number

    Minutes between full fetches
  • mirror.​lastSyncedAtAlways

    string, may be null

    When the last sync finished (ISO 8601); null before the first
  • mirror.​lastErrorAlways

    string, may be null

    Why the last sync failed; null when it did not
  • mirror.​pullsUpdatedThroughWhen present

    string

    Pull requests changed on the source up to this time (ISO 8601) are in
  • mirror.​pullsUpdatedAtCorrectedAtWhen present

    string

    When the imported pull requests' update times were taken from the source
  • mirror.​mergeMethodsReadAtWhen present

    string

    When the source's merge methods were last applied here (ISO 8601)
  • mirror.​continuousWhen present

    boolean

    The source is checked every minute and fetched as soon as a ref moved
  • mirror.​shadowCiWhen present

    object

    Running the source's workflows here to compare; absent when never set
  • mirror.​shadowCi.​enabledAlways

    boolean

    Shadow CI runs on mirrored pushes
  • mirror.​shadowCi.​branchesAlways

    array of string

    Branch patterns it runs for; the default branch when empty
  • mirror.​hasTokenAlways

    boolean

    A token for the source is kept (it is never shown)
  • last24hAlways

    object

    The last day in numbers
  • last24h.​syncsAlways

    number

    Syncs that fetched in the last 24 hours
  • last24h.​failedAlways

    number

    Of those, failed
  • last24h.​refsChangedAlways

    number

    Refs they changed in all
  • last24h.​lagP50SecondsAlways

    number, may be null

    Median lag in seconds; null when no branch moved
  • last24h.​lagP95SecondsAlways

    number, may be null

    95th percentile lag in seconds; null when no branch moved
  • syncsAlways

    array of object

    The last 50 syncs, newest first
  • syncs[].​idAlways

    string

    The sync id
  • syncs[].​orgIdAlways

    string

    The organization
  • syncs[].​repoIdAlways

    string

    The mirror repository
  • syncs[].​triggerAlways

    one of poll, interval, manual

    What started it: the minute poll saw a change, the interval, or a person
  • syncs[].​outcomeAlways

    one of succeeded, failed

    How it ended
  • syncs[].​errorAlways

    string, may be null

    Why it failed; null when it succeeded
  • syncs[].​changesAlways

    array of object

    Refs that moved, appeared or went (at most 200)
  • syncs[].​changes[].​refAlways

    string

    The full ref name, e.g. refs/heads/main
  • syncs[].​changes[].​oldOidAlways

    string, may be null

    The commit it pointed at before; null if new
  • syncs[].​changes[].​newOidAlways

    string, may be null

    The commit it points at now; null if deleted
  • syncs[].​changedCountAlways

    number

    How many refs changed
  • syncs[].​lagSecondsAlways

    number, may be null

    Seconds from the newest moved branch tip's commit to its arrival here, at most; null when no branch moved
  • syncs[].​startedAtAlways

    string

    When it started (ISO 8601)
  • syncs[].​finishedAtAlways

    string

    When it finished (ISO 8601)
  • failuresAlways

    array of object

    The last 20 failed syncs, newest first
  • failures[].​idAlways

    string

    The sync id
  • failures[].​orgIdAlways

    string

    The organization
  • failures[].​repoIdAlways

    string

    The mirror repository
  • failures[].​triggerAlways

    one of poll, interval, manual

    What started it: the minute poll saw a change, the interval, or a person
  • failures[].​outcomeAlways

    one of succeeded, failed

    How it ended
  • failures[].​errorAlways

    string, may be null

    Why it failed; null when it succeeded
  • failures[].​changesAlways

    array of object

    Refs that moved, appeared or went (at most 200)
  • failures[].​changes[].​refAlways

    string

    The full ref name, e.g. refs/heads/main
  • failures[].​changes[].​oldOidAlways

    string, may be null

    The commit it pointed at before; null if new
  • failures[].​changes[].​newOidAlways

    string, may be null

    The commit it points at now; null if deleted
  • failures[].​changedCountAlways

    number

    How many refs changed
  • failures[].​lagSecondsAlways

    number, may be null

    Seconds from the newest moved branch tip's commit to its arrival here, at most; null when no branch moved
  • failures[].​startedAtAlways

    string

    When it started (ISO 8601)
  • failures[].​finishedAtAlways

    string

    When it finished (ISO 8601)

Checked against the handlers: every route test validates their answers against this schema.

Errors

  • 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
  • 401No credentials, or an access key that is unknown, revoked or expired.
  • 403The caller's policies do not allow git:GetRepository on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
  • 404The resource does not exist in your organization.

Examples

The required parameters only, with example values. Replace id and the other placeholders with your own.

dcloud git repositories get-mirror-status repoId

Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_git_repositories_get-mirror-status.