Directus (flagbit) icon

Directus (flagbit)

Consume Directus API

Overview

This node is designed to interact with a resource called "Preset" and specifically supports the "Delete" operation. It allows users to delete a preset by specifying its unique identifier (ID). This functionality is useful in scenarios where you need to programmatically remove saved configurations, templates, or presets from a system, such as cleaning up unused presets or managing resources dynamically.

For example, if you have a collection of user-defined presets for a design tool or automation workflow, this node can be used to delete a specific preset by providing its ID.

Properties

Name Meaning
ID The primary key of the preset to delete. This is a required string value that uniquely identifies the preset to be removed.

Output

The output of the node will typically include a JSON object indicating the result of the delete operation. This may contain confirmation of deletion or status information. Since the source code delegates execution to a router method, the exact structure depends on the underlying API response but generally confirms whether the preset was successfully deleted.

No binary data output is expected from this operation.

Dependencies

  • The node relies on an external API or service that manages presets.
  • An API authentication token or key is required to authorize the delete request.
  • The node uses internal methods and routing logic imported from bundled dependencies to perform the operation.

Troubleshooting

  • Missing or invalid ID: If the ID property is not provided or incorrect, the node will likely fail to delete the preset. Ensure the ID is correct and corresponds to an existing preset.
  • Authorization errors: Failure due to missing or invalid API credentials will prevent deletion. Verify that the API key or authentication token is correctly configured.
  • Network or API errors: Connectivity issues or server errors from the external service may cause the operation to fail. Check network connectivity and API service status.
  • Preset not found: Attempting to delete a non-existent preset ID may return an error or no effect. Confirm the preset exists before deletion.

Links and References

  • Refer to the external API documentation for the Preset resource to understand the delete endpoint and expected responses.
  • n8n documentation on creating and using custom nodes for API integrations.

Discussion