GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation allows users to create a protected tag in a specific GitLab project by sending a POST request to the GitLab API endpoint `/api/v4/projects/{id}/protected_tags`. It is useful for managing GitLab project tags with protection rules, ensuring that only authorized users can create or modify certain tags. Practical examples include automating the protection of release tags in CI/CD pipelines or enforcing tag policies in project workflows.

Use Case Examples

  1. Automate the creation of protected tags for release versions in a GitLab project.
  2. Enforce tag protection policies by programmatically adding protected tags to projects.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used for the request, defaulting to GitLab API key.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET but POST is used for this operation.
Parameter Schema Schema defining the path parameter 'id' (project ID or URL-encoded path) and the request body for creating a protected tag.
Request Body Schema Schema for the request body to create a protected tag, required for this operation.
Request Path API endpoint path for creating a protected tag in a project.
Path Parameters Collection of path parameters, specifically the 'id' of the project where the protected tag will be created.

Output

JSON

  • response - The JSON response from the GitLab API after creating the protected tag, containing details of the created protected tag.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID or URL-encoded path provided in the 'id' path parameter is correct and accessible.
  • Verify that the authentication credentials (GitLab API key) are valid and have sufficient permissions to create protected tags in the project.
  • Check that the request body conforms to the expected schema for creating a protected tag; missing or invalid fields may cause errors.
  • Common error messages include 401 Unauthorized (invalid or missing credentials), 404 Not Found (project not found), and 400 Bad Request (invalid request body). Resolving these involves correcting credentials, project ID, or request body format.

Links

Discussion