此内容没有您所选择的语言版本。
Chapter 10. org_mirror
Organization-level repository mirroring API endpoints.
Enables users to configure a single mirroring task to replicate all repositories from a source namespace (e.g., Harbor project, Quay organization) into a target Quay organization.
10.1. createOrgMirrorConfig 复制链接链接已复制到粘贴板!
Create organization mirror configuration.
POST /api/v1/organization/{orgname}/mirror
Authorizations: oauth2_implicit (org:admin)
Request body schema (application/json)
Create organization mirror configuration
| Name | Description | Schema |
|---|---|---|
|
external_registry_type |
Type of source registry (e.g. | string |
|
external_registry_url | URL of the source registry | string |
|
external_namespace | Source namespace/project name | string |
|
robot_username | Robot account for creating repos (format: orgname+robotname) | string |
|
visibility |
Visibility for created repositories ( | string |
|
sync_interval | Seconds between syncs (minimum 60) | integer |
|
sync_start_date |
Initial sync time (ISO 8601 format, e.g. | string |
|
is_enabled | Enable or disable mirroring | boolean |
|
external_registry_username | Username for source registry authentication | |
|
external_registry_password | Password for source registry authentication | |
|
external_registry_config | TLS and proxy settings | object |
|
repository_filters | Glob patterns for filtering repositories |
array of string |
|
skopeo_timeout | Timeout for Skopeo operations in seconds | integer |
Responses
| HTTP Code | Description | Schema |
|---|---|---|
| 201 | Successful creation | |
| 400 | Bad Request | |
| 401 | Session required | |
| 403 | Unauthorized access | |
| 404 | Not found |
Example command
$ curl -X POST \
-H "Authorization: Bearer <bearer_token>" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"external_registry_type": "quay", "external_registry_url": "https://quay.example.com", "external_namespace": "<source_namespace>", "robot_username": "<orgname>+<robotname>", "visibility": "private", "sync_interval": 3600, "sync_start_date": "2025-01-01T00:00:00Z", "is_enabled": true}' \
https://<quay-server.example.com>/api/v1/organization/<orgname>/mirror
10.2. getOrgMirrorConfig 复制链接链接已复制到粘贴板!
Get the organization-level mirror configuration.
GET /api/v1/organization/{orgname}/mirror
Authorizations: oauth2_implicit (org:admin)
Responses
| HTTP Code | Description | Schema |
|---|---|---|
| 200 | Successful invocation | |
| 400 | Bad Request | |
| 401 | Session required | |
| 403 | Unauthorized access | |
| 404 | Not found |
Example command
$ curl -X GET \
-H "Authorization: Bearer <bearer_token>" \
-H "Accept: application/json" \
https://<quay-server.example.com>/api/v1/organization/<orgname>/mirror
10.3. listOrgMirrorRepositories 复制链接链接已复制到粘贴板!
List all discovered repositories from source namespace.
Query Parameters:
page (int): Page number, default 1
limit (int): Items per page, default 100, max 500
Returns:
JSON object with:
- repositories: List of repository objects
- page: Current page number
- limit: Items per page
- total: Total number of matching repositories
- has_next: Whether there are more pages
GET /api/v1/organization/{orgname}/mirror/repositories
Authorizations: oauth2_implicit (org:admin)
Responses
| HTTP Code | Description | Schema |
|---|---|---|
| 200 | Successful invocation | |
| 400 | Bad Request | |
| 401 | Session required | |
| 403 | Unauthorized access | |
| 404 | Not found |
Example command
$ curl -X GET \
-H "Authorization: Bearer <bearer_token>" \
-H "Accept: application/json" \
"https://<quay-server.example.com>/api/v1/organization/<orgname>/mirror/repositories?page=1&limit=100"
10.4. syncOrgMirrorNow 复制链接链接已复制到粘贴板!
Trigger immediate discovery and sync for the organization.
Sets sync_status to SYNC_NOW and sync_start_date to now for
immediate pickup by the repomirrorworker.
Returns 204 on success, 404 if config not found or already syncing.
POST /api/v1/organization/{orgname}/mirror/sync-now
Authorizations: oauth2_implicit (org:admin)
Responses
| HTTP Code | Description | Schema |
|---|---|---|
| 201 | Successful creation | |
| 400 | Bad Request | |
| 401 | Session required | |
| 403 | Unauthorized access | |
| 404 | Not found |
Example command
$ curl -X POST \
-H "Authorization: Bearer <bearer_token>" \
-H "Accept: application/json" \
https://<quay-server.example.com>/api/v1/organization/<orgname>/mirror/sync-now
10.5. updateOrgMirrorConfig 复制链接链接已复制到粘贴板!
Update organization mirror configuration.
PUT /api/v1/organization/{orgname}/mirror
Authorizations: oauth2_implicit (org:admin)
Request body schema (application/json)
Update organization mirror configuration
| Name | Description | Schema |
|---|---|---|
|
is_enabled | boolean | |
|
external_registry_url | string | |
|
external_namespace | string | |
|
robot_username | string | |
|
visibility | string | |
|
sync_interval | integer | |
|
sync_start_date | string | |
|
external_registry_username | ||
|
external_registry_password | ||
|
external_registry_config | object | |
|
repository_filters |
array of string | |
|
skopeo_timeout | integer |
Responses
| HTTP Code | Description | Schema |
|---|---|---|
| 200 | Successful invocation | |
| 400 | Bad Request | |
| 401 | Session required | |
| 403 | Unauthorized access | |
| 404 | Not found |
Example command
$ curl -X PUT \
-H "Authorization: Bearer <bearer_token>" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"is_enabled": true, "sync_interval": 7200}' \
https://<quay-server.example.com>/api/v1/organization/<orgname>/mirror
10.6. verifyOrgMirrorConnection 复制链接链接已复制到粘贴板!
Verify connection to source registry.
Tests connectivity, authentication, and TLS configuration without
triggering a full sync operation. Useful for validating configuration
before enabling mirroring.
Returns:
JSON object with:
- success: Boolean indicating if connection was successful
- message: Human-readable status message
POST /api/v1/organization/{orgname}/mirror/verify
Authorizations: oauth2_implicit (org:admin)
Responses
| HTTP Code | Description | Schema |
|---|---|---|
| 200 | Successful creation | |
| 400 | Bad Request | |
| 401 | Session required | |
| 403 | Unauthorized access | |
| 404 | Not found |
Example command
$ curl -X POST \
-H "Authorization: Bearer <bearer_token>" \
-H "Accept: application/json" \
https://<quay-server.example.com>/api/v1/organization/<orgname>/mirror/verify
10.7. cancelOrgMirrorSync 复制链接链接已复制到粘贴板!
Cancel ongoing discovery or sync operation.
Transitions the config to CANCEL status from any state except already CANCEL.
The worker detects the CANCEL status and propagates it to associated repository
syncs during tag processing. Repo status changes are applied when the worker
picks up the cancellation request, not immediately.
Returns 204 on success, 404 if config not found, 400 if already cancelled.
POST /api/v1/organization/{orgname}/mirror/sync-cancel
Authorizations: oauth2_implicit (org:admin)
Responses
| HTTP Code | Description | Schema |
|---|---|---|
| 201 | Successful creation | |
| 400 | Bad Request | |
| 401 | Session required | |
| 403 | Unauthorized access | |
| 404 | Not found |
Example command
$ curl -X POST \
-H "Authorization: Bearer <bearer_token>" \
-H "Accept: application/json" \
https://<quay-server.example.com>/api/v1/organization/<orgname>/mirror/sync-cancel
10.8. deleteOrgMirrorConfig 复制链接链接已复制到粘贴板!
Delete organization mirror configuration.
DELETE /api/v1/organization/{orgname}/mirror
Authorizations: oauth2_implicit (org:admin)
Responses
| HTTP Code | Description | Schema |
|---|---|---|
| 204 | Deleted | |
| 400 | Bad Request | |
| 401 | Session required | |
| 403 | Unauthorized access | |
| 404 | Not found |
Example command
$ curl -X DELETE \
-H "Authorization: Bearer <bearer_token>" \
-H "Accept: application/json" \
https://<quay-server.example.com>/api/v1/organization/<orgname>/mirror