swagger: '2.0' info: title: GitLab access_requests remote_mirrors API version: v4 description: Operations related to access requests host: gitlab.com produces: - application/json tags: - name: remote_mirrors description: Operations about remote_mirrors paths: /api/v4/projects/{id}/remote_mirrors: get: description: List the project's remote mirrors produces: - application/json parameters: - in: path name: id description: The ID or URL-encoded path of the project type: string required: true - in: query name: page description: Current page number type: integer format: int32 default: 1 required: false example: 1 - in: query name: per_page description: Number of items per page type: integer format: int32 default: 20 required: false example: 20 responses: '200': description: List the project's remote mirrors schema: type: array items: $ref: '#/definitions/API_Entities_RemoteMirror' '401': description: Unauthorized '404': description: Not found tags: - remote_mirrors operationId: getApiV4ProjectsIdRemoteMirrors post: description: Create remote mirror for a project produces: - application/json consumes: - application/json parameters: - in: path name: id description: The ID or URL-encoded path of the project type: string required: true - name: postApiV4ProjectsIdRemoteMirrors in: body required: true schema: $ref: '#/definitions/postApiV4ProjectsIdRemoteMirrors' responses: '201': description: Create remote mirror for a project schema: $ref: '#/definitions/API_Entities_RemoteMirror' '400': description: Bad request '401': description: Unauthorized '404': description: Not found tags: - remote_mirrors operationId: postApiV4ProjectsIdRemoteMirrors /api/v4/projects/{id}/remote_mirrors/{mirror_id}: get: description: Get a single remote mirror produces: - application/json parameters: - in: path name: id description: The ID or URL-encoded path of the project type: string required: true - in: path name: mirror_id description: The ID of a remote mirror type: string required: true responses: '200': description: Get a single remote mirror schema: $ref: '#/definitions/API_Entities_RemoteMirror' '401': description: Unauthorized '404': description: Not found tags: - remote_mirrors operationId: getApiV4ProjectsIdRemoteMirrorsMirrorId put: description: Update the attributes of a single remote mirror produces: - application/json consumes: - application/json parameters: - in: path name: id description: The ID or URL-encoded path of the project type: string required: true - in: path name: mirror_id description: The ID of a remote mirror type: string required: true - name: putApiV4ProjectsIdRemoteMirrorsMirrorId in: body required: true schema: $ref: '#/definitions/putApiV4ProjectsIdRemoteMirrorsMirrorId' responses: '200': description: Update the attributes of a single remote mirror schema: $ref: '#/definitions/API_Entities_RemoteMirror' '400': description: Bad request '401': description: Unauthorized '404': description: Not found tags: - remote_mirrors operationId: putApiV4ProjectsIdRemoteMirrorsMirrorId delete: summary: Delete a single remote mirror description: This feature was introduced in GitLab 14.10 produces: - application/json parameters: - in: path name: id description: The ID or URL-encoded path of the project type: string required: true - in: path name: mirror_id description: The ID of a remote mirror type: string required: true responses: '204': description: Delete a single remote mirror '400': description: Bad request '401': description: Unauthorized '404': description: Not found tags: - remote_mirrors operationId: deleteApiV4ProjectsIdRemoteMirrorsMirrorId /api/v4/projects/{id}/remote_mirrors/{mirror_id}/sync: post: description: Triggers a push mirror operation produces: - application/json consumes: - application/json parameters: - in: path name: id description: The ID or URL-encoded path of the project type: string required: true - in: path name: mirror_id description: The ID of a remote mirror type: string required: true responses: '204': description: Triggers a push mirror operation '400': description: Bad request '401': description: Unauthorized '404': description: Not found tags: - remote_mirrors operationId: postApiV4ProjectsIdRemoteMirrorsMirrorIdSync /api/v4/projects/{id}/remote_mirrors/{mirror_id}/public_key: get: description: Get the public key of a single remote mirror produces: - application/json parameters: - in: path name: id description: The ID or URL-encoded path of the project type: string required: true - in: path name: mirror_id description: The ID of a remote mirror type: string required: true responses: '200': description: Get the public key of a single remote mirror '401': description: Unauthorized '404': description: Not found tags: - remote_mirrors operationId: getApiV4ProjectsIdRemoteMirrorsMirrorIdPublicKey definitions: putApiV4ProjectsIdRemoteMirrorsMirrorId: type: object properties: enabled: type: boolean description: Determines if the mirror is enabled example: true auth_method: type: string description: Determines the mirror authentication method keep_divergent_refs: type: boolean description: Determines if divergent refs are kept on the target only_protected_branches: type: boolean description: Determines if only protected branches are mirrored mirror_branch_regex: type: string description: Determines if only matched branches are mirrored host_keys: type: array description: SSH host keys in bare format (ssh-ed25519 AAAA...) or full known_hosts format (hostname ssh-ed25519 AAAA...). Bare keys use the hostname from the mirror URL. items: type: string description: Update the attributes of a single remote mirror postApiV4ProjectsIdRemoteMirrors: type: object properties: url: type: string description: The URL for a remote mirror example: https://*****:*****@example.com/gitlab/example.git enabled: type: boolean description: Determines if the mirror is enabled auth_method: type: string description: Determines the mirror authentication method enum: - ssh_public_key - password keep_divergent_refs: type: boolean description: Determines if divergent refs are kept on the target only_protected_branches: type: boolean description: Determines if only protected branches are mirrored mirror_branch_regex: type: string description: Determines if only matched branches are mirrored host_keys: type: array description: SSH host keys in bare format (ssh-ed25519 AAAA...) or full known_hosts format (hostname ssh-ed25519 AAAA...). Bare keys use the hostname from the mirror URL. items: type: string required: - url description: Create remote mirror for a project API_Entities_RemoteMirror: type: object properties: id: type: integer format: int32 example: 101486 enabled: type: boolean example: true url: type: string example: https://*****:*****@example.com/gitlab/example.git update_status: type: string example: finished last_update_at: type: string format: date-time example: '2020-01-06T17:32:02.823Z' last_update_started_at: type: string format: date-time example: '2020-01-06T17:32:02.823Z' last_successful_update_at: type: string format: date-time example: '2020-01-06T17:31:55.864Z' last_error: type: string example: The remote mirror URL is invalid. only_protected_branches: type: boolean keep_divergent_refs: type: boolean auth_method: type: string example: password host_keys: type: array items: $ref: '#/definitions/API_Entities_MirrorHostKey' mirror_branch_regex: type: string example: feature-.* required: - id - enabled - url - update_status - last_update_at - last_update_started_at - last_successful_update_at - last_error - only_protected_branches - keep_divergent_refs - auth_method - host_keys - mirror_branch_regex description: API_Entities_RemoteMirror model API_Entities_MirrorHostKey: type: object properties: fingerprint_sha256: type: string example: SHA256:abcd1234 required: - fingerprint_sha256 securityDefinitions: access_token_header: type: apiKey name: PRIVATE-TOKEN in: header access_token_query: type: apiKey name: private_token in: query