Overview
This node deletes a physical device identified by its unique Device ID from an external system via an API call. It is useful in automation workflows where devices need to be programmatically removed, such as decommissioning hardware, cleaning up test devices, or managing device lifecycle in bulk.
For example, if you have a list of device IDs that are no longer active or needed, this node can be used to delete each device automatically by sending a DELETE request to the corresponding API endpoint.
Properties
| Name | Meaning |
|---|---|
| Device ID | The unique identifier of the physical device to delete. Example: "device-123". |
Output
The node outputs JSON data for each input item processed, containing:
success: Boolean indicating whether the deletion was successful.message: A message from the API response or a default success message.deviceId: The ID of the device attempted to be deleted.response: The full response object returned from the API call.
If an error occurs and the node is set to continue on failure, the output JSON will include:
success: falseerror: The error message describing what went wrong.statusCode: HTTP status code returned by the API.response: The error response body or text from the API.deviceId: The ID of the device for which deletion failed.
The node does not output binary data.
Dependencies
- Requires an API key credential to authenticate with the external firewall or device management API.
- The API URL is retrieved from the credentials and used as the base URL for the DELETE requests.
- The node sends HTTP DELETE requests to the endpoint
/api/pt/device/{deviceId}.
Troubleshooting
Common issues:
- Invalid or missing Device ID: Ensure the Device ID is correctly provided and exists in the external system.
- Authentication failures: Verify that the API key credential is valid and has sufficient permissions.
- Network or connectivity problems: Check network access to the API endpoint.
- API errors such as 404 (device not found) or 403 (forbidden) may occur if the device does not exist or the user lacks permission.
Error messages:
- Errors include detailed information such as HTTP status code and response body.
- If the node is not set to continue on failure, it throws an error with details including the device ID, status code, and response content.
- To handle errors gracefully, enable "Continue On Fail" in the node settings.
Links and References
- Refer to your external device management API documentation for details on the DELETE
/api/pt/device/{deviceId}endpoint. - n8n HTTP Request node documentation for understanding HTTP methods and error handling: https://docs.n8n.io/nodes/n8n-nodes-base.httpRequest/