GitLab API

GitlabTool

Actions1000

Overview

This node operation allows users to create a trigger for a specific project in GitLab by making a POST request to the GitLab API endpoint `/api/v4/projects/{id}/triggers`. It is useful for automating the creation of project triggers, which can be used to trigger CI/CD pipelines or other automated workflows within GitLab projects. For example, a user can specify the project ID and send a request to create a new trigger programmatically as part of their DevOps automation.

Use Case Examples

  1. Creating a new trigger for a GitLab project to automate pipeline runs.
  2. Automating project trigger creation in bulk for multiple projects via workflow automation.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated endpoints.
Authentication Type of authentication used for the request, defaulting to GitLab API key authentication.
baseUrl Base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET but POST is used for this operation.
Path Parameters Parameters to be included in the request path, specifically the project ID for this operation.

Output

JSON

  • id - The ID of the created trigger.
  • token - The token associated with the created trigger.
  • description - Description of the trigger.
  • created_at - Timestamp when the trigger was created.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and accessible with the authenticated user.
  • Verify that the GitLab API key credential is valid and has sufficient permissions to create triggers on the project.
  • Check the base URL to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.
  • Common error messages include 401 Unauthorized (invalid or missing authentication), 404 Not Found (project ID does not exist), and 400 Bad Request (invalid request body or parameters).

Links

Discussion