GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation retrieves CI/CD variables for a specific GitLab project using the GitLab API v4. It is useful for DevOps engineers and developers who need to programmatically access project-specific environment variables for continuous integration and deployment workflows. For example, it can be used to fetch variables to verify or update CI configurations or to audit project settings.

Use Case Examples

  1. Fetch all CI variables for a project identified by its ID or namespace/project name.
  2. Paginate through variables if there are many, by specifying page and per_page query parameters.

Properties

Name Meaning
Skip Authentication Option to skip authentication when making the API request.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET.
Query Parameters Optional query parameters for pagination such as page number and items per page.
Path Parameters Path parameters including the project ID or URL-encoded namespace/project name to identify the project.

Output

JSON

  • variables - Array of CI/CD variables for the specified GitLab project, including details like key, value, and variable type.

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure the project ID or namespace/project name is correctly specified in the path parameters to avoid 404 errors.
  • Verify that the API token used has sufficient permissions to access project variables.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure the correct endpoint is targeted.

Links

Discussion