...
URL | https://api.dds.boknett.no/v2/inventory/
https://api.dds.boknett.no/v2/inventory/{isbn}
|
Method | GET
|
Request headers | Authorization | Required | The token acquired from the Authentication Service. Example: Authorization: Boknett TGT-.... |
Date | Required | The timestamp the request was made. Must comply with RFC 1123 date formats. Example: Tue, 10 Jun 2014 16:23:42 GMT |
Query parameters | after | Required if next not given |
|
next | Required if after not given |
|
pagesize | optional | (default and max value is 10000) |
Response headers
| Content-Type | application/atom+xml;charset=UTF-8 |
| Next | next token for next page |
| Link | link to next page |
Response body | ATOM Inventory XML format (same format as before, however only latest version of each book is returned and some fields are removed) |
Returns | 200
| OK |
40x
| On error |
Curl example
Initial load using after
(timestamp) - if you are not using your persisted next
from last call/session
Code Block |
---|
curl -i \
-H "Authorization: Boknett TGT-19933-EcDNpJfVcJNrpcMeGvGKcfUHvV1W2MR50zb066X6vTZVTypXBQ-login.boknett.no" \
-H "Date: Fri, 07 Aug 2015 11:18:39 GMT" \
"https://api.dds.boknett.no/v2/inventory/?after=20140501120000"
HTTP/1.1 200 OK
Date: Fri, 07 Aug 2015 11:19:45 GMT
Content-Type: application/atom+xml;charset=UTF-8
(ATOM Inventory XML) |
ATOM Inventory XML format for v2
...
Expand |
---|
|
The get inventory service can give data on your entire catalogue or detailed information on one specific title. Note |
---|
This service is deprecated for inventory v2. |
URL | https://api.dds.boknett.no/inventory/ | 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. Example: Tue, 10 Jun 2014 16:23:42 GMT | Query parameters | id | Optional | UUID (also called resId) of the ebook that you want information about, use this parameter only if you want detailed information about one single title. | isbn | Optional | Same as id only based on isbn to give information about a specific title (will always reply with data on latest version of digital book for the isbn) | fromDate | Optional | From date for the response dataset | toDate | Optional | The type of notification, which can be updated (new and updated elements) and deleted. Empty or missing parameter will result in both updated and deleted elements. | state | Optional* | Status that can be used for filtering. *If fromDate or toDate is given, this is mandatory Possible values: PUBLISHED UNPUBLISHED CREATED MODIFIED DELETED FIRST_PUBLISHED ACCESS
| Response headers | Content-Type | application/atom+xml;charset=UTF-8 | Response body | ATOM Inventory XML format (see details further down on this page) | Returns | 200 | OK | 40x | On error |
Details on state and fromDate / toDate parametersThese parameters works together differently based on which data type the field in state has. For all fields that are dates (UNPUBLISHED, CREATED, MODIFIED, FIRST_PUBLISHED, DELETED) the fromDate / toDate parameters are used in combination with the state field. So state=MODIFIED&fromDate=08082015&toDate=10082015 will only returned books that are modified in this time period. If not state is given in combination with the date fields MODIFIED will be used as default. For boolean fields (PUBLISHED, ACCESS) the dateFields have no impact and state=ACCESS will just return all books you have access to. Example (curl)Download inventory for your user. Code Block |
---|
curl -i -H "Authorization: Boknett TGT-19933-EcDNpJfVcJNrpcMeGvGKcfUHvV1W2MR50zb066X6vTZVTypXBQ-login.boknett.no" -H "Date: Fri, 07 Aug 2015 11:18:39 GMT" "https://api.dds.boknett.no/inventory/"
HTTP/1.1 200 OK
Date: Fri, 07 Aug 2015 11:19:45 GMT
Content-Type: application/atom+xml;charset=UTF-8
(ATOM Inventory XML) |
Example XML: Code Block |
---|
| <?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:inv="http://bokbasen.no/module/inventory/1.0">
<title>Inventory Items</title>
<link rel="self" type="application/atom+xml" href="http://api.dds.boknett.no/inventory/" title="Inventory feed" />
<updated>2015-08-07T11:19:45Z</updated>
<entry>
<title>Tur i skogen</title>
<author>
<name>Kari Nordmann</name>
</author>
<id>urn:uuid:99496f82-84c5-4de7-9899-31603e26a355</id>
<updated>2015-08-06T11:52:09Z</updated>
<inv:isbn>9788242160966</inv:isbn>
<inv:publisher>900224</inv:publisher>
<inv:format>MP3</inv:format>
<inv:drm>SDRM</inv:drm>
<inv:version>1</inv:version>
<inv:firstpublished>2015-08-06T11:52:09Z</inv:firstpublished>
<inv:deleted />
<inv:published>true</inv:published>
<inv:access>false</inv:access>
<inv:excerpt>false</inv:excerpt>
</entry>
<entry>
<title>Lengre turer i skogen</title>
<author>
<name>Ola Nordmann</name>
</author>
<id>urn:uuid:8d9f423c-6caf-4f9c-aee4-8d8bb34656b2</id>
<updated>2015-08-06T11:24:42Z</updated>
<inv:isbn>9788242161024</inv:isbn>
<inv:publisher>900224</inv:publisher>
<inv:format>MP3</inv:format>
<inv:drm>SDRM</inv:drm>
<inv:version>5</inv:version>
<inv:firstpublished />
<inv:deleted />
<inv:published>false</inv:published>
<inv:access>false</inv:access>
<inv:excerpt>false</inv:excerpt>
</entry>
</feed> |
|
...