GitLab API

GitlabTool

Actions905

Overview

This node operation deletes a custom header from a specific hook of a project in GitLab via the GitLab API. It is useful for managing webhook configurations by removing custom headers that are no longer needed or were added incorrectly. For example, if a user wants to clean up webhook headers for a project hook, this operation allows them to specify the project ID, hook ID, and the key of the custom header to delete.

Use Case Examples

  1. Deleting a custom header 'X-Custom-Token' from a webhook hook with ID 123 in project with ID 456.
  2. Removing an obsolete custom header from a project hook to ensure only relevant headers are sent with webhook requests.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request (boolean). Defaults to false.
Authentication The authentication method used, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance, default is https://gitlab.com.
Method The HTTP method to use for the request, default is GET but for this operation it is DELETE.
Parameter Schema Defines the required path parameters for the API call: hook_id (hook identifier), key (custom header key), and id (project identifier).
Request Path The API endpoint path template for deleting the custom header from the project hook.
Path Parameters Collection of path parameters including hook_id (hook ID), key (custom header key), and id (project ID) to specify the resource to delete.

Output

JSON

  • success - Indicates whether the custom header was successfully deleted.
  • statusCode - HTTP status code returned by the API after the delete operation.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the provided project ID, hook ID, and custom header key are correct and exist in GitLab.
  • Check that the API key used has sufficient permissions to delete webhook custom headers.
  • Verify the base URL is correct if using a self-hosted GitLab instance.
  • Common error: 404 Not Found - The specified project, hook, or custom header key does not exist.
  • Common error: 401 Unauthorized - Authentication failed due to invalid or missing API key.

Links

Discussion