GitLab API

GitlabTool

Actions905

Overview

This node operation allows creating a new feature flag for a specific project in GitLab via the GitLab API. It is useful for developers and DevOps teams who want to manage feature flags programmatically within their CI/CD pipelines or automation workflows. For example, you can automate the enabling or disabling of features in your application based on deployment stages or user segments.

Use Case Examples

  1. Creating a feature flag for a project to enable a new feature only for beta testers.
  2. Automating the rollout of a feature by creating and managing feature flags through GitLab API calls.

Properties

Name Meaning
Skip Authentication Determines whether to skip API authentication for the request.
Authentication Specifies the authentication method to use, typically a GitLab API key.
baseUrl The base URL of the GitLab instance to which the API requests are sent.
Method The HTTP method used for the API request, here it is POST for creating a feature flag.
Path Parameters Parameters included in the API request path, specifically the project ID or URL-encoded path to identify the project for which the feature flag is created.

Output

JSON

  • id - The unique identifier of the created feature flag.
  • name - The name of the feature flag.
  • description - Description of the feature flag.
  • active - Indicates whether the feature flag is active.
  • version - Version number of the feature flag.
  • created_at - Timestamp when the feature flag was created.
  • updated_at - Timestamp when the feature flag was last updated.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID provided in the path parameters is correct and accessible with the provided API key.
  • Verify that the API key has sufficient permissions to create feature flags in the specified 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 authentication failures (401 Unauthorized) and resource not found (404 Not Found) if the project ID is invalid.

Links

Discussion