Update API authored by Pollack, Philipp's avatar Pollack, Philipp
Der Open Access Monitor stellt eine frei zugängliche [REST-API](https://open-access-monitor.de/api) bereit. Über diese API können alle öffentlichen Daten des Monitors abgefragt werden.
# Authentifizierung
**Wichtig:** Ab Version 2.1 wird zur Nutzung der API ein Token benötigt.
Zur Nutzung der API wird ein persönliches Token benötigt. Dieses muss bei jeder Abfrage im Parameter `token` angegeben werden.
Um ein Token zu erhalten, schreiben Sie bitte eine Mail an info@open-access-monitor.de und beschreiben kurz Ihren Use-Case. Wir werden uns dann schnellstmöglich bei Ihnen melden.
# Datenabfrage
Zur Datenabfrage wird folgender Endpunkt benötigt:
......@@ -30,11 +38,11 @@ OA-Kategorien werden innerhalb der Daten entsprechend der Tabelle im Abschnitt [
# Beispiele
* Abfrage aller Publikationen aus 2020, welche Gold-Open-Access sind \
[https://open-access-monitor.de/api/Data/`public`?query=`{find:"Publications", filter:{year: 2018, oa_color: 7}}`](https://open-access-monitor.de/api/Data/public?query=%7Bfind%3A%22Publications%22%2C%20filter%3A%7Byear%3A%202018%2C%20oa_color%3A%207%7D%7D)
[https://open-access-monitor.de/api/Data/`public`?token=`<token>`&query=`{find:"Publications", filter:{year: 2018, oa_color: 7}}`](https://open-access-monitor.de/api/Data/public?token=<token>&query=%7Bfind%3A%22Publications%22%2C%20filter%3A%7Byear%3A%202018%2C%20oa_color%3A%207%7D%7D)
* Zeitschriften, welche in der DFG-Förderliste enthalten sind \
[https://open-access-monitor.de/api/Data/`public`?query=`{find:"Journals", filter:{flags: "DFG-Anträge"}}`](https://open-access-monitor.de/api/Data/public?query=%7Bfind%3A%22Journals%22%2C%20filter%3A%7Bflags%3A%20%22DFG-Antr%C3%A4ge%22%7D%7D)
[https://open-access-monitor.de/api/Data/`public`?token=`<token>`&query=`{find:"Journals", filter:{flags: "DFG-Anträge"}}`](https://open-access-monitor.de/api/Data/public?token=<token>&query=%7Bfind%3A%22Journals%22%2C%20filter%3A%7Bflags%3A%20%22DFG-Antr%C3%A4ge%22%7D%7D)
* Anzahl Publikationen pro OA-Kategorie \
[https://open-access-monitor.de/api/Data/`public`?query=`{aggregate:"Publications", cursor:{}, pipeline:[{$group:{_id:"$oa_color", sum:{$sum: 1}}}]}`](https://open-access-monitor.de/api/Data/public?query=%7Baggregate%3A%22Publications%22%2C%20cursor%3A%7B%7D%2C%20pipeline%3A%5B%7B%24group%3A%7B_id%3A%22%24oa_color%22%2C%20sum%3A%7B%24sum%3A%201%7D%7D%7D%5D%7D)
[https://open-access-monitor.de/api/Data/`public`?token=`<token>`&query=`{aggregate:"Publications", cursor:{}, pipeline:[{$group:{_id:"$oa_color", sum:{$sum: 1}}}]}`](https://open-access-monitor.de/api/Data/public?token=<token>&query=%7Baggregate%3A%22Publications%22%2C%20cursor%3A%7B%7D%2C%20pipeline%3A%5B%7B%24group%3A%7B_id%3A%22%24oa_color%22%2C%20sum%3A%7B%24sum%3A%201%7D%7D%7D%5D%7D)
# Swagger
......
......