Portainer icon

Portainer

Interact with Portainer via API

Actions190

Endpoints → Endpoint Snapshot

AI-generated

Overview

This node interacts with the Portainer API to perform operations related to managing Portainer resources. Specifically, the "Endpoint Snapshot" operation under the "Endpoints" resource allows users to retrieve a snapshot of a particular environment (endpoint) managed by Portainer. This can be useful for backing up or inspecting the current state of an endpoint.

Practical examples include:

  • Automating backups of environment configurations.
  • Integrating Portainer environment snapshots into broader infrastructure monitoring workflows.
  • Quickly retrieving environment details for auditing or troubleshooting purposes.

Properties

Name Meaning
Id The unique identifier of the environment (endpoint) for which the snapshot is requested. This is a required numeric value.

Output

The node outputs JSON data representing the snapshot of the specified Portainer environment. This JSON typically contains detailed information about the environment's configuration and state at the time of the snapshot.

If the node supports binary data output (not explicitly shown in the provided code), it would likely represent exported snapshot files or similar artifacts, but based on the static analysis, the primary output is JSON.

Dependencies

  • Requires an active connection to a Portainer instance via its API.
  • Needs an API authentication token or key configured in the node credentials to authorize requests.
  • The base URL for the Portainer API must be set in the credentials.

Troubleshooting

  • Invalid or missing Id: Ensure that the "Id" property is provided and corresponds to a valid environment in Portainer.
  • Authentication errors: Verify that the API key or token is correctly configured and has sufficient permissions.
  • Network issues: Confirm that the n8n instance can reach the Portainer API endpoint.
  • Unexpected response format: If the Portainer API changes, the node might fail to parse the snapshot data correctly.

Links and References

Discussion