Download a publication from OPDS
const url = 'http://localhost:8080/opds/v2/publications/1/file';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/opds/v2/publications/1/file \ --header 'Authorization: Bearer <token>'The same as /api/v1/publications/{publicationId}/file, with an OPDS sign-in challenge on 401.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”The original file.
The requested byte range.
The client’s copy is current.
No valid credentials. The Basic challenge and the Authentication for OPDS document both ask for a name and password.
An Authentication for OPDS document offering HTTP Basic sign-in.
object
object
object
Example
{ "authentication": [ { "type": "http://opds-spec.org/auth/basic" } ]}Headers
Section titled “Headers”Example
Basic realm="Chek", charset="UTF-8"Example
<https://chek.example/opds/v2/auth>; rel="http://opds-spec.org/auth/document"; type="application/opds-authentication+json"The resource does not exist.
object
Explains the problem to a developer.
Example
{ "code": "bad_request"}The file changed on disk since it was scanned. A rescan has started; retry after it finishes.
object
Explains the problem to a developer.
Example
{ "code": "bad_request"}The server failed; details are in its log.
object
Explains the problem to a developer.
Example
{ "code": "bad_request"}The publication is from a source library, and its source couldn’t be
read (source_unavailable) or its extension failed (source_failed);
the message says why.
object
Explains the problem to a developer.
Example
{ "code": "bad_request"}