Directus icon

Directus

Consume Directus API

Overview

This node integrates with the Directus API, a headless CMS and data platform. Specifically, for the Roles resource with the Delete Multiple operation, it allows users to delete multiple roles at once by providing an array of role primary keys.

This operation is useful in scenarios where you need to clean up or manage user roles in bulk within a Directus-managed system. For example, if certain roles are deprecated or no longer needed, this node can efficiently remove them all in one request rather than deleting each role individually.

Properties

Name Meaning
Keys (JSON) An array of role primary keys (IDs) to be deleted. Example: ["uuid1", "uuid2", ...]

Output

The output JSON contains the response from the Directus API after attempting to delete the specified roles. Typically, this will include information about the deletion result, such as success confirmation or details on any roles that could not be deleted.

No binary data output is produced by this operation.

Dependencies

  • Requires an active connection to a Directus instance via an API key credential.
  • The node uses the Directus REST API endpoint for roles.
  • Proper permissions must be granted to the API key to perform delete operations on roles.

Troubleshooting

  • Invalid Keys Format: Ensure the "Keys (JSON)" property is a valid JSON array of strings representing role IDs. Malformed JSON or incorrect types will cause errors.
  • Permission Denied: If the API key lacks permission to delete roles, the API will return an authorization error.
  • Non-existent Role IDs: Attempting to delete roles that do not exist may result in partial success or errors.
  • API Connectivity Issues: Network problems or incorrect Directus API URL/credentials will prevent successful requests.

To resolve errors:

  • Validate the JSON input format.
  • Confirm API credentials have sufficient permissions.
  • Verify the role IDs exist in the Directus instance.
  • Check network connectivity and API endpoint configuration.

Links and References

Discussion