GitLab API

GitlabTool

Actions1000

Overview

This node operation retrieves details of a specific remote mirror for a given project in GitLab using the GitLab API. It is useful for scenarios where you need to fetch information about a remote mirror associated with a project, such as its status or configuration. For example, it can be used in automation workflows to monitor or manage remote mirrors of GitLab projects.

Use Case Examples

  1. Fetch remote mirror details for project ID 123 and mirror ID 456 to check its status.
  2. Use in a CI/CD pipeline to verify remote mirror configuration before deployment.

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 authentication.
baseUrl The base URL of the GitLab instance to send the API request to, default is https://gitlab.com.
Method The HTTP method to use for the API request, default is GET.
Path Parameters The path parameters required for the API endpoint, including the project ID and the remote mirror ID.

Output

JSON

  • id - The ID 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

Troubleshooting

  • Ensure the project ID and mirror ID are correctly provided and URL-encoded if necessary.
  • Verify that the GitLab API credentials are valid and have sufficient permissions to access the remote mirror information.
  • If skipping authentication, ensure the GitLab instance allows unauthenticated access to this endpoint.
  • Common error messages include 404 Not Found if the project or mirror ID does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion