BookStack icon

BookStack

Consume BookStack API

Overview

This node integrates with the BookStack API, allowing users to manage BookStack resources such as books, pages, chapters, shelves, users, roles, attachments, and tags. Specifically for the Book resource with the Get Many operation, it retrieves multiple book records from the BookStack system.

Common scenarios where this node is beneficial include:

  • Listing all books available in a BookStack instance.
  • Fetching collections of books for reporting or synchronization purposes.
  • Automating workflows that require bulk access to book metadata.

Practical example:

  • A user wants to retrieve all books to display them in an external dashboard or to process their metadata further in an automation workflow.

The node supports two modes for specifying the request:

  • Automatic mode: The user provides a natural language description of the request, and the node attempts to infer the resource and operation.
  • Manual mode: The user explicitly selects the resource and operation.

For the "Get Many" operation on the "Book" resource, the node sends a GET request to the /books endpoint of the BookStack API and returns the list of books.

Properties

Name Meaning
Tool Description Choose how to determine the resource and operation: either "Set Automatically" or "Set Manually".
Request Description (Shown only if "Set Automatically" is selected) A text field where you describe your request in natural language (e.g., "List all books"). The system uses this to automatically select the appropriate resource and operation.

Note: For the "Get Many" operation on the "Book" resource, no additional parameters are required.

Output

The output is an array of JSON objects representing the retrieved books. Each item corresponds to one book resource returned by the BookStack API under the data property.

The structure of each book object typically includes fields such as:

  • id: The unique identifier of the book.
  • name: The name/title of the book.
  • description: A textual description of the book.
  • Other metadata fields as provided by the BookStack API.

If pagination is involved, the node handles it automatically using offset-based pagination with a page size of 100 items per request.

The node does not output binary data for this operation.

Dependencies

  • Requires connection to a BookStack instance via its API.
  • Needs an API token credential with appropriate permissions to read book data.
  • The base URL and authentication tokens must be configured in the node credentials.
  • The node uses HTTP requests with authorization headers formatted as Token <token>:<tokenSecret>.

Troubleshooting

  • Common issues:

    • Incorrect or missing API credentials will cause authentication failures.
    • Providing an invalid base URL or network connectivity issues will prevent API calls.
    • If the automatic mode's natural language description is ambiguous or unclear, the node might select the wrong resource or operation.
  • Error messages:

    • Authentication errors usually indicate invalid or expired API tokens; verify and update credentials.
    • HTTP 404 errors may occur if the resource path is incorrect; ensure the resource is spelled correctly.
    • Rate limiting or server errors from the BookStack API should be handled by retrying after some delay.
  • Resolution tips:

    • Double-check API credentials and base URL configuration.
    • Use manual mode to explicitly set resource and operation if automatic detection fails.
    • Review the natural language request for clarity and specificity when using automatic mode.

Links and References

Discussion