Object Report
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:
Authenticate (same for all services)
Request report (list) of updated objects
Parse list of updated objects (obtain URL to download service for each object)
Download actual objects from download service (one or more requests per object)
URL | https://api.boknett.no/metadata/export/object | ||
Method | GET | ||
Request headers | Authorization | Required | The token acquired from the Authentication Service. Formated "Boknett TGT-...." |
Date | Required | The timestamp the request was made. Must comply with RFC 1123 date formats. | |
Query parameters | next | Required* | All data elements modified after this “cursor”. The cursor is in a not human readable format. |
after | Required* | All data elements modified after this timestamp. The timestamp is on the format yyyyMMddHHmmss. | |
pagesize | Optional | See Pagination | |
Response headers
| Next | See Pagination | |
Link | See Pagination | ||
Response body | XML (Object metadata) | ||
Returns | 200 | OK | |
400 | Bad Request | ||
401 | Unauthorized | ||
403 | Forbidden | ||
406 | Not Acceptable | ||
500 | Internal Server Error |
* One of the parameters “next” and “after” is required.
Response Body (Object metadata XML)
<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.
Object Download Service
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.
URL | https://api.boknett.no/metadata/export/object | ||
Method | GET | ||
Request headers | Authorization | Required | The token acquired from the Authentication Service. Formated "Boknett TGT-...." |
Date | Required | The timestamp the request was made. Must comply with RFC 1123 date formats. | |
Accept | Required | Must be "application/octet-stream" | |
Query parameters | id | Required | An unpredictable generated identifier that uniquely references an object representation. Returned in the response from the Object Report Service. Valid for a limited time. |
Response | Content-Disposition | Suggests a default filename | |
Response body | Object file | ||
Returns | 200 | OK | |
403 | Forbidden | ||
404 | Not Found | ||
410 | Gone |