## Title: API Documentation ## Author: Peter Stadler ## Version: 4.9.1 ## Origin: https://weber-gesamtausgabe.de/A070012 ## License: http://creativecommons.org/licenses/by/4.0/ http/httpsDie Seiten der WeGA werden seit 2018 nur noch über verschlüsseltes https ausgeliefert. Anfragen via http werden nach https umgeleitet. Die folgenden URL-Beispiele gelten somit immer für beide Protokolle. http/httpsSince 2018 the WeGA 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. Ausgabeformate und Content NegotiationVia Content Negotiation lassen sich zu einer Ressource verschiedene Ausgabeformate wählen. Aktuell werden HTML, TEI-XML, JSON-LD und Plain Text unterstützt, wobei das gewünschte Ausgabeformat entweder über ein Suffix oder über den HTTP Accept Header angegeben werden kann. Wird beides angegeben, hat das Suffix Vorrang. NB: Die Plain-Text-Ausgabe ist als experimentelles Feature zu verstehen! 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 Die persistente URL jeder Ressource setzt sich dabei aus der Domäne „weber-gesamtausgabe.de“ und der ID zusammen. Beispiele mit curl # curl -L https://weber-gesamtausgabe.de/A002068.xml #lb## curl -L https://weber-gesamtausgabe.de/A002068.html #lb## curl -L -H "Accept: text/html" https://weber-gesamtausgabe.de/A002068 #lb## curl -L -H "Accept: application/xml" https://weber-gesamtausgabe.de/A002068 Bitte beachten Sie, dass der Parameter -L hier benötigt wird, da ggf. eine Weiterleitung erfolgt und dass zwingend die Angabe des gewünschten Ausgabeformats (via Suffixnotation oder HTTP Accept Header) erforderlich ist. Output Formats and Content NegotiationSeveral 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 „weber-gesamtausgabe.de“ and its ID. Examples with curl # curl -L https://weber-gesamtausgabe.de/A002068.xml #lb## curl -L https://weber-gesamtausgabe.de/A002068.html #lb## curl -L -H "Accept: text/html" https://weber-gesamtausgabe.de/A002068 #lb## 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 and that the indication of the output format (via suffix notation or HTTP Accept Header) is mandatory. TEI-AusgabeformateWird eine TEI-Datei abgerufen (siehe Content Negotiation), so wird diese standardmäßig im WeGA-TEI-Format ausgeliefert. Dieses Format ist eine „TEI-Customization“ und dokumentiert unter https://github.com/Edirom/WeGA-ODD. Alternativ kann über den URL-Parameter format auch eine Ausgabe kompatibel zu „TEI all“ (format=tei_all) oder „TEI simplePrint“ (format=tei_simplePrint) gewählt werden. Beispiele mit curl # curl -L "https://weber-gesamtausgabe.de/A002068.xml?format=tei_all" #lb## curl -L -H "Accept: application/xml" "https://weber-gesamtausgabe.de/A002068?format=tei_simplePrint" Siehe auch die News vom 29. November 2017 zu „alternativen TEI-Ausgabeformaten“. TEI Output FormatsWhen 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" #lb## curl -L -H "Accept: application/xml" "https://weber-gesamtausgabe.de/A002068?format=tei_simplePrint" SprachauswahlDie HTML-Ausgabe der Ressourcen kann in mehreren Sprachen (Aktuell Deutsch und Englisch) erfolgen. Dabei werden allerdings nur die Navigations- und Menüelemente übersetzt, nicht jedoch die eigentlichen Texte! Die Sprachwahl erfolgt über eine URL-Pfadkomponente, de für Deutsch und en für Englisch. Beispiele mit curl # curl -L https://weber-gesamtausgabe.de/de/A002068.html #lb## curl -L -H "Accept: text/html" https://weber-gesamtausgabe.de/en/A002068 Abfragen von GND IDsVon der API werden aktuell GNDs vom Typ „Person“ (früher PND), „Organisation/Körperschaft“ (früher GKD), sowie „Werk“ unterstützt, welche über BEACON-Dateien zur Verfügung gestellt werden. Die Adressen der BEACON-Dateien sind https://weber-gesamtausgabe.de/pnd_beacon.txt, https://weber-gesamtausgabe.de/gkd_beacon.txt, bzw. https://weber-gesamtausgabe.de/works_beacon.txt. Abfragen können durch Anhängen einer gültigen GND an die Adresse https://weber-gesamtausgabe.de/de/gnd/ gemacht werden. (Zur Sprachwahl siehe oben.) Beispiele mit curl # curl -L -H "Accept: application/tei+xml" https://weber-gesamtausgabe.de/de/gnd/118629662 #lb## curl -L https://weber-gesamtausgabe.de/de/gnd/118629662.jsonld Bitte beachten Sie, dass der Parameter -L hier zwingend benötigt wird, da eine Weiterleitung erfolgt und dass ebenfalls die Angabe des gewünschten Ausgabeformats (via Suffixnotation oder HTTP Accept Header) erforderlich ist. Detaillierte Informationen zum BEACON-Format finden sich unter https://de.wikipedia.org/wiki/Wikipedia:BEACON. Requesting GND IDsThe WeGA 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://weber-gesamtausgabe.de/pnd_beacon.txt, https://weber-gesamtausgabe.de/gkd_beacon.txt, and https://weber-gesamtausgabe.de/works_beacon.txt. Requests can be made by appending a valid GND ID to the base address at https://weber-gesamtausgabe.de/en/gnd/. Examples with curl # curl -L -H "Accept: application/tei+xml" https://weber-gesamtausgabe.de/en/gnd/118629662 #lb## curl -L https://weber-gesamtausgabe.de/en/gnd/118629662.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. Correspondence Metadata Interchange-Format (CMIF)Die WeGA stellt seit Mai 2014 alle Korrespondenz-Metadaten nach dem Correspondence Metadata Interchange-Format (CMIF) zur Verfügung. Adresse der BEACON-Datei (seit Release 4.8): https://weber-gesamtausgabe.de/cmif_v1.xml. Die alte URL https://weber-gesamtausgabe.de/correspDesc.xml ist aktuell noch gültig, sollte aber nicht mehr benutzt werden und kann in einem der nächsten Releases entfernt werden. Mit dem Release 4.8 wurde auch ein Endpunkt für das (noch im Entwurfsstadium befindliche) CMIF v2 unter https://weber-gesamtausgabe.de/cmif_v2.xml eingerichtet. Von den Erweiterungen in CMIF v2 werden hier aktuell nur cmif:mentionsPerson und cmif:mentionsPlace unterstützt. Detaillierte Informationen zum CMI-Format finden sich auf den Seiten des correspSearch Webservice und unter https://github.com/TEI-Correspondence-SIG/CMIF. Siehe auch die News vom 7. Mai 2014 zur ersten Einrichtung eines „experimentellen Corresp-Beacon“. Correspondence Metadata Interchange-Format (CMIF)Since 2014 the WeGA provides metadata about its correspondence corpus as Correspondence Metadata Interchange-Format (CMIF). The URL of the BEACON-file is (since Release 4.8) https://weber-gesamtausgabe.de/cmif_v1.xml. The old URL https://weber-gesamtausgabe.de/correspDesc.xml is considered deprecated and may be removed in a future release. With the 4.8 release, an endpoint for the CMIF v2 (which is still in the draft stage) was set up at https://weber-gesamtausgabe.de/cmif_v2.xml. Of the extensions in CMIF v2, only cmif:mentionsPerson and cmif:mentionsPlace are currently supported here. Detailed information about the CMIF can be found at the correspSearch Webservice and at the TEI Correspondence SIG GitHub page. International Image Interoperability Framework (IIIF)Die WeGA stellt die digitalen Faksimiles, die sie selber hosten und veröffentlichen darf, nach dem IIIF-Standard zur Verfügung. Die Metadaten der einzelnen Bilder (info.json) werden dabei von dem bei uns eingesetzten Digilib-Imageserver automatisch erzeugt, und die „Resource Structure“ für die IIIF Presentation API (manifest.json) wird aus den TEI-Dokumenten durch die WeGA-WebApp generiert. Die persistente URL jeder Ressource setzt sich dabei aus der Domäne „weber-gesamtausgabe.de“ und dem Pfad „/IIIF/$ID/manifest.json“ zusammen. Beispiele mit curl # curl -L -H "Accept: application/json" https://weber-gesamtausgabe.de/IIIF/A040709/manifest.json International Image Interoperability Framework (IIIF)The WeGA provides access to the images—for which we have permission to do so—via the IIIF standard. Metadata for the images (info.json) are created automatically by our Digilib image server and the „Resource Structure“ for the IIIF Presentation API (manifest.json) is generated fom the TEI documents by the WeGA-WebApp. The persistent URL of every resource is composed of the domain „weber-gesamtausgabe.de“ and the path „/IIIF/$ID/manifest.json“. Examples with curl # curl -L -H "Accept: application/json" https://weber-gesamtausgabe.de/IIIF/A040709/manifest.json Swagger OpenAPIDie WeGA bietet unter https://weber-gesamtausgabe.de/api/v1/ ebenfalls eine REST-Schnittstelle nach der Swagger OpenAPI Spezifikation 3.0 an. Diese Schnittstelle soll ein schnelles und komfortables Auffinden von Dokumenten aus der digitalen Edition ermöglichen. Swagger OpenAPIThe WeGA offers a dedicated RESTful interface at https://weber-gesamtausgabe.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.