BookStack icon

BookStack

Consume BookStack API

Role → Get

AI-generated

Overview

This node integrates with the BookStack API to manage roles and other resources such as books, pages, chapters, shelves, users, attachments, and tags. Specifically for the Role - Get operation, it retrieves detailed information about a specific role by its ID.

Common scenarios where this node is beneficial include:

  • Fetching role details to understand permissions or access levels assigned within BookStack.
  • Automating workflows that require role validation or auditing.
  • Integrating role data into broader documentation or user management systems.

Practical example:

  • You want to retrieve the details of a role with a known ID to display its permissions in an internal dashboard or to verify if a user has the correct role assigned before performing certain actions.

Properties

Name Meaning
Tool Description Choose how to determine the resource and operation:
- Set Automatically
- Set Manually
Request Description (Shown only if "Set Automatically" is selected) Describe your request in natural language; the system will try to infer the appropriate resource and operation automatically. Example: "Get role with ID 5".
ID The unique identifier of the role to retrieve. Required for operations: get, update, delete.

Output

The output JSON contains the full response from the BookStack API for the requested role. This typically includes fields such as:

  • id: The role's unique identifier.
  • name: The name of the role.
  • permissions: An array or object describing the permissions associated with the role.
  • Other metadata related to the role as provided by the BookStack API.

No binary data is output by this node.

Example output snippet (simplified):

{
  "id": 5,
  "name": "Editor",
  "permissions": [
    "view-books",
    "edit-pages",
    "delete-comments"
  ],
  ...
}

Dependencies

  • Requires connection to a BookStack instance via its API.
  • Needs an API token credential configured in n8n with:
    • Base URL of the BookStack server.
    • Authentication token and secret.
  • The node uses HTTP requests authenticated with these credentials to interact with the BookStack API.

Troubleshooting

  • Missing or invalid ID: If the ID property is empty or incorrect, the API call will fail. Ensure the ID corresponds to an existing role.
  • Authentication errors: If the API token or base URL is misconfigured, the node will return authentication errors. Verify credentials are correctly set up.
  • Resource not found: If the role ID does not exist, the API will return a 404 error. Confirm the role ID is valid.
  • Automatic detection issues: When using "Set Automatically" mode with a natural language description, ambiguous or unclear descriptions may lead to incorrect resource or operation selection. Use manual mode for precise control.

Links and References

Discussion