Get your reading position
GET
/api/v1/publications/{publicationId}/progress
const url = 'http://localhost:8080/api/v1/publications/1/progress';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:8080/api/v1/publications/1/progress \ --header 'Authorization: Bearer <token>'Revision 0 with a null locator means nothing has been saved yet. A demo account always gets that, since its positions aren’t kept.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”publicationId
required
integer format: int64
Responses
Section titled “Responses”The saved position.
Media typeapplication/json
object
revision
required
Counts saves; 0 when nothing has been saved.
integer format: int64
locator
required
One of:
A Readium Locator. The server checks the fields below and stores the rest as sent, up to 16 KiB in all.
object
href
required
string
type
required
The resource’s media type.
string
title
string
locations
object
fragments
Array<string>
progression
Position within the resource.
number
totalProgression
Position within the publication.
number
position
integer
text
object
before
string
highlight
string
after
string
null
device
required
The device name of the session that saved it.
string | null
updatedAt
required
string | null format: date-time
Example
{ "locator": { "type": "application/xhtml+xml" }}The request has no valid session token.
Media typeapplication/json
object
code
required
string
message
required
Explains the problem to a developer.
string
Example
{ "code": "bad_request"}The resource does not exist.
Media typeapplication/json
object
code
required
string
message
required
Explains the problem to a developer.
string
Example
{ "code": "bad_request"}The server failed; details are in its log.
Media typeapplication/json
object
code
required
string
message
required
Explains the problem to a developer.
string
Example
{ "code": "bad_request"}