GitLab API

GitlabTool

Actions905

Overview

This node operation deletes a specific snippet from GitLab using the GitLab API. It is useful for automating the removal of code snippets or notes stored in GitLab, especially in workflows that manage code snippets dynamically or clean up unused snippets.

Use Case Examples

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

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication for the API request.
Authentication Specifies the authentication method to use, defaulting to GitLab API authentication.
baseUrl The base URL of the GitLab instance to which the API request is sent.
Method The HTTP method used for the request, default is DELETE for this operation.
Parameter Schema Defines the path parameter 'id' which is the ID of the snippet to delete.
Request Body Schema No request body is required for this delete operation.
Request Path The API endpoint path with a placeholder for the snippet ID.
Path Parameters Collection of path parameters, specifically the 'id' of the snippet to delete.

Output

JSON

  • success - Indicates whether the snippet was successfully deleted.

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure the snippet ID provided is valid and exists in the GitLab instance.
  • Verify that the API authentication credentials are correctly configured and have permission to delete snippets.
  • Check the base URL to ensure it points to the correct GitLab instance.
  • Common error messages include 404 Not Found if the snippet ID does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion