---
metadata:
  - name: generator
    content: Diplodoc Platform v5.70.2
alternate:
  - https://sourcecraft.dev/portal/docs/en/api-ref/Repository-or-Mirroring/GetRepositoryMirroringStatusByID.md
  - https://sourcecraft.dev/portal/docs/en/api-ref/Repository-or-Mirroring/GetRepositoryMirroringStatusByID.md
  - https://sourcecraft.dev/portal/docs/ru/api-ref/Repository-or-Mirroring/GetRepositoryMirroringStatusByID.md
  - href: https://sourcecraft.dev/portal/docs/en/api-ref/Repository-or-Mirroring/GetRepositoryMirroringStatusByID.md
    type: text/markdown
    title: Markdown version
  - href: https://sourcecraft.dev/portal/docs/en/llms.txt?revision=r22161526
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://sourcecraft.dev/portal/docs/en/llms.txt?revision=r22161526

<div class="openapi">

# Get repository mirroring state and rolling quota (By ID).

<!-- markdownlint-disable-file -->

## Request

<div class="openapi__requests">

<div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-get);margin-bottom: 12px">

<div class="openapi__request">

GET {.openapi__method}
```text translate=no
https://api.sourcecraft.tech/repos/id:{repo_id}/mirroring/status
```

</div>

</div>

</div>

### Path parameters

#|
|| **Name** | **Description** ||
||

_repo_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} ``
{.table-cell}
||
|#{.json-schema-properties}

## Responses

<div class="openapi__response__code__200">

## 200 OK

A successful response.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "mirroring_state": "enabled",
  "mirroring_quota": {
    "limit": 0,
    "used": 0,
    "remaining": 0,
    "next_allowed_at": "2025-01-01T00:00:00Z"
  },
  "next_scheduled_sync": "2025-01-01T00:00:00Z"
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_mirroring_quota_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [MirroringQuota](#entity-MirroringQuota)

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "limit": 0,
  "used": 0,
  "remaining": 0,
  "next_allowed_at": "2025-01-01T00:00:00Z"
}
```

{% endcut %}
{.table-cell}
||
||

_mirroring_state_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [MirroringState](#entity-MirroringState)

 - enabled: Regular synchronization is enabled.
 - disabled: Mirroring is disabled. No new synchronization attempts can be started
until mirroring is enabled again.
 - stopped_by_system: Mirroring was stopped automatically after a failed scheduled synchronization.
Restart it explicitly to resume synchronization.

_Enum:_{.json-schema-reset .json-schema-value} `enabled`, `disabled`, `stopped_by_system`
{.table-cell}
||
||

_next_scheduled_sync_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;date-time&gt;

Best-effort next scheduled synchronization time. Present only when mirroring is enabled
and does not guarantee execution.

_Example:_{.json-schema-reset .json-schema-example} `2025-01-01T00:00:00Z`
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### MirroringState {#entity-MirroringState}

 - enabled: Regular synchronization is enabled.
 - disabled: Mirroring is disabled. No new synchronization attempts can be started
until mirroring is enabled again.
 - stopped_by_system: Mirroring was stopped automatically after a failed scheduled synchronization.
Restart it explicitly to resume synchronization.

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `enabled`, `disabled`, `stopped_by_system`

</div>

<div class="openapi-entity">

### MirroringQuota {#entity-MirroringQuota}

#|
|| **Name** | **Description** ||
||

_limit_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Effective maximum number of admitted mirroring attempts in a rolling 24-hour window.
The default limit is 6, but an organization policy can override it.
{.table-cell}
||
||

_next_allowed_at_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;date-time&gt;

Earliest time at which a new attempt can be admitted. Present only when quota is exhausted.

_Example:_{.json-schema-reset .json-schema-example} `2025-01-01T00:00:00Z`
{.table-cell}
||
||

_remaining_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Number of attempts still available in the current rolling 24-hour window.
{.table-cell}
||
||

_used_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Number of admitted mirroring attempts in the current rolling 24-hour window.
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "limit": 0,
  "used": 0,
  "remaining": 0,
  "next_allowed_at": "2025-01-01T00:00:00Z"
}
```

{% endcut %}

</div>

</div>

<div class="openapi__response__code__default">

## default

Both Client Errors (4xx) and Server Errors (5xx) are serialized into this scheme

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "error_code": "example",
  "message": "example",
  "request_id": "example",
  "details": null
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_details_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: unknown

_Example:_{.json-schema-reset .json-schema-example} `null`
{.table-cell}
||
||

_error_code_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_request_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

</div>

[*Deprecated]: No longer supported, please use an alternative and newer version.