BookStack icon

BookStack

Consume BookStack API

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's Update operation, it updates an existing role by its ID. This is useful when you need to modify role details in your BookStack instance programmatically, such as changing role names or permissions.

Practical examples include:

  • Updating a role’s name or description after organizational changes.
  • Automating role management workflows within BookStack from n8n.

Properties

Name Meaning
ID The unique identifier of the Role resource to update. This is required to specify which role to modify.

Note: The provided properties JSON only includes the ID property relevant for the update operation on the Role resource. Other properties like name or description are not explicitly listed but may be supported based on the general pattern seen in the code (though not confirmed here).

Output

The node outputs the JSON response returned by the BookStack API after updating the role. This typically contains the updated role object with its current properties reflecting the changes made.

No binary data output is indicated or handled by this node.

Dependencies

  • Requires connection to a BookStack instance via its API.
  • Needs an API token credential consisting of a base URL and authentication tokens.
  • The node expects these credentials to be configured in n8n under a generic API key/token authentication method.

Troubleshooting

  • Missing or invalid ID: If the ID parameter is missing or incorrect, the API will likely return a 404 Not Found or similar error. Ensure the correct role ID is provided.
  • Authentication errors: If the API token or base URL is misconfigured, authentication will fail. Verify credentials and endpoint URLs.
  • Permission issues: The API user must have sufficient rights to update roles; otherwise, the request will be denied.
  • Invalid payload: Since the update payload is constructed dynamically, ensure that any additional fields (like name or description) conform to the API requirements.

Links and References

Discussion