Add assign book to shelf to API #5209

Closed
opened 2026-02-05 09:48:35 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @MisterDeee on GitHub (Mar 7, 2025).

API Endpoint or Feature

This is similar to #3886 in that my use case is similar, but instead of changing the existing create/update book API, I would request a specific endpoint that would be utilized to assign a book to a shelf.

Use-Case

I have an auto-importer wired into my Gitea Actions and it's cumbersome to manually drag books after each new import. It's not killing me to have to do it, this is for sure more a quality of life improvement.

Additional context

Happy to provide any more information you might require, and very happy to beta test this! :)

Originally created by @MisterDeee on GitHub (Mar 7, 2025). ### API Endpoint or Feature This is similar to #3886 in that my use case is similar, but instead of changing the existing create/update book API, I would request a specific endpoint that would be utilized to assign a book to a shelf. ### Use-Case I have an auto-importer wired into my Gitea Actions and it's cumbersome to manually drag books after each new import. It's not killing me to have to do it, this is for sure more a quality of life improvement. ### Additional context Happy to provide any more information you might require, and very happy to beta test this! :)
OVERLORD added the 🔩 API Request label 2026-02-05 09:48:35 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Mar 7, 2025):

Hi @MisterDeee,

Just want to confirm that you're aware that it is already possible to add books to a shelf via the API.
It does take two requests for a generic "append" of a book, but it is possible via:

  • Read the target shelf to get the ids of existing books.
  • Update the shelf via the Shelves - Update PUT endpoint, passing in an array of ids as a books parameter, with your new book added in.
@ssddanbrown commented on GitHub (Mar 7, 2025): Hi @MisterDeee, Just want to confirm that you're aware that it is already possible to add books to a shelf via the API. It does take two requests for a generic "append" of a book, but it is possible via: - Read the target shelf to get the ids of existing books. - Update the shelf via the `Shelves - Update` PUT endpoint, passing in an array of ids as a `books` parameter, with your new book added in.
Author
Owner

@MisterDeee commented on GitHub (Mar 7, 2025):

Ah! Nope, not aware, but I am now, thanks for that! I'll use that in the importer, thanks again! I'll close this one out.

@MisterDeee commented on GitHub (Mar 7, 2025): Ah! Nope, not aware, but I am now, thanks for that! I'll use that in the importer, thanks again! I'll close this one out.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5209