GitLab API

GitlabTool

Actions905

Overview

This node interacts with the GitLab API, specifically supporting the operation to create CI variables at the admin level via a POST request to the /api/v4/admin/ci/variables endpoint. It is useful for automating the management of CI/CD variables in GitLab, such as adding new environment variables for pipelines in an administrative context.

Use Case Examples

  1. Automate adding new CI variables for GitLab projects or groups.
  2. Integrate GitLab CI variable management into a larger DevOps workflow.

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 The HTTP method to use for the API request, defaulting to GET but supporting POST, PUT, DELETE, HEAD, and PATCH.
Parameter Schema Defines the schema for the parameters of the postApiV4AdminCiVariables operation, required in the request body.
Request Body Schema Schema for the request body of the postApiV4AdminCiVariables operation, used to define the CI variable details to be created.
Request Path The API endpoint path for creating admin CI variables in GitLab, fixed to /api/v4/admin/ci/variables.

Output

JSON

  • response - The JSON response from the GitLab API after creating the CI variable, typically including details of the created variable.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the GitLab API key credential is valid and has admin permissions to create CI variables.
  • Verify the baseUrl is correct and accessible from the environment where the node runs.
  • Check that the request body matches the expected schema for creating CI variables to avoid validation errors.

Links

Discussion