Public API - HEAD Publishing
Preambule
Public REST API can be used to get a list of books as well as download finished book in specified format (PDF, EPUB). As for HEAD publishing proposal we don't just want to get the PDF from a folder but for it to be created dynamically. This will allow for further iterations on the layout design of the PDF and also water labeling with the name of the person that downloads it and date of export (not encompassed in this proposal); This is why the Public API proposal is linked with the issue #308 as without PagedJs hooks it would just be an static API export with no changes per export.
1.Schema changes from current implementation
Yellow – New entities Green – Existing entities Red – Removed entities
2. UX Mockup
3. Business logic
- Production Editor can create Versioned Book by triggering “Publish” action
- a. Versioned Book is a complete copy on a database level of Draft Book including all its components and assets
- b. Draft book should be validated prior to creation of Versioned Book
- c. Versioned Book can not be edited after creation
- d. Versioned Book has version string (semver)
- e. Versioned Book can be retrieved via public API
4. REST API specification
Published Book version can be retrieved via public REST API
GET /public/book
Get list of Publications Including all Versioned Books it contains.
GET /public/book/?bookId=&format=<pdf|epub>
Get book content in specified format. Should be able to get any of book versions.
As proposed in issue #356 this will be the issue for Book Versions/Public API. https://docs.google.com/document/d/1wsK2arbGImqcvyQAnTZmEdcz3JkqmfRE_Pah2q0WH70/edit#heading=h.x3f01qtqkb7z