GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation retrieves remote mirrors for a specific project in GitLab using the GitLab API. It is useful for scenarios where you need to manage or monitor remote mirrors of a project, such as syncing repositories or auditing mirror configurations. For example, a DevOps engineer might use this to list all remote mirrors of a project to verify their status or update settings.

Use Case Examples

  1. Retrieve remote mirrors of a project by providing the project ID and optional pagination parameters.
  2. Use the node to automate monitoring of remote mirrors in a CI/CD pipeline.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is 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 ID of the remote mirror.
  • url - The URL of the remote mirror.
  • enabled - Whether the remote mirror is enabled.
  • only_protected_branches - Whether the mirror only syncs protected branches.
  • keep_divergent_refs - Whether to keep divergent refs.
  • last_update_at - Timestamp of the last update of the mirror.
  • last_successful_update_at - Timestamp of the last successful update.
  • status - Current status of the remote mirror.

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

  • Ensure the project ID is correctly provided in the path parameters; otherwise, the API call will fail.
  • Check that the GitLab API credentials are valid and have sufficient permissions to access project remote mirrors.
  • If pagination parameters are used, verify they are within valid ranges to avoid empty or partial results.
  • Common error messages include 404 Not Found if the project does not exist or 401 Unauthorized if authentication fails. Verify the project ID and credentials accordingly.

Links

Discussion