GitLab CI/CD remote_mirrors API

Operations about remote_mirrors

Operations 7

GET /api/v4/projects/{id}/remote_mirrors #
POST /api/v4/projects/{id}/remote_mirrors #
GET /api/v4/projects/{id}/remote_mirrors/{mirror_id} #
PUT /api/v4/projects/{id}/remote_mirrors/{mirror_id} #
DELETE /api/v4/projects/{id}/remote_mirrors/{mirror_id} Delete a single remote mirror #
POST /api/v4/projects/{id}/remote_mirrors/{mirror_id}/sync #
GET /api/v4/projects/{id}/remote_mirrors/{mirror_id}/public_key #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/gitlab-ci-remote-mirrors-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

gitlab-ci-remote-mirrors-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: GitLab access_requests Remote Mirrors API
  version: v4
  description: Operations related to access requests
servers:
- url: https://gitlab.com
tags:
- name: remote_mirrors
  description: Operations about remote_mirrors
paths:
  /api/v4/projects/{id}/remote_mirrors:
    get:
      description: List the project's remote mirrors
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project
        required: true
        schema:
          type: string
      - in: query
        name: page
        description: Current page number
        required: false
        example: 1
        schema:
          type: integer
          format: int32
          default: 1
      - in: query
        name: per_page
        description: Number of items per page
        required: false
        example: 20
        schema:
          type: integer
          format: int32
          default: 20
      responses:
        '200':
          description: List the project's remote mirrors
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/API_Entities_RemoteMirror'
        '401':
          description: Unauthorized
        '404':
          description: Not found
      tags:
      - remote_mirrors
      operationId: getApiV4ProjectsIdRemoteMirrors
    post:
      description: Create remote mirror for a project
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project
        required: true
        schema:
          type: string
      responses:
        '201':
          description: Create remote mirror for a project
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Entities_RemoteMirror'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Not found
      tags:
      - remote_mirrors
      operationId: postApiV4ProjectsIdRemoteMirrors
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/postApiV4ProjectsIdRemoteMirrors'
        required: true
  /api/v4/projects/{id}/remote_mirrors/{mirror_id}:
    get:
      description: Get a single remote mirror
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project
        required: true
        schema:
          type: string
      - in: path
        name: mirror_id
        description: The ID of a remote mirror
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Get a single remote mirror
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/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
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project
        required: true
        schema:
          type: string
      - in: path
        name: mirror_id
        description: The ID of a remote mirror
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Update the attributes of a single remote mirror
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/API_Entities_RemoteMirror'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Not found
      tags:
      - remote_mirrors
      operationId: putApiV4ProjectsIdRemoteMirrorsMirrorId
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/putApiV4ProjectsIdRemoteMirrorsMirrorId'
        required: true
    delete:
      summary: Delete a single remote mirror
      description: This feature was introduced in GitLab 14.10
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project
        required: true
        schema:
          type: string
      - in: path
        name: mirror_id
        description: The ID of a remote mirror
        required: true
        schema:
          type: string
      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
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project
        required: true
        schema:
          type: string
      - in: path
        name: mirror_id
        description: The ID of a remote mirror
        required: true
        schema:
          type: string
      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
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project
        required: true
        schema:
          type: string
      - in: path
        name: mirror_id
        description: The ID of a remote mirror
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Get the public key of a single remote mirror
        '401':
          description: Unauthorized
        '404':
          description: Not found
      tags:
      - remote_mirrors
      operationId: getApiV4ProjectsIdRemoteMirrorsMirrorIdPublicKey
components:
  schemas:
    API_Entities_MirrorHostKey:
      type: object
      properties:
        fingerprint_sha256:
          type: string
          example: SHA256:abcd1234
      required:
      - fingerprint_sha256
    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: '#/components/schemas/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
    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
  securitySchemes:
    access_token_header:
      type: apiKey
      name: PRIVATE-TOKEN
      in: header
    access_token_query:
      type: apiKey
      name: private_token
      in: query