Skip to content

BookStack API - Shelf Information in Book Read #6006

@sam-marteau

Description

@sam-marteau

Describe the feature you'd like

When calling the "Book Read" REST request (book/{id}) it would be nice to have additional information to which shelves it is connected (at leaast shelf ID)

Describe the benefits this would bring to existing BookStack users

Since book permissions can be inherited from shelves, it would be nice to directly request shelf permitions without iterating through all shelfs and checking if they contain the respective book. So when new books are created it would be possible to set shelf inherited permissions more easily.

Can the goal of this request already be achieved via other means?

Currently i have a workflow like this:

  1. Webhook Node → Receive bookId
  2. HTTP Request → Get list of all shelves
  3. SplitInBatches Node → Loop through each shelf
  4. HTTP Request → Get books on each shelf
  5. IF Node → Check if bookId exists on the shelf
  6. HTTP Request → Get role permissions for the shelf if the book is found
  7. Final Action → Process the role permissions

So instead of a tons of requests, i only would need 3 (+x depending on connected shelves):

  1. Get book ID and connected shelf IDs
  2. Get shelf permissions
  3. Put respective permissions on the book

Have you searched for an existing open/closed issue?

  • I have searched for existing issues and none cover my fundamental request

How long have you been using BookStack?

Under 3 months

Additional context

i admit there there is a closed issue #3968
I would really like to ask you to reconsider this. Because there is the option in the GUI to copy permissions from shelf to book level. However, achieving this via the API is very complicated and resource-consuming.

Another solution would be, that books automatically inherit the permissions from the shelf with the most far-reaching permissions they are assigned to.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions