GitLab API

GitlabTool

Actions1000

Overview

This node operation allows users to create a new runner for their GitLab user account by making a POST request to the GitLab API endpoint `/api/v4/user/runners`. It is useful for automating the management of GitLab runners, which are used to run CI/CD jobs. For example, a DevOps engineer can use this node to programmatically register new runners without manually interacting with the GitLab UI.

Use Case Examples

  1. Automatically register a new GitLab runner when provisioning new infrastructure.
  2. Integrate runner creation into a CI/CD pipeline setup process.

Properties

Name Meaning
Skip Authentication If set to true, the node will skip using authentication for the API request.
Authentication The authentication method to use for the API request, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the API request is sent, defaulting to https://gitlab.com.
Method The HTTP method to use for the API request, defaulting to POST for this operation.
Parameter Schema The schema defining the parameters required in the request body for creating a user runner.
Request Body Schema The schema defining the structure of the request body for the API call.
Request Path The API endpoint path for creating a user runner, fixed to `/api/v4/user/runners`.

Output

JSON

  • id - The unique identifier of the created runner.
  • description - Description of the runner.
  • active - Indicates if the runner is active.
  • is_shared - Indicates if the runner is shared across projects.
  • runner_type - Type of the runner (e.g., instance, group, project).
  • tags - Tags associated with the runner.
  • created_at - Timestamp when the runner was created.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the GitLab API key credential is correctly configured and has sufficient permissions to create runners.
  • Verify the base URL is correct and accessible from the n8n instance.
  • Check that the request body matches the required schema for creating a runner; missing or invalid fields can cause errors.
  • Common error messages include authentication failures (401 Unauthorized) and validation errors (400 Bad Request). Resolving these involves checking credentials and request payload respectively.

Links

Discussion