GitLab API

GitlabTool

Actions1000

Overview

This node operation deletes a specific project snippet in GitLab by its project ID and snippet ID. It is useful for automating the removal of code snippets or notes associated with a project in GitLab, for example, cleaning up outdated or sensitive snippets programmatically.

Use Case Examples

  1. Automatically delete a project snippet when it is no longer needed to maintain project hygiene.
  2. Remove sensitive snippets from a project as part of a security compliance workflow.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated access.
Authentication Type of authentication used, default is GitLab API key authentication.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET but DELETE is used for this operation.
Path Parameters Parameters required in the URL path to identify the project and snippet to delete.

Output

JSON

  • success - Indicates whether the snippet was successfully deleted.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID and snippet ID are correct and exist in the GitLab instance.
  • Verify that the API key has sufficient permissions to delete project snippets.
  • If skipping authentication, confirm that the GitLab instance allows unauthenticated deletion (rare).
  • Common error messages include 404 Not Found if the snippet or project does not exist, and 403 Forbidden if the API key lacks permissions.

Links

Discussion