{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/canonical/main/json-schema/canonical-mirror-schema.json", "title": "Mirror", "description": "A repository mirror configuration and status.", "x-generated": "2026-10-04", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/canonical-mirrorservice-api-openapi.yml#/components/schemas/Mirror", "required": [ "displayName", "archiveRoot", "distribution", "architectures", "components" ], "type": "object", "properties": { "name": { "type": "string", "description": "The resource name of the mirror.\n Format: \"mirrors/{mirror}\"" }, "mirrorId": { "readOnly": true, "type": "string", "description": "The mirror ID is exposed separately for convenience." }, "status": { "readOnly": true, "type": "string", "description": "The status of the mirror." }, "lastDownloadDate": { "readOnly": true, "type": "string", "description": "The timestamp of the last successful download.", "format": "date-time" }, "displayName": { "type": "string", "description": "The human-readable name used to reference this mirror." }, "archiveRoot": { "type": "string", "description": "Root of the debian archive (URL).\n When creating mirrors for repositories that require authentication (such as ESM repos), you\n can include authentication tokens directly in the URL using the HTTP Basic Authentication\n format, e.g.:\n\n https://bearer:@esm.ubuntu.com/infra/ubuntu/\n\n Credentials in the URL are securely handled and scrubbed from API responses for security\n purposes." }, "distribution": { "type": "string", "description": "The name of the distribution (subdirectory of `dists`)." }, "architectures": { "type": "array", "items": { "type": "string" }, "description": "List of architectures to fetch." }, "components": { "type": "array", "items": { "type": "string" }, "description": "List of components to fetch." }, "downloadInstaller": { "type": "boolean", "description": "Indicates if installer files should be downloaded." }, "downloadSources": { "type": "boolean", "description": "Indicates if sources files should be downloaded." }, "downloadUdebs": { "type": "boolean", "description": "Indicates if `.udebs` files should be downloaded." }, "filter": { "type": "string", "description": "Package query applied to the mirror.\n Follows the [Reprepro/Aptly language](https://www.aptly.info/doc/feature/query/)." }, "filterWithDeps": { "type": "boolean", "description": "Indicates if dependencies of matching packages should be included." }, "skipArchitectureCheck": { "type": "boolean", "description": "Indicates if the architecture list verification should be skipped." }, "skipComponentCheck": { "type": "boolean", "description": "Indicates if the component list verification should be skipped." }, "preserveSignatures": { "type": "boolean", "description": "Indicates if the mirror is a signature-preserving mirror." }, "gpgKey": { "allOf": [ { "$ref": "#/$defs/GpgKey" } ], "description": "Optional GPG key to validate the upstream signature." }, "lastOperation": { "readOnly": true, "type": "string", "description": "The most recent long-running operation associated with the mirror." }, "mirrorType": { "enum": [ "MIRROR_TYPE_UNSPECIFIED", "UBUNTU_ARCHIVE", "UBUNTU_SNAPSHOTS", "UBUNTU_PRO", "THIRD_PARTY" ], "type": "string", "description": "The type of upstream repository being mirrored.", "format": "enum" } }, "$defs": { "GpgKey": { "required": [ "armor" ], "type": "object", "properties": { "armor": { "writeOnly": true, "type": "string", "description": "The GPG key in ASCII armor format." }, "isPrivate": { "readOnly": true, "type": "boolean", "description": "Indicates if the key holds a private component." }, "fingerprint": { "readOnly": true, "type": "string", "description": "The fingerprint of the key." } }, "description": "A GPG key resource." } } }