GitLab API

GitlabTool

Actions905

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 programmatically access information about remote mirrors configured for their GitLab projects, such as for synchronization or backup purposes. For example, a DevOps engineer might use this node to monitor remote mirrors of a project to ensure they are up to date.

Use Case Examples

  1. Retrieve remote mirrors for a project with ID 12345 to check their status.
  2. List remote mirrors with pagination to handle large sets of mirrors efficiently.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request.
Authentication The authentication method used for the API request, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
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.
  • 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.
  • created_at - Timestamp when the remote mirror was created.
  • updated_at - Timestamp when the remote mirror was last updated.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID or URL-encoded path is correct to avoid 404 errors.
  • Check API authentication credentials if unauthorized errors occur.
  • Verify pagination parameters to handle large result sets properly.

Links

Discussion