GitLab API

GitlabTool

Actions1000

Overview

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

Use Case Examples

  1. Fetch CI/CD variables for project ID 123 to check configuration before pipeline execution.
  2. Retrieve environment variables for a project to dynamically configure deployment scripts.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request.
Authentication The authentication method used for the API request, typically a GitLab API key.
baseUrl The base URL of the GitLab instance to send the API request to.
Method The HTTP method to use for the API request (GET, POST, PUT, DELETE, HEAD, PATCH).
Query Parameters Optional query parameters for pagination, including page number and items per page.
Path Parameters Path parameters specifying the project ID or URL-encoded namespace/project name to identify the project.

Output

JSON

  • variables - List of CI/CD variables for the specified project.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID or namespace/project name is correctly specified in the path parameters to avoid 404 errors.
  • Verify that the API key has sufficient permissions to access project variables to prevent authorization errors.
  • Check the baseUrl is correct for self-hosted GitLab instances to avoid connection issues.

Links

Discussion