Trigger one synchronization attempt for an enabled repository mirror (By ID).
Request
POST
https://api.sourcecraft.tech/repos/id:{repo_id}/mirroring/sync
Path parameters
|
Name |
Description |
|
repo_id |
Type: string Example: `` |
Responses
202 Accepted
A successful response.
Body
application/json
{
"operation_id": "example",
"status_url": "example",
"status": "scheduled",
"created_at": "2025-01-01T00:00:00Z",
"modified_at": "2025-01-01T00:00:00Z",
"response": {},
"error": {
"error_code": "example",
"message": "example",
"details": {}
}
}
|
Name |
Description |
|
created_at |
Type: string<date-time> Timestamp when operation was created. Example: |
|
error |
Type: OperationError Example
|
|
modified_at |
Type: string<date-time> Timestamp when operation was last modified. Example: |
|
operation_id |
Type: string Unique operation identifier. Example: |
|
response |
Type: objectEmpty response. Present when status is "success". Example
|
|
status |
Type: OperationStatus Enum: |
|
status_url |
Type: string URL to poll for operation status. Example: |
OperationStatus
Type: string
Enum: scheduled, in_progress, success, failed, cancel
OperationError
|
Name |
Description |
||
|
details |
Type: Optional details. Exact structure depends on error_code
Example
|
||
|
error_code |
Type: string Example: |
||
|
message |
Type: string Example: |
Example
{
"error_code": "example",
"message": "example",
"details": {}
}
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: |
|
error_code |
Type: string Example: |
|
message |
Type: string Example: |
|
request_id |
Type: string Example: |