Table of Contents |
---|
Info |
---|
New Authentication & URLs introduced Q2 2024 |
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 |
| Method
GET
| Request |
| Required
|
| Required |
| |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Method |
| ||||||||||||||||||||||
Request |
| Required | The token acquired from the Authentication Service. Audience: Formated "Bearer …" | ||||||||||||||||||||
Query |
| Required* | All data elements modified after this “cursor”. The cursor is in a not human readable format. | ||||||||||||||||||||
| Required* | All data elements modified after this timestamp. The timestamp is on the format yyyyMMddHHmmss. | |||||||||||||||||||||
| Optional | See Pagination | |||||||||||||||||||||
Response |
| See Pagination | |||||||||||||||||||||
| See Pagination | ||||||||||||||||||||||
Response | XML (Object metadata) | ||||||||||||||||||||||
Returns |
| OK | |||||||||||||||||||||
| Bad Request | ||||||||||||||||||||||
| Unauthorized | ||||||||||||||||||||||
| Forbidden | ||||||||||||||||||||||
| Not Acceptable | ||||||||||||||||||||||
| Internal Server Error |
...
Object Download Service
Status | ||||
---|---|---|---|---|
|
Expand | |||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||
No longer need to download objects There is now no need to download resources and host yourself. Just use the public available URL that comes in ONIX directly in customer facing solutions.
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.
Object sampleRequest objects report and thereafter download service
Note: The
|
Changes to filename
In case you still want to fetch these files and host them your selves, please make some adjustments.
...
Code Block |
---|
# In case you use this command (used when resource was protected/time-limited) curl -JO \ -H "Accept: application/octet-stream" -H\ "Authorization: Boknett TGT-1947-CEwDRwvOiIodyeov31sMnHTn7XxbZH15GDhJDdKWAq1rELH5wU-login.boknett.no" -H "Date: Thu, 12 Jun 2014 13:49:22 GMT" https://sr.bokbasen.io/coverimage/9783836574228/w360/jpg # CHANGE curl: Saved to filename 'jpg' (not as 'os.jpg') |
...
Code Block |
---|
# In case you use this command (used when resource was protected/time-limited) curl -JO \ -H "Accept: application/octet-stream" -H\ "Authorization: Boknett TGT-1947-CEwDRwvOiIodyeov31sMnHTn7XxbZH15GDhJDdKWAq1rELH5wU-login.boknett.no" -H "Date: Thu, 12 Jun 2014 13:49:22 GMT" https://sr.bokbasen.io/audiosample/9788202362270.mp3 # CHANGE curl: Saved to filename '9788202362270.mp3' (not as 'ly.mp3') |