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 Attachment - Delete operation, it allows users to delete an attachment resource by specifying its ID. This is useful in scenarios where you want to programmatically remove unwanted or outdated attachments from your BookStack instance.

Practical examples include:

  • Automatically cleaning up attachments linked to deleted content.
  • Removing obsolete files to save storage space.
  • Managing attachments as part of a larger content lifecycle automation.

Properties

Name Meaning
ID The unique identifier of the attachment resource to delete. This is required to specify which attachment should be removed.

Output

The node outputs the JSON response returned by the BookStack API after attempting to delete the specified attachment. Typically, this will be an empty object or a confirmation message indicating successful deletion.

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 /attachments/{id} where {id} is the attachment ID.

Troubleshooting

  • Common issues:

    • Providing an invalid or non-existent attachment ID will result in an error from the API.
    • Missing or incorrect API credentials will cause authentication failures.
    • Network connectivity problems can prevent the request from reaching the BookStack server.
  • Error messages and resolutions:

    • 404 Not Found: The specified attachment ID does not exist. Verify the ID is correct.
    • 401 Unauthorized: Authentication failed. Check that the API token and base URL are correctly set.
    • 400 Bad Request: The request parameters may be malformed. Ensure the ID is provided and valid.

Links and References

Discussion