GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation retrieves GitLab CI/CD variables from the admin API endpoint. It is useful for administrators who want to list or manage CI variables across projects or groups in GitLab. For example, an admin can use this node to fetch paginated lists of CI variables for auditing or automation purposes.

Use Case Examples

  1. Fetch the first page of admin CI variables with default pagination.
  2. Customize the number of variables per page by setting the 'per_page' query parameter.

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 key authentication.
baseUrl The base URL of the GitLab instance to which the API requests are sent.
Method HTTP method to use for the API request, defaulting to GET.
Query Parameters Optional query parameters to control pagination of the results, including 'page' for the current page number and 'per_page' for the number of items per page.

Output

JSON

  • id - Unique identifier of the CI variable.
  • key - Name of the CI variable.
  • value - Value of the CI variable.
  • variable_type - Type of the CI variable (e.g., env_var).
  • protected - Indicates if the variable is protected.
  • masked - Indicates if the variable is masked.
  • environment_scope - Scope of environments where the variable is available.
  • created_at - Timestamp when the variable was created.
  • updated_at - Timestamp when the variable was last updated.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the GitLab API key credential is correctly configured and has admin permissions to access the admin CI variables endpoint.
  • Verify the baseUrl is correct and accessible from the n8n instance.
  • Check that the query parameters 'page' and 'per_page' are valid integers if provided.
  • Common error messages may include authentication failures (401 Unauthorized) or permission errors (403 Forbidden) if the API key lacks sufficient rights.

Links

Discussion