API: Add ability to sort / order content within a book #3848

Closed
opened 2026-02-05 07:39:42 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @riton on GitHub (Jun 11, 2023).

API Endpoint or Feature

I was unable to find an API call / endpoint that lets me adjust the order of content within a book.

I was only able to find an HTML view that let me do that and seem to call BookSortController for me.

Use-Case

At IN2P3-CC, we're planning to manage part of our documentation from Gitlab. CI/CD jobs would then update Bookstack according to the Gitlab repository content which acts as our source of truth.

If new pages or chapters are inserted right in the middle of other pages or chapters within the Gitlab repository, we require programmatic possibility to modify the book chapters and pages order to match the one represented in our Gitlab repository.

Additional context

Thanks in advance for your time and consideration

Originally created by @riton on GitHub (Jun 11, 2023). ### API Endpoint or Feature I was unable to find an API call / endpoint that lets me adjust the **order** of content within a book. I was only able to find an _HTML_ view that let me do that and seem to call [BookSortController](https://github.com/BookStackApp/BookStack/blob/af0b4fa851d8acda52d6176d6e9b2aef2448b499/app/Entities/Controllers/BookSortController.php#L52) for me. ### Use-Case At [IN2P3-CC](https://cc.in2p3.fr/en/), we're planning to manage part of our documentation from Gitlab. CI/CD jobs would then update `Bookstack` according to the _Gitlab repository content_ which acts as our _source of truth_. If new _pages_ or _chapters_ are inserted right in the middle of _other pages or chapters_ within the Gitlab repository, we require programmatic possibility to modify the _book chapters and pages_ order to match the one represented in our Gitlab repository. ### Additional context Thanks in advance for your time and consideration
OVERLORD added the 🔩 API Request label 2026-02-05 07:39:42 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Aug 21, 2023):

Thanks to @rouet in #4313 this functionality is now merged to be part of the next feature release.
A priority integer property can be provided on chapters and pages to control the ordering (smallest to largest priority).

@ssddanbrown commented on GitHub (Aug 21, 2023): Thanks to @rouet in #4313 this functionality is now merged to be part of the next feature release. A `priority` integer property can be provided on chapters and pages to control the ordering (smallest to largest priority).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3848