BookStack icon

BookStack

Consume BookStack API

Overview

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

Common scenarios where this node is beneficial include:

  • Fetching a list of all pages within a BookStack instance for reporting or synchronization.
  • Retrieving pages filtered by certain criteria (though filtering is not explicitly shown in the code).
  • Automating content audits or backups by extracting page data.
  • Integrating BookStack page data into other workflows or systems.

Practical example:

  • A user wants to get all pages available in their BookStack documentation to generate an external index or summary.
  • Automatically fetching all pages related to a specific book or chapter (if extended) for further processing.

Properties

Name Meaning
Tool Description Choose how to determine the resource and operation: either "Set Automatically" or "Set Manually".
Request Description When "Set Automatically" is chosen, describe your request in natural language (e.g., "List all pages in book X"). The system uses this description to infer the resource and operation automatically.

Note: For this specific Resource-Operation ("Page" - "Get Many"), only these two properties are relevant based on the provided input properties.

Output

The output is an array of JSON objects representing the retrieved pages from the BookStack API. Each item corresponds to one page resource with its full details as returned by the API under the json field.

The structure of each JSON object matches the BookStack API's page representation, typically including fields like:

  • id: Unique identifier of the page.
  • name: Title of the page.
  • html: HTML content of the page.
  • Other metadata fields related to the page.

No binary data output is produced by this operation.

Dependencies

  • Requires connection to a BookStack instance via its API.
  • Needs an API token credential with appropriate permissions to access page data.
  • The node expects the base URL and authentication tokens to be configured in the credentials.
  • Uses HTTP GET requests to fetch data from endpoints like /pages.

Troubleshooting

  • Common issues:

    • Incorrect or missing API credentials will cause authentication failures.
    • Invalid base URL or network connectivity problems can prevent API calls.
    • If the request description is ambiguous or does not clearly specify the resource/operation when using automatic mode, the node might select incorrect operations or resources.
    • Pagination is handled with offset-based parameters; if many pages exist, ensure pagination settings are adequate.
  • Error messages:

    • Authentication errors usually indicate invalid or expired API tokens.
    • HTTP 404 errors may occur if the endpoint URL is malformed or the resource does not exist.
    • Parsing errors could happen if the API response format changes unexpectedly.
  • Resolutions:

    • Verify API credentials and permissions.
    • Confirm the base URL points to the correct BookStack API endpoint.
    • Use manual mode to explicitly set resource and operation if automatic detection fails.
    • Check network connectivity and firewall settings.

Links and References

Discussion