Actions31
Overview
This node integrates with the BookStack API to manage various resources such as books, pages, chapters, shelves, users, roles, attachments, and tags. Specifically, for the Role resource, the Delete operation allows users to remove a role by specifying its ID. This is useful in scenarios where you need to programmatically manage user permissions or clean up unused roles within your BookStack instance.
Practical example:
- Automatically deleting a role when it is no longer needed after a project ends.
- Cleaning up roles that were created temporarily for specific tasks.
Properties
| Name | Meaning |
|---|---|
| ID | The unique identifier of the Role resource to delete. This property is required for the Delete operation. |
Output
The node outputs JSON data representing the response from the BookStack API after attempting to delete the specified role. Typically, for a successful deletion, the API may return an empty object or confirmation message indicating the resource was deleted. No binary data output is involved in this operation.
Dependencies
- Requires an API key credential for authenticating with the BookStack API.
- The base URL of the BookStack instance must be configured in the credentials.
- The node uses HTTP DELETE requests to the endpoint
/roles/{id}where{id}is the Role ID.
Troubleshooting
Common issues:
- Providing an invalid or non-existent Role ID will result in an error from the API (e.g., 404 Not Found). Verify the ID before attempting deletion.
- Authentication errors if the API token or base URL is incorrect or missing. Ensure credentials are properly set up.
- Network connectivity issues can prevent the request from reaching the BookStack server.
Error messages:
- "Resource not found" — The Role ID does not exist; check the ID value.
- "Unauthorized" or "Forbidden" — The API token lacks permission to delete roles; verify API credentials and permissions.
- "Invalid request" — Missing required parameters; ensure the ID is provided.
Links and References
- BookStack API Documentation (general reference for endpoints and authentication)
- n8n documentation on HTTP Request Node for understanding underlying HTTP operations.