Cosmere TrackerCosmere Tracker
Docs navigation

Books

List books

GET /api/books

Query parameters

  • pageSize (optional): number of results per page. Defaults to 10. Min 1, max 100.
  • cursor (optional): opaque paging cursor from next.
  • search (optional): filters by title (case-insensitive).
  • sort (optional): allowed values: title (default).
  • include (optional): allowed values: relations.

If include=relations is omitted, worlds and characters are returned as empty arrays.

Filtering & sorting

  • search matches against book title (case-insensitive).
  • sort=title is the only supported sort order right now.

Include relations example

GET /api/books?include=relations

Response

200 OK

{
  "count": null,
  "next": "/api/books?pageSize=10&cursor=...",
  "previous": null,
  "results": [
    {
      "url": "/api/books/d76e8ec4-e5a5-51d2-a788-f6a2d19acfd4",
      "id": "d76e8ec4-e5a5-51d2-a788-f6a2d19acfd4",
      "title": "The Way of Kings",
      "worlds": ["/api/worlds/99a58f64-10bd-5228-ae0b-46279aa515e9"],
      "characters": ["/api/characters/3d2586bc-07b6-5c5f-9edb-00a66e0c68aa"],
      "created_at": "2026-02-19T12:34:56Z",
      "updated_at": "2026-02-19T12:34:56Z"
    }
  ]
}

Error cases

  • 400 Bad Request: invalid cursor, sort, or include.

Get a book

GET /api/books/{id}

Example

GET /api/books/d76e8ec4-e5a5-51d2-a788-f6a2d19acfd4

Response

200 OK

{
  "url": "/api/books/d76e8ec4-e5a5-51d2-a788-f6a2d19acfd4",
  "id": "d76e8ec4-e5a5-51d2-a788-f6a2d19acfd4",
  "title": "The Way of Kings",
  "worlds": ["/api/worlds/99a58f64-10bd-5228-ae0b-46279aa515e9"],
  "characters": ["/api/characters/3d2586bc-07b6-5c5f-9edb-00a66e0c68aa"],
  "created_at": "2026-02-19T12:34:56Z",
  "updated_at": "2026-02-19T12:34:56Z"
}
  • 404 Not Found: book id does not exist.