Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

This service provides access to each Bokskya's end user's bookshelf. 

Info

New Authentication & URLs introduced Q2 2024

Get OPDS

Get personal bookshelf for DDS user in OPDS XML format.

 

URL

URL

https://api.bokbasen.io/bokskya/content/v1/{id}

Expand
titleLegacy

https://api.dds.boknett.no/catalog/personal/{ddsId}

MethodGETRequest
headers

Authorization

Required

The token acquired from the Authentication Service.

Formated "

Example: Authorization: Boknett TGT-....

"

Required header: Date

Required

The timestamp the request was made. Must comply with RFC 1123 date formats. Example: Tue, 10 Jun 2014 16:23:42 GMT

Method

GET

Request
headers

Authorization

Required

See Authentication Service

Audience: https://api.bokbasen.io/bokskya/

If-Modified-

Since 

Since

Optional

Used for client caching of feed. See chapter on performance considerations below. See RFC for details.

Response
body on success

XML OPDS feed (See below) or empty body if using "If-Modified-Since" and response is 304.

Response headers

Last-

Modified 

Modified 

Date header showing last time this user's OPDS feed was updated (see RFC for details). Use this date in "If-Modified-Since" when doing your subsequent request.

Returns

200

OK

304

Not modified

40x

On error

...

Performance considerations

...

To support client caching in a efficient way the end point support the "If-Modified-Since" HTTP header, allowing for a quick way of checking if there has been any changes from last time the feed was loaded. When doing a request with this header, you will either receive a 200 OK with a body (meaning there was a changes since last time) or a 304 Not Modified with an empty body (meaning there was not change, so you should go ahead and used you cached version).

Technical details can be found here:

...

When using the If-Modified-Since header it is recommended that you use a date retrieved from the Last-Modified header of a previous request to the same service.

...

 The reason for this is that the service expects that the parsed date retrieved from the If-Modified-Since-header is an exact match (with millisecond precision) to the date used in the Last-Modified header.

...

 The service still respect and parses all the date-formats mentioned in http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 . 

OPDS format

The OPDS format is a specification based on the ATOM feed standard. Each book in the bookshelf is represented as an <entry> element with basic metadata and links to download and cover images. Below are some examples on the typical different types of entries. Note that Bokbasen is using some features from the not yet released version 1.2 in order to support audio books, so validating against the current XSD will not work.

...

Code Block
languagexml
<entry>
	<title>Anna Karenina</title> <!-- Title of the book -->
	<link rel="http://opds-spec.org/image/thumbnail" type="image/jpeg" 
	      href="https://media.boknett.no/objects/07/34/50113407/appcover_OB_affaecfac708e5380b0cd279c2abc3f0bb8b9f79.jpg"/> <!-- Link to cover image -->
	<link rel="http://opds-spec.org/acquisition/open-access" 
	      type="application/json" 
	      href="https://api.dds.boknett.no/content/4c97596d-d03b-4b79-b133-cbaea8a00c1b">
		<opds:indirectAcquisition type="application/epub+zip"/>
	</link> <!-- Link to GET content API for downloading book, opds:indirectAcquisition type has the mime type of the download -->
	<author>
		<name>Tolstoj, Leo</name>
	</author>
	<id>37866ca4-2614-4ec1-9d73-c14d6cbfc12b</id> <!-- Resource-id of the book, note that resource ids change if new version is published -->
	<created>2015-08-17T13:41:46.000Z</created>
	<updated>2015-02-11T12:36:52.000Z</updated>
	<dc:identifier xsi:type="dcterms:URI">urn:uuid:37866ca4-2614-4ec1-9d73-c14d6cbfc12b</dc:identifier> <!-- Resource-id in DC, same as above -->
	<dc:identifier xsi:type="dcterms:URI">urn:isbn:9788201000654</dc:identifier>
	<dc:publisher>Testforlaget</dc:publisher> 
	<dc:issued>2010</dc:issued>
	<dc:language>bm</dc:language>
</entry>

...

Code Block
languagexml
<entry>
   <title>Blod på snø</title>
   <link rel="http://opds-spec.org/image/thumbnail" 
         type="image/jpeg" 
         href="https://media.boknett.no/objects/40/95/150169540/appcover_OB_a0978d82ad8e88d5158305b9ac99bdf885f2e3cb.jpg" />
	<!-- This is deprecated and should not be used for excerpts, just kept for backward compatibility for now. Excerpts should only have rel="http://opds-spec.org/acquisition/sample"  -->
   <link rel="http://opds-spec.org/acquisition/open-access" 
         type="application/json" 
         href="https://api.dds.boknett.no/content/5c736f58-9e18-45df-bb0a-00b5c4cc16d7">
     <opds:indirectAcquisition type="application/epub+zip" />
   </link>
	<!-- Below you can see that this is a sample based on the rel="" attribute -->
   <link rel="http://opds-spec.org/acquisition/sample" 
         type="application/json" 
         href="https://api.dds.boknett.no/content/5c7f6f58-9e18-45df-bb0a-00b5c4cc16d7">
     <opds:indirectAcquisition type="application/epub+zip" />
   </link> 
   <author>
     <name>Nesbø, Jo</name>
   </author>
   <id>1759c8af-6f3c-4177-b5ba-d42ebc21103f</id>
   <created>2015-04-30T19:21:17.000Z</created>
   <updated>2015-03-03T23:00:03.000Z</updated>
   <dc:identifier xsi:type="dcterms:URI">urn:uuid:1759c8af-6f3c-4177-b5ba-d42ebc21103f</dc:identifier>
   <dc:identifier xsi:type="dcterms:URI">urn:isbn:9788203359149</dc:identifier>
   <dc:publisher>Aschehoug</dc:publisher>
   <dc:issued>2015</dc:issued>
   <dc:language>bm</dc:language>
</entry>

...

Code Block
languagexml
<entry>
	<title>Bonden<
    <title>Kvelande kjærleik</title>
   	 <link rel="http://opds-spec.org/image/thumbnail" 
          type="image/jpeg" 
          href="https://media.boknett.webbe.no/objects/3244/2956/150172932150295644/appcoverproductimage_OBM1_5004367eee3beeec88786346248ff7bb1153aca50661d5f330a34416e489bd31f2784ea98eefa5a1.jpg" />
	    <link rel="http://opds-spec.org/acquisition/open-access" 
          type="application/json" 
          href="https://api.dds.boknett.webbe.no/content/21ae3d4f1cff633c-3d543660-47af4a7d-b9f1a9c6-c77b9ad00daec8bf1e6ed15f">
		      <opds:indirectAcquisition type="application/zipaudio/vnd.bokbasen.progressive-private" opds:bitrate="12864" />
		
      <opds:indirectAcquisition type="application/zipaudio/vnd.bokbasen.zipped-private" opds:bitrate="4864" />
		
      <opds:indirectAcquisition type="audio/mpegvnd.bokbasen.complete-private" opds:bitrate="4864" />
		      <opds:indirectAcquisition type="applicationaudio/vnd.applebokbasen.mpegurlcomplete-public" opds:bitrate="4864" />
		      <opds:indirectAcquisition type="audio/mpegvnd.bokbasen.hls-private" opds:bitrate="12864" />
	</link> <!-- Link to GET content API for downloading book, use type and bitrate values with GET content to download the desired format -->
	<author>
		<name>Aukrust, Kjell</name>
	</author>
	<id>3d047cbf-9e01-46ec-a32b-70e29aca3365</id>
	<created>2015-10-01T08:11:06.000Z</created>
	<updated>2015-08-19T07:05:44.000Z</updated>
	      <opds:indirectAcquisition type="audio/vnd.bokbasen.zipped-public" opds:bitrate="64" />
    </link>
    <author>
      <name>Ferrante, Elena</name>
    </author>
    <id>8065f2cc-5c6d-4c38-98be-23832a33f780</id>
    <created>2018-09-12T06:27:42.000Z</created>
    <updated>2018-07-02T13:15:37.000Z</updated>
    <dc:identifier xsi:type="dcterms:URI">urn:uuid:3d047cbf8065f2cc-9e015c6d-46ec4c38-a32b98be-70e29aca3365<23832a33f780</dc:identifier>
	    <dc:identifier xsi:type="dcterms:URI">urn:isbn:9780307268129<9788252197266</dc:identifier>
    	<dc:publisher>Testforlaget<publisher>Samlaget</dc:publisher>
	    <dc:issued>2015<issued>2018</dc:issued>
	    <dc:language>bm<language>nob</dc:language>
  </entry>