Snapshot Commit icon

Snapshot Commit

Commit device snapshot

Overview

This node commits a snapshot for a specified device by sending a POST request to an external API endpoint. It is useful in scenarios where you need to finalize or save the current state/configuration of a device remotely, such as network devices or firewalls, ensuring that changes are persisted.

Practical examples include:

  • Committing configuration snapshots after updates on network devices.
  • Automating backup of device states in a network management workflow.
  • Integrating with firewall or device management APIs to maintain consistent device configurations.

Properties

Name Meaning
Device ID The unique identifier of the device for which the snapshot commit operation will be performed. Example: "device-123".

Output

The node outputs an array of JSON objects, each corresponding to an input item processed. Each output object contains:

  • success (boolean): Indicates whether the snapshot commit was successful.
  • message (string): A message from the API response or a default success message.
  • deviceId (string): The device ID for which the snapshot was committed.
  • response (object): The full response data returned from the API call.

In case of failure (and if the node is set to continue on fail), the output includes:

  • success: false
  • error: Error message describing what went wrong.
  • statusCode: HTTP status code returned by the API.
  • response: Additional response details or error body text.
  • deviceId: The device ID related to the failed request.

The node does not output binary data.

Dependencies

  • Requires an API key credential to authenticate with the external firewall/device management API.
  • The API base URL is retrieved from the credentials and used to construct the request URL.
  • The node sends HTTP POST requests to the /api/pt/snapshot/commit endpoint of the configured API.

Troubleshooting

  • Common issues:

    • Invalid or missing device ID: Ensure the "Device ID" property is correctly set and corresponds to a valid device.
    • Authentication failures: Verify that the API key credential is properly configured and has sufficient permissions.
    • Network or connectivity errors: Check network access to the API endpoint.
    • API errors due to invalid device state or server issues.
  • Error messages:

    • Errors include detailed information such as HTTP status code and response body to help diagnose issues.
    • If the node is not set to continue on fail, it throws an error with a message including the status code, response content, URL, and device ID.
    • To resolve errors, verify the device ID, API credentials, and ensure the API endpoint is reachable and functioning.

Links and References

Discussion