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

Request

GET

https://api.sourcecraft.tech/repos/id:{repo_id}/mirroring/status

Path parameters

Name

Description

repo_id

Type: string

Example: ``

Responses

200 OK

A successful response.

Body

application/json
{
  "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"
}

Name

Description

mirroring_quota

Type: MirroringQuota

Example
{
  "limit": 0,
  "used": 0,
  "remaining": 0,
  "next_allowed_at": "2025-01-01T00:00:00Z"
}

mirroring_state

Type: 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: enabled, disabled, stopped_by_system

next_scheduled_sync

Type: string<date-time>

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

Example: 2025-01-01T00:00:00Z

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: enabled, disabled, stopped_by_system

MirroringQuota

Name

Description

limit

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.

next_allowed_at

Type: string<date-time>

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

Example: 2025-01-01T00:00:00Z

remaining

Type: integer

Number of attempts still available in the current rolling 24-hour window.

used

Type: integer

Number of admitted mirroring attempts in the current rolling 24-hour window.

Example
{
  "limit": 0,
  "used": 0,
  "remaining": 0,
  "next_allowed_at": "2025-01-01T00:00:00Z"
}

default

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

Body

application/json
{
  "error_code": "example",
  "message": "example",
  "request_id": "example",
  "details": null
}

Name

Description

details

Type: unknown

Example: null

error_code

Type: string

Example: example

message

Type: string

Example: example

request_id

Type: string

Example: example