GitLab API

GitlabTool

Actions1000

Overview

This node interacts with the GitLab API to create or manage CI variables at the admin level using the POST method on the /api/v4/admin/ci/variables endpoint. It is useful for automating the management of CI/CD variables in GitLab, especially for administrators who need to programmatically add or update CI variables across projects or groups.

Use Case Examples

  1. Automating the creation of CI variables for multiple projects in GitLab.
  2. Managing environment-specific variables for CI/CD pipelines via API calls.
  3. Integrating GitLab CI variable management into a larger DevOps automation workflow.

Properties

Name Meaning
Skip Authentication Determines whether to skip the authentication process for the API request.
Authentication Specifies the authentication method to use, defaulting to GitLab API key authentication. This property is hidden unless Skip Authentication is false.
baseUrl The base URL of the GitLab instance to which the API requests are sent. Defaults to https://gitlab.com.
Method The HTTP method to use for the API request. Defaults to GET but for this operation POST is used.
Parameter Schema Defines the schema for the parameters expected in the request body for the postApiV4AdminCiVariables operation. This is a hidden property used internally.
Request Body Schema Defines the schema for the request body payload for the postApiV4AdminCiVariables operation. This is a hidden property used internally.
Request Path The API endpoint path for the postApiV4AdminCiVariables operation, fixed to /api/v4/admin/ci/variables.

Output

JSON

  • response - The JSON response from the GitLab API after creating or managing the CI variable.

Dependencies

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

Troubleshooting

  • Authentication errors if the API key is missing or invalid. Ensure the GitLab API key credential is correctly configured.
  • Permission errors if the API user does not have admin rights to manage CI variables.
  • Invalid request body errors if the parameters do not conform to the expected schema for CI variables.
  • Network or base URL misconfiguration errors if the baseUrl is incorrect or the GitLab instance is unreachable.

Links

Discussion