GitLab API

GitlabTool

Actions1000

Overview

This node operation retrieves remote mirrors for a specific project from the GitLab API (version 4). It is useful for users who want to programmatically access information about remote mirrors configured for a GitLab project, such as for synchronization or backup purposes. For example, a DevOps engineer might use this node to list all remote mirrors of a project to verify their status or configuration.

Use Case Examples

  1. Retrieve remote mirrors of a project with ID '123' 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.
baseUrl The base URL of the GitLab instance to which the API request is sent.
Method HTTP method used for the API request (GET, POST, PUT, DELETE, HEAD, PATCH).
Query Parameters Optional query parameters for pagination such as page number and items per page.
Path Parameters Path parameters required by the API endpoint, specifically the project ID or URL-encoded path.

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 authentication token or credentials

Troubleshooting

  • Ensure the project ID or URL-encoded path is correctly provided in the path parameters; otherwise, the API call will fail.
  • Verify that the authentication token or credentials are valid and have sufficient permissions to access the project's remote mirrors.
  • Check the base URL to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.
  • If pagination parameters (page, per_page) are used, ensure they are valid integers to avoid API errors.

Links

Discussion