GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation deletes a specific snippet in GitLab by its ID. It is useful for automating the removal of code snippets stored in GitLab, for example, cleaning up outdated or unnecessary snippets programmatically.

Use Case Examples

  1. Automatically delete a snippet by ID after it is no longer needed.
  2. Integrate snippet deletion into a CI/CD pipeline to manage code snippets lifecycle.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, default is false meaning authentication is required.
Authentication Type of authentication used, default is GitLab API key, hidden if Skip Authentication is true.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET but for this operation DELETE is relevant.
Path Parameters Parameters to be included in the request path, specifically the snippet ID to delete.

Output

JSON

  • statusCode - HTTP status code of the delete operation response
  • body - Response body from the delete operation, typically empty or confirmation message

Dependencies

  • GitLab API key credential for authentication unless Skip Authentication is true

Troubleshooting

  • Ensure the snippet ID provided in path parameters is valid and exists in the GitLab instance.
  • If authentication is required, verify that the GitLab API key credential is correctly configured and has permissions to delete snippets.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure it is correct.
  • Common error messages include 404 Not Found if the snippet ID does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion