GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation retrieves remote mirrors for a specific GitLab project using the GitLab API v4. It is useful for users who want to manage or monitor remote mirrors of their GitLab projects, such as syncing repositories or checking mirror statuses. For example, a DevOps engineer might use this to automate the retrieval of remote mirror information for project backups or replication.

Use Case Examples

  1. Retrieve remote mirrors for a project with ID 12345 to monitor synchronization status.
  2. Fetch remote mirrors with pagination to handle large sets of mirrors efficiently.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the API request.
Authentication Specifies the authentication method to use, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the API requests are sent.
Method The HTTP method used for the API request, defaulting to GET.
Query Parameters Optional query parameters for pagination, including page number and items per page.
Path Parameters Path parameter specifying the project ID or URL-encoded path to identify the project.

Output

JSON

  • id - The unique identifier of the remote mirror.
  • url - The URL of the remote mirror repository.
  • enabled - Indicates if the remote mirror is enabled.
  • only_protected_branches - Indicates if only protected branches are mirrored.
  • keep_divergent_refs - Indicates if divergent refs are kept.
  • last_update_at - Timestamp of the last update of the remote mirror.
  • status - Current status of the remote mirror.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID or URL-encoded path is correct to avoid 404 errors.
  • Verify that the API key credential has sufficient permissions to access project remote mirrors.
  • Check network connectivity and base URL configuration if requests fail.
  • Handle pagination properly to avoid missing data when many remote mirrors exist.

Links

Discussion