Actions109
- Activity Actions
- Assets Actions
- Authentication Actions
- Collections Actions
- Extensions Actions
- Fields Actions
- Files Actions
- Folders Actions
- Items Actions
- Permissions Actions
- Presets Actions
- Relations Actions
- Revisions Actions
- Roles Actions
- Settings Actions
- Users Actions
- Utilities Actions
- Webhooks Actions
Overview
This node integrates with the Directus API to manage folders within a Directus project. Specifically, the "Delete Multiple" operation under the "Folders" resource allows users to delete multiple folders at once by specifying their primary keys. This is useful for batch cleanup or management of folder structures in Directus.
Practical scenarios include:
- Removing several obsolete or temporary folders in one action.
- Automating folder maintenance tasks where multiple folders need to be deleted based on certain criteria.
- Integrating with workflows that require bulk deletion of folders after processing files or data.
Properties
| Name | Meaning |
|---|---|
| Keys (JSON) | An array of folder primary keys (UUIDs) to be deleted. Example: ["uuid1", "uuid2"] |
Output
The output JSON contains the response from the Directus API after attempting to delete the specified folders. It typically includes information about the success or failure of the deletion request. The exact structure depends on the Directus API's response but generally confirms which folders were deleted or any errors encountered.
No binary data output is involved in 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 folders.
- Proper permissions are needed in Directus to delete folders.
- No additional environment variables are required beyond the API authentication setup.
Troubleshooting
- Invalid or missing keys: If the provided keys array is empty, malformed, or contains invalid UUIDs, the API will likely return an error. Ensure the keys are valid folder IDs.
- Permission errors: Lack of sufficient permissions to delete folders in Directus will cause authorization errors. Verify the API key has delete rights on folders.
- Network or connectivity issues: Failure to reach the Directus API endpoint will result in request errors. Check network access and API URL correctness.
- API rate limits or server errors: If the Directus server returns errors due to rate limiting or internal issues, retry later or check server health.
- Malformed JSON input: Since the keys property expects JSON, ensure it is correctly formatted and parsed.
Common error messages may include:
- Unauthorized or forbidden access errors.
- Not found errors if keys do not correspond to existing folders.
- Bad request errors if the keys parameter is not properly structured.
Resolving these usually involves verifying credentials, input format, and API permissions.