Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The objects (images and audio files) report contains identifiers and references to the address where the objects can be downloaded. These references will be valid for a limited period of time. The typical use of the object services is as follows:

  1. Authenticate (same for all services)

  2. Request report (list) of updated objects

  3. Parse list of updated objects (obtain URL to download service for each object)

  4. Download actual objects from download service (one or more requests per object) 

 


URLhttps://api.boknett.no/metadata/export/object
MethodGET
Request
headers

Authorization

Required

The token acquired from the Authentication Service.

Formated "Boknett TGT-...."

DateRequiredThe timestamp the request was made. Must comply with RFC 1123 date formats.
Query
parameters
nextRequired*All data elements modified after this “cursor”. The cursor is in a not human readable format.
afterRequired*All data elements modified after this timestamp. The timestamp is on the format yyyyMMddHHmmss.
pagesizeOptionalSee Pagination
Response
headers

 

Next

See Pagination

Link

See Pagination
Response
body
XML (Object metadata)
Returns200OK
400Bad Request
401Unauthorized
403Forbidden
406Not Acceptable
500Internal Server Error

 


* One of the parameters “next” and “after” is required. 


Response Body (Object metadata XML)

Code Block
languagexml
<OBJECTS>
    <OBJECT>
        <ISBN13></ISBN13>
        <EAN></EAN>
        <FSSN></FSSN>
        <VAREEIER_KODE></VAREEIER_KODE>
        <TYPE></TYPE>
        <REFERENCE><REFERENCE/>
    </OBJECT>
<OBJECTS/>

...


  • TYPE, “Type of object”. ly = Lydfil, ol = Omslag lille (width 120), os = Omslag stor (height 450), org = original omslag (This is the original image file sent to Bokbasen, so this is the one with the highest quality. This only exists for files sent to Bokbasen after February 2015, for older files this will be the same quality as os)
  • REFERENCE - short lived link to object available for download at download service. Reference is generated in a dynamic non predictable manner.
  • Note that this database also contains historical objects, so that you can get objects for books that are deleted and sold out, so one should always check if the object is required for your system in your import process
  • The database is containing objects for over 150 000 titles, so a full dump on the database is very time consuming. When doing this, the biggest impact is choosing which types you actually need so you do not incur unecessary requests. E.g. if you are only loading images and you only need ORG, that will require about 150 000 download requests, but if you include all types for images that becomes 450 000 requests and trippling your execution time. 

...

The Object Download Service provides an endpoint for downloading binary object resources. The path to this service, as well as a unique identifier of the requested object, is returned from the object metadata service, which therefore must be called in advance. The unique identifier is only valid for a certain amount of time, as described in the table below, and can only be called by the same user (credentials) that requested the object export metadata service. The following details the parameters, example usage and different responses when using this service.

 


URLhttps://api.boknett.no/metadata/export/object
MethodGET
Request
headers

Authorization

Required

The token acquired from the Authentication Service.

Formated "Boknett TGT-...."

DateRequiredThe timestamp the request was made. Must comply with RFC 1123 date formats.
AcceptRequiredMust be "application/octet-stream"
Query
parameters
idRequiredAn unpredictable generated identifier that uniquely references an object representation. Returned in the response from the Object Report Service. Valid for a limited time.

Response
header

Content-DispositionSuggests a default filename
Response
body
Object file
Returns200OK
403Forbidden
404Not Found
410Gone

...


Object sample

Request objects report and thereafter download service

...