API Documentation

http/https

The WeGA webpages can be accessed via http or encrypted https. Hence, the following URLs in the examples are compatible with both protocols.

Content Negotiation

Several output formats are made available for every resource via content negotiation. At present, HTML and TEI-XML are supported and you can request the desired format by either adding the appropriate file extension (.html/.htm or .tei/.xml or .txt) or by specifying the HTTP Accept Header (text/html or application/xhtml+xml, or application/xml or application/tei+xml, or text/plain). If both are given, the suffix takes precedence. NB: The plain text output is considered an experimental feature!

The canonical URL of every resource is composed of the domain “weber-gesamtausgabe.de” and its ID.

Examples with curl

# curl -L https://weber-gesamtausgabe.de/A002068.xml
# curl -L https://weber-gesamtausgabe.de/A002068.html
# curl -L -H "Accept: text/html" https://weber-gesamtausgabe.de/A002068
# curl -L -H "Accept: application/xml" https://weber-gesamtausgabe.de/A002068

Please note that you’ll need the -L switch since most requests will be redirected.

TEI output formats

When requesting a TEI XML document (see Content Negotiation above) the default output format is our WeGA TEI format. This format is a “TEI-Customization” and documented at https://github.com/Edirom/WeGA-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://weber-gesamtausgabe.de/A002068.xml?format=tei_all"
# curl -L -H "Accept: application/xml" "https://weber-gesamtausgabe.de/A002068?format=tei_simplePrint"

Swagger OpenAPI

The WeGA offers a dedicated RESTful interface at https://weber-gesamtausgabe.de/api/v1/ in compliance with the Swagger OpenAPI Specification 2.0 . This interface shall provide for fast and comfortable discovery of documents from the digital edition.

XML

If you've spotted some error or inaccurateness please do not hesitate to inform us via bugs [@] weber-gesamtausgabe.de.