GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation retrieves a list of branches from a specific GitLab project repository using the GitLab API v4. It is useful for scenarios where you need to programmatically access branch information for a project, such as automation scripts for CI/CD pipelines, repository management, or auditing branch details.

Use Case Examples

  1. Fetch all branches of a project to display in a dashboard.
  2. Search for branches matching a specific pattern to automate branch cleanup.
  3. Paginate through branches to process them in batches.

Properties

Name Meaning
Skip Authentication If set to true, the node will skip using authentication for the API request.
Authentication Select the authentication method to use for the API request, typically an API key credential.
baseUrl The base URL of the GitLab instance to connect to, defaulting to https://gitlab.com.
Method The HTTP method to use for the API request, default is GET.
Parameter Schema Defines the parameters for the API request including project ID, pagination, search, regex filtering, sorting, and pagination token.
Query Parameters Optional query parameters to filter and paginate the list of branches, such as page number, items per page, search string, regex, sort order, and page token.
Path Parameters Path parameters including the project ID or URL-encoded path to identify the repository.

Output

JSON

  • branches - Array of branch objects returned from the GitLab API, each representing a repository branch with its details.

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and accessible with the provided authentication.
  • Check that the baseUrl is correct if using a self-hosted GitLab instance.
  • Verify that the authentication credentials are valid and have sufficient permissions to access the repository branches.
  • If pagination parameters are used, ensure they are within valid ranges to avoid empty responses.

Links

Discussion