API: Usage of the offset parameter leads to incorrect total on response #1662

Closed
opened 2026-02-05 01:32:17 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @ssddanbrown on GitHub (Apr 16, 2020).

http://bookstack.local/api/books?count=1&offset=1

Shows:

{
"data": [
{
"id": 2,
"name": "Inventore inventore quia voluptatem.",
"slug": "qPJfPdZ2eS",
"description": "Veniam nihil voluptas enim laborum corporis quos sint. Ab rerum voluptas ut iste voluptas magni quibusdam ut. Amet omnis enim voluptate neque facilis.",
"created_at": "2019-05-05 22:10:14",
"updated_at": "2019-12-11 20:57:23",
"created_by": 4,
"updated_by": 3,
"image_id": 34
}
],
"total": 0
}

even though there are 19 books in the system.

Originally created by @ssddanbrown on GitHub (Apr 16, 2020). ``` http://bookstack.local/api/books?count=1&offset=1 ``` Shows: ```json { "data": [ { "id": 2, "name": "Inventore inventore quia voluptatem.", "slug": "qPJfPdZ2eS", "description": "Veniam nihil voluptas enim laborum corporis quos sint. Ab rerum voluptas ut iste voluptas magni quibusdam ut. Amet omnis enim voluptate neque facilis.", "created_at": "2019-05-05 22:10:14", "updated_at": "2019-12-11 20:57:23", "created_by": 4, "updated_by": 3, "image_id": 34 } ], "total": 0 } ``` even though there are 19 books in the system.
OVERLORD added the 🐛 Bug🏭 Back-End labels 2026-02-05 01:32:17 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1662