Portainer icon

Portainer

Trabalhe com dados da API do Portainer para gerenciar Docker

Overview

This node allows you to manage webhooks in Portainer, specifically enabling the deletion of a webhook by its ID. It is useful when you want to programmatically remove webhooks that are no longer needed or valid, helping maintain a clean and organized set of webhook configurations.

Practical examples include:

  • Automatically cleaning up webhooks after a deployment pipeline finishes.
  • Removing obsolete or test webhooks to prevent unwanted triggers.
  • Managing webhook lifecycle as part of infrastructure automation.

Properties

Name Meaning
Webhook ID The unique identifier of the webhook to delete.
Force Delete Whether to force deletion even if the webhook resource is currently in use (true/false).

Output

The node outputs JSON data representing the response from the Portainer API after attempting to delete the specified webhook. Typically, this will be an empty object or confirmation of successful deletion. No binary data is output by this operation.

Dependencies

  • Requires an API key credential for authenticating with the Portainer API.
  • The node uses the base URL configured in the credentials to send HTTP DELETE requests to the /webhooks/{webhookId} endpoint.
  • Proper network access to the Portainer API server is necessary.

Troubleshooting

  • Invalid Webhook ID: If the provided webhook ID does not exist, the API may return a 404 error. Verify the ID is correct.
  • Permission Denied: Insufficient permissions or invalid API key can cause authorization errors. Ensure the API key has rights to delete webhooks.
  • Resource In Use: If Force Delete is false and the webhook is in use, deletion might fail. Enable Force Delete to override.
  • Network Issues: Connectivity problems to the Portainer API will cause request failures. Check network and API availability.

Links and References

Discussion