Directus (denkhaus) icon

Directus (denkhaus)

Consume Directus API

Overview

The "Delete Multiple" operation for the "Permission" resource in this custom n8n node allows users to delete several permission records at once by specifying their primary keys. This is useful in scenarios where bulk removal of permissions is needed, such as cleaning up outdated access controls or managing user roles efficiently.

Practical Example:
Suppose you have a list of permission IDs that are no longer required. By providing these IDs as input, this node will remove all corresponding permissions in a single workflow step, streamlining administrative tasks.

Properties

Name Meaning
Keys (JSON) An array of permission primary keys to be deleted. Example: [34, 64]. Required field.

Output

  • The output will contain a json field summarizing the result of the deletion operation.
  • The structure typically includes information about which permissions were deleted and may include status or error details if any deletions failed.

Dependencies

  • This node depends on connectivity to a Directus v1 API instance.
  • Proper authentication (such as an API key or credentials) must be configured in n8n for successful operation.

Troubleshooting

  • Invalid JSON Input: If the "Keys (JSON)" property is not a valid JSON array, the node may throw a parsing error. Ensure the input is formatted correctly, e.g., [34, 64].
  • Missing Permissions: If some provided keys do not correspond to existing permissions, the output may indicate which deletions failed.
  • Authentication Errors: If API credentials are missing or incorrect, the node will fail to connect to the Directus API.

Links and References

Discussion