API Documentation

Back

http/https

The Henze-Digital webpages are served only through encrypted https. Requests made via http are redirected to https. Hence, the following URLs in the examples are compatible with both protocols.

Output Formats and Content Negotiation

Several output formats are made available for every resource via content negotiation. At present, HTML, TEI-XML, JSON-LD and Plain Text are supported and you can request the desired format by either adding the appropriate file extension or by specifying the HTTP Accept Header. If both are given, the suffix takes precedence. NB: The plain text output is considered an experimental feature!

Format Suffix Accept Header
HTML .html, .htm text/html, application/xhtml+xml
TEI XML .tei, .xml application/xml, application/tei+xml
Plain Text .txt text/plain
JSON-LD .jsonld application/ld+json

The persistent URL of every resource is composed of the domain “henze-digital.zenmem.de” and its ID.

Examples with curl

# curl -L https://henze-digital.zenmem.de/A042B70F.xml
# curl -L https://henze-digital.zenmem.de/A042B70F.html
# curl -L -H "Accept: text/html" https://henze-digital.zenmem.de/A042B70F
# curl -L -H "Accept: application/xml" https://henze-digital.zenmem.de/A042B70F

Please note that you’ll need the -L switch since most requests will be redirected and that the indication of the output format (via suffix notation or HTTP Accept Header) is mandatory.

TEI Output Formats

When requesting a TEI XML document (see Content Negotiation above) the default output format is our HenDi TEI format. This format is a “TEI-Customization” and documented at https://github.com/Henze-Digital/HenDi-ODD. Alternatively, you can request more standard formats via the URL parameter format; at present, “TEI all” (format=tei_all) and “TEI simplePrint” (format=tei_simplePrint) are supported.

Examples with curl

# curl -L "https://henze-digital.zenmem.de/A042B70F.xml?format=tei_all"
# curl -L -H "Accept: application/xml" "https://henze-digital.zenmem.de/A042B70F?format=tei_simplePrint"

Requesting GND IDs

The HenDi API supports requests made via GND IDs for the types “Person” (formerly PND), “Organisation/Institution” (formerly GKD), and “Work”. Additionally, BEACON files are provided for these types at https://henze-digital.zenmem.de/pnd_beacon.txt, https://henze-digital.zenmem.de/gkd_beacon.txt, and https://henze-digital.zenmem.de/works_beacon.txt. Requests can be made by appending a valid GND ID to the base address at https://henze-digital.zenmem.de/en/gnd/.

Examples with curl

# curl -L -H "Accept: application/tei+xml" https://henze-digital.zenmem.de/en/gnd/118549383
# curl -L https://henze-digital.zenmem.de/en/gnd/118549383.jsonld

Please note that you’ll need the -L switch since the requests will be redirected and that the indication of the output format (via suffix notation or HTTP Accept Header) is mandatory.

Detailed information about the BEACON format can be found at https://meta.wikimedia.org/wiki/Dynamic_links_to_external_resources .

Swagger OpenAPI

Henze-Digital offers a dedicated RESTful interface at https://henze-digital.zenmem.de/api/v1/ in compliance with the Swagger OpenAPI Specification 3.0 . This interface shall provide for fast and comfortable discovery of documents from the digital edition.

XML

If you've spotted some error or inaccuracy please do not hesitate to inform us via henze-digital [@] zenmem.de.