Description

The method binaries returns a list of binary data files related to an item for a given item-ID. Binary data can be accessed with the binary method. The binaries method provides response data as application/json and application/xml. It is a read-only service and must be accessed with a HTTP-GET-request.
GET /items/<PathParameters>/binaries?<QueryParameters> HTTP/1.1

Request Header

NameValue(s)RequiredRepeatableDefault valueDescription
Acceptapplication/json
application/xml
*/*
yesnoapplication/jsonSpecifies the format of the accepted data. Every request needs to be sent with a valid Accept Header defining the requested response format. Otherwise the response to the request will be a 406 - Not acceptable status code. If the request accepts every kind of data (Accept: */*) JSON will be returned.
AuthorizationOAuth oauth_consumer_key="<API key>"yesnoAn API key is mandatory for data access. You may enclose it by either sending it as Query Parameter or (as mentioned here) in the Request Header.
Hostapi.deutsche-digitale-bibliothek.deyesnoThe host is mandatory.

Back To Top

Parameters

Path

ParameterValue(s)RequiredRepeatableDefault valueDescription
identifier<item-ID>yesnoThe ID of the requested item.

 

Query

ParameterValue(s)RequiredRepeatableDefault valueDescription
oauth_consumer_key<API key>yesnoAn API key is mandatory for data access. You may enclose it by either sending it as Query Parameter or (as mentioned here) in the Request Header.

Back To Top

Authorization

This method needs an API key for authentication (Who are you?) and authorization (What you are authorized to do?). For more information please read the Authorization How-To.

This method is offered over HTTP and HTTP Secure.

Back To Top

Errors

CodeTextDescription
403
Forbidden 
Item is not available via API (items can be blacklisted because of copyright issues)
404Not FoundEither the item does not exist or has no data.
406Not AcceptableThe Request Header is not acceptable. Please see section Request Header.
500Server ErrorSomething went terribly wrong. An error message will provide a meaningful description.

Back To Top

Samples

Request 1

GET /items/OAXO2AGT7YH35YYHN3YKBXJMEI77W3FF/binaries?oauth_consumer_key=abcdefgh12345678 HTTP/1.1
Host: api.deutsche-digitale-bibliothek.de
Accept: application/xml

Response

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<binaries xmlns="http://www.deutsche-digitale-bibliothek.de/cortex">
  <binary primary="true" position="1" path="/binary/OAXO2AGT7YH35YYHN3YKBXJMEI77W3FF/list/1.jpg" mimetype="image/jpeg" name3="Deutsche Nationalbibliothek"
    name2="Text: Goethe, Johann Wolfgang ?von? (Paderborn : Scho?ningh, 1946, [1946])" name="Egmont : ein Trauerspiel in fu?nf Aufzu?gen"/>
  <binary primary="true" position="1" path="/binary/OAXO2AGT7YH35YYHN3YKBXJMEI77W3FF/grid/1.jpg" mimetype="image/jpeg" name3="Deutsche Nationalbibliothek"
    name2="Text: Goethe, Johann Wolfgang ?von? (Paderborn : Scho?ningh, 1946, [1946])" name="Egmont : ein Trauerspiel in fu?nf Aufzu?gen"/>
  <binary primary="true" position="1" path="/binary/OAXO2AGT7YH35YYHN3YKBXJMEI77W3FF/mvth/1.jpg" mimetype="image/jpeg" name3="Deutsche Nationalbibliothek"
    name2="Text: Goethe, Johann Wolfgang ?von? (Paderborn : Scho?ningh, 1946, [1946])" name="Egmont : ein Trauerspiel in fu?nf Aufzu?gen"/>
  <binary primary="true" position="1" path="/binary/OAXO2AGT7YH35YYHN3YKBXJMEI77W3FF/mvpr/1.jpg" mimetype="image/jpeg" name3="Deutsche Nationalbibliothek"
    name2="Text: Goethe, Johann Wolfgang ?von? (Paderborn : Scho?ningh, 1946, [1946])" name="Egmont : ein Trauerspiel in fu?nf Aufzu?gen"/>
</binaries>

 

Request 2

GET /items/OAXO2AGT7YH35YYHN3YKBXJMEI77W3FF/binaries HTTP/1.1
Host: api.deutsche-digitale-bibliothek.de
Accept: */*
Authorization: OAuth oauth_consumer_key="abcdefgh12345678"

Response

{
   "binary":[
      {
         "@primary":"true",
         "@position":"1",
         "@path":"/binary/OAXO2AGT7YH35YYHN3YKBXJMEI77W3FF/list/1.jpg",
         "@mimetype":"image/jpeg",
         "@name3":"Deutsche Nationalbibliothek",
         "@name2":"Text: Goethe, Johann Wolfgang ?von? (Paderborn : Scho?ningh, 1946, [1946])",
         "@name":"Egmont : ein Trauerspiel in fu?nf Aufzu?gen"
      },
      {
         "@primary":"true",
         "@position":"1",
         "@path":"/binary/OAXO2AGT7YH35YYHN3YKBXJMEI77W3FF/grid/1.jpg",
         "@mimetype":"image/jpeg",
         "@name3":"Deutsche Nationalbibliothek",
         "@name2":"Text: Goethe, Johann Wolfgang ?von? (Paderborn : Scho?ningh, 1946, [1946])",
         "@name":"Egmont : ein Trauerspiel in fu?nf Aufzu?gen"
      },
      {
         "@primary":"true",
         "@position":"1",
         "@path":"/binary/OAXO2AGT7YH35YYHN3YKBXJMEI77W3FF/mvth/1.jpg",
         "@mimetype":"image/jpeg",
         "@name3":"Deutsche Nationalbibliothek",
         "@name2":"Text: Goethe, Johann Wolfgang ?von? (Paderborn : Scho?ningh, 1946, [1946])",
         "@name":"Egmont : ein Trauerspiel in fu?nf Aufzu?gen"
      },
      {
         "@primary":"true",
         "@position":"1",
         "@path":"/binary/OAXO2AGT7YH35YYHN3YKBXJMEI77W3FF/mvpr/1.jpg",
         "@mimetype":"image/jpeg",
         "@name3":"Deutsche Nationalbibliothek",
         "@name2":"Text: Goethe, Johann Wolfgang ?von? (Paderborn : Scho?ningh, 1946, [1946])",
         "@name":"Egmont : ein Trauerspiel in fu?nf Aufzu?gen"
      }
   ]
}

Back To Top