List your bookmarks and highlights
GET
/api/v1/publications/{publicationId}/annotations
const url = 'http://localhost:8080/api/v1/publications/1/annotations';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/annotations \ --header 'Authorization: Bearer <token>'Every annotation you made in the publication, in reading order by totalProgression. Ones without it come last, oldest first.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”publicationId
required
integer format: int64
Responses
Section titled “Responses”Your annotations.
Media typeapplication/json
object
items
required
Array<object>
object
id
required
integer format: int64
publicationId
required
integer format: int64
kind
required
string
locator
required
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
color
required
string | null
note
required
string | null
device
required
The device name of the session that last saved it.
string | null
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
Example
{ "items": [ { "kind": "bookmark", "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"}