GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation retrieves CI/CD variables for a specific project from the GitLab API (v4). It is useful for automating workflows that require access to project-level environment variables, such as in continuous integration and deployment pipelines. For example, it can be used to fetch variables to dynamically configure build jobs or deployment scripts.

Use Case Examples

  1. Fetch all CI variables for a project by specifying the project ID or URL-encoded namespace/project name.
  2. Paginate through variables if there are many, by using the 'page' and 'per_page' query parameters.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request (boolean). Defaults to false.
Authentication The authentication method used, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to connect to, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET.
Query Parameters Optional query parameters for pagination: 'page' (current page number) and 'per_page' (number of items per page).
Path Parameters Path parameter 'id' specifying the project ID or URL-encoded namespace/project name to identify the project.

Output

JSON

  • variables - Array of CI/CD variables for the specified project, each containing details such as key, value, and variable type.

Dependencies

  • Requires GitLab API key credential for authentication unless 'Skip Authentication' is enabled.

Troubleshooting

  • Ensure the project ID or namespace/project name is correctly URL-encoded and valid.
  • Verify that the GitLab API key credential has sufficient permissions to access project variables.
  • Check the baseUrl if connecting to a self-hosted GitLab instance instead of gitlab.com.
  • Pagination parameters 'page' and 'per_page' should be valid integers; otherwise, the API may return errors or unexpected results.

Links

Discussion