GDCh’s Data Platform
API Documentation
Intro
All GDCh data that is accessible here is stored in a headless content management system. Queries to that CMS are done via GraphQL. Users are not allowed to send queries to the CMS directly for performance reasons and data safety. Instead, users can access the above endpoints in order to fast get predictable and cached data in JSON format from the cloud’s edge of our content delivery network (CDN). GraphQL queries are given below such that developers can easily deduce the JSON answer.
The data is cached with the following header settings.
Cache-Control: s-maxage=600, stale-while-revalidate=28800
Once the data is fetched from the headless CMS, it is used as up-to-date for s-maxage
seconds and served from the cache. After this time, the content is considered stale, meaning that on the next user request the stale content is served from the cache of the CDN, but a new query to the CMS is made in order to revalidate the data in the cache. Data is stored in stale state for stale-while-revalidate
seconds.
All JSON API results include a status
, which is either “success” or “error”, a timestamp
, which allows to automatically check the age of the data, the data
object itself and a message
in case of an error.
interface IApiData<DataType> { status: "success"; timestamp: Date; data: DataType[]; } interface IApiError { status: "error"; message: string; }
Contact
Do not hesitate to contact Maximilian Bräutigam, if you need more data, more endpoints, or a better API experience.
Return last 10 articles of Nachrichten aus der Chemie regarding the JCF.
Example
Query
query articlesForJcf { articles( orderBy: pubDate_DESC first: 10 where: {articleGroups_some: {slug: "gdch"}, OR: [{title_contains: "JCF"}, {title_contains: "Jungchemikerforum"}, {subtitle_contains: "JCF"}, {subtitle_contains: "Jungchemikerforum"}, {content_contains: "JCF"}, {content_contains: "Jungchemikerforum"}]} ) { ...JcfArticles } } fragment JcfArticles on Article { id isHidden title subtitle slug pubDate publicationIssue { id publication { id title slug } volume issue cover { url(transformation: {document: {output: {format: webp}}}) } slug } firstPage lastPage doi authors { firstname lastname slugName mailSocialLink } authorBackup featuredImage { url(transformation: {document: {output: {format: webp}}}) } content }
Return all currently running awardings.
Example
Query
query upcomingAwardings($today: Date!) { awardings( orderBy: announcementEnd_ASC where: {announcementStart_lte: $today, announcementEnd_gte: $today} ) { ...awarding } } fragment awarding on Awarding { id internalName year description { html } announcementStart announcementEnd announcementUrl nchIssue awardingAttachments { advertisements { url } } award { id name teaser description { html } endowment targetGroups { name } fields { id name } awardingMode url owners { id type name logo { url mimeType thumbnail: url( transformation: {image: {resize: {width: 200, height: 200, fit: clip}}} ) } } supporters { type name } images { url mimeType thumbnail: url( transformation: {image: {resize: {width: 200, height: 200, fit: clip}}} ) } } }
Return all upcoming events. This includes both, normal events and GDCh academy courses.
Localization
Append ?lang=en
/api/events/all/upcoming?lang=en
Example
www.gdch.de/veranstaltungen/die-gdch-vor-ort.html
Data returned
{ "type": "talk", "id": "clfb12dperlu30bupsz5mycbz", "startDate": "2023-04-18T13:00:00+00:00", "endDate": "2023-04-18T14:00:00+00:00", "title": "Dieter Oesterhelt (1940-2022) und sein Bacteriorhodopsin", "slug": "dieter-oesterhelt-1940-2022-und-sein-bacteriorhodopsin-2023", "description": "Der Name Dieter Oesterhelt ist eng verbunden mit dem von ihm entdeckten Bacteriorhodopsin, das in den Zellmembranen des Archebacteriums Halobacterium salinarum Unglaubliches leistet: Es transportiert bei Lichtbestrahlung Protonen vom Zellinneren durch die Membran nach außen.", "ctaTitle": "Mehr Information", "ctaLink": "https://www.gdch.de/netzwerk-strukturen/fachstrukturen/seniorexperten-chemie/online-vortraege/klaus-roth.html", "organization": "FG Seniorexperten Chemie", "tags": ["online", "Biochemie"], "image": { "url": "https://media.graphassets.com/DqKStdseT0akU004KlDe", "mimeType": "image/jpeg", "webpUrl": "https://media.graphassets.com/resize=width:600/output=format:webp/DqKStdseT0akU004KlDe" }, "location": "", "subtitle": "Prof. Dr. Klaus Roth, FU Berlin", "href": "https://gdch.app/event/dieter-oesterhelt-1940-2022-und-sein-bacteriorhodopsin-2023" }
/api/events/org/organization
Return all events of a specific organization
—their past and upcoming events.
organization
may be:
- aachen
- jcf-aachen
- aalen-ostalb
- analytische-chemie
- augsburg
- bauchemie
- bayreuth
- jcf-bayreuth
- berlin
- jcf-berlin
- bielefeld
- jcf-bielefeld
- biochemie
- bitterfeld-wolfen
- bochum
- jcf-bochum
- bonn
- jcf-bonn
- braunschweig
- jcf-braunschweig
- bremen
- jcf-bremen
- chemie-des-waschens
- chemie-und-energie
- chemieunterricht
- chemiker-im-oeffentlichen-dienst
- chemnitz
- jcf-chemnitz
- computer-in-der-chemie
- darmstadt
- jcf-darmstadt
- dortmund
- jcf-dortmund
- dresden
- jcf-dresden
- duesseldorf
- jcf-duesseldorf
- elektrochemie
- erlangen-nuernberg
- jcf-erlangen-nuernberg
- essen-duisburg
- jcf-essen-duisburg
- festkoerperchemie-und-materialforschung
- frankfurt-am-main
- jcf-frankfurt-am-main
- freiberg
- jcf-freiberg
- freiberufliche-chemiker
- freiburg-suedbaden
- jcf-freiburg-suedbaden
- geschichte-der-chemie
- giessen
- jcf-giessen
- goettingen
- jcf-goettingen
- greifswald
- jcf-greifswald
- halle-saale
- jcf-halle-saale
- hamburg
- jcf-hamburg
- hannover
- jcf-hannover
- harz
- jcf-harz
- heidelberg
- jcf-heidelberg
- ilmenau-erfurt
- jcf
- jena
- jcf-jena
- kaiserslautern
- jcf-kaiserslautern
- karlsruhe
- jcf-karlsruhe
- kassel
- jcf-kassel
- kiel
- jcf-kiel
- koeln-leverkusen
- jcf-koeln-leverkusen
- konstanz
- jcf-konstanz
- krefeld
- jcf-krefeld
- lackchemie
- lausitz
- lebensmittelchemische-gesellschaft
- leipzig
- jcf-leipzig
- liebig-vereinigung-fuer-organische-chemie
- ludwigshafen-mannheim
- magdeburg
- jcf-magdeburg
- magnetische-resonanz
- mainz-wiesbaden
- jcf-mainz-wiesbaden
- makromolekulare-chemie
- marburg
- jcf-marburg
- marl-recklinghausen
- jcf-marl-recklinghausen
- medizinische-chemie
- jcf-muelheim-an-der-ruhr
- muenchen
- jcf-muenchen
- muenster
- jcf-muenster
- nachhaltige-chemie
- nuklearchemie
- oldenburg
- jcf-oldenburg
- osnabrueck
- paderborn
- jcf-paderborn
- patentrecht
- photochemie
- potsdam
- jcf-potsdam
- regensburg
- jcf-regensburg
- rostock
- jcf-rostock
- ruhr
- saar
- jcf-saar
- seniorexperten-chemie
- siegen
- jcf-siegen
- jcf-steinfurt
- stuttgart
- jcf-stuttgart
- suedwuerttemberg
- jcf-tuebingen
- ulm
- jcf-ulm
- umweltchemie-und-oekotoxikologie
- unterfranken
- vereinigung-fuer-chemie-und-wirtschaft
- wasserchemische-gesellschaft
- woehler-vereinigung-fuer-anorganische-chemie
- wuppertal-hagen
- jcf-wuppertal-hagen
- jcf-wuerzburg
Query
query allEventsByOrg($orgSlug: String) { events(where: {organization: {slug: $orgSlug}}, orderBy: startDate_DESC) { ...eventData manager { ...managerData } } } fragment eventData on Event { id title talkLecturer talkLecturerAffiliation attendanceType type description startDate endDate image { url width height fileName } locationTitle locationAddress coordinates { longitude latitude } slug statusApp tags interests { name } ctaTitle ctaLink } fragment managerData on Person { id firstname lastname title slugName mailSocialLink authMail linkedinSocialLink xingSocialLink twitterSocialLink profileImage { url( transformation: {document: {output: {format: webp}}, image: {resize: {height: 200, width: 200, fit: crop}}} ) } }
/api/events/org/organization
/upcoming
Return all upcoming events of a specific organization
.
organization
may be:
-
Query
query upcomingEventsByOrg($now: DateTime, $orgSlug: String) { events( where: {organization: {slug: $orgSlug}, startDate_gte: $now} orderBy: startDate_ASC ) { ...eventData manager { ...managerData } } } fragment eventData on Event { id title talkLecturer talkLecturerAffiliation attendanceType type description startDate endDate image { url width height fileName } locationTitle locationAddress coordinates { longitude latitude } slug statusApp tags interests { name } ctaTitle ctaLink } fragment managerData on Person { id firstname lastname title slugName mailSocialLink authMail linkedinSocialLink xingSocialLink twitterSocialLink profileImage { url( transformation: {document: {output: {format: webp}}, image: {resize: {height: 200, width: 200, fit: crop}}} ) } }
/api/events/orgtype/orgtype
Return all organizations of a specific type and their past and upcoming events.
Organization types (orgtype
) may be:
- Division
- LocalSection
- GDCh
- External
- Foundation
- JointDivision
- Subdivision
- WorkingGroup
- RegionalForum
- JCF
- VcwStammtisch
⚠️ For the sake of simplicity, the endpoint RegionalForum
also includes data from JCF
—the generic type for the JCF-Bundesvorstand—, but not vice versa.
Example
Query
query organizationsEventsByOrgType($type: [OrganizationType!]) { organizations(where: {type_in: $type}, orderBy: name_ASC, stage: DRAFT) { ...organizationData adminPersons( where: {AND: [{id_not: "ckiin8o9k06ki0954h57lmtai"}, {id_not: "ckma5p6iogzud0a61lbnegm7c"}, {id_not: "ckm9yepg0u7db0b08s3h4lmnh"}]} ) { ...managerData } personRole { title person { ...managerData } } events(orderBy: startDate_DESC) { ...eventData } } } fragment organizationData on Organization { id name type slug coordinates { longitude latitude } logo { url } tray } fragment managerData on Person { id firstname lastname title slugName mailSocialLink authMail linkedinSocialLink xingSocialLink twitterSocialLink profileImage { url( transformation: {document: {output: {format: webp}}, image: {resize: {height: 200, width: 200, fit: crop}}} ) } } fragment eventData on Event { id title talkLecturer talkLecturerAffiliation attendanceType type description startDate endDate image { url width height fileName } locationTitle locationAddress coordinates { longitude latitude } slug statusApp tags interests { name } ctaTitle ctaLink }
/api/events/orgtype/orgtype
/upcoming
Return all upcoming events of organizations of a specific type.
Organization types (orgtype
) may be:
- Division
- LocalSection
- GDCh
- External
- Foundation
- JointDivision
- Subdivision
- WorkingGroup
- RegionalForum
- JCF
- VcwStammtisch
⚠️ For the sake of simplicity, the endpoint RegionalForum
also includes data from JCF
—the generic type for the JCF-Bundesvorstand—, but not vice versa.
Example
Query
query upcomingEventsByOrgType($now: DateTime, $type: [OrganizationType!]) { events( where: {AND: {organization: {type_in: $type}, startDate_gte: $now}} orderBy: startDate_ASC ) { ...eventData organization { ...organizationData } manager { ...managerData } } } fragment eventData on Event { id title talkLecturer talkLecturerAffiliation attendanceType type description startDate endDate image { url width height fileName } locationTitle locationAddress coordinates { longitude latitude } slug statusApp tags interests { name } ctaTitle ctaLink } fragment organizationData on Organization { id name type slug coordinates { longitude latitude } logo { url } tray } fragment managerData on Person { id firstname lastname title slugName mailSocialLink authMail linkedinSocialLink xingSocialLink twitterSocialLink profileImage { url( transformation: {document: {output: {format: webp}}, image: {resize: {height: 200, width: 200, fit: crop}}} ) } }
/api/geo/orgtype/orgtype
Return geographical data that can be used with OpenLayers.
⚠️ This API does not use the standard schema with status
and data
fields. Instead, it returns a FeatureCollection
directly (see GeoJSON documentation). In case of an error, the status
field is set to “error” and the message
field contains the error message.
Organization types (orgtype
) may be:
Example
Query
query organizationsCoordinatesByOrgType($type: OrganizationType) { organizations(where: {type: $type}) { id name slug coordinates { longitude latitude } tray events(first: 1, orderBy: startDate_DESC) { title startDate } } }
Redirect to latest Nachrichten aus der Chemie cover as JPG.
Possible option to get a shadow is to append GET parameter shadow=1
.
/api/latest-nch-cover-image?shadow=1
Query:
query latestPublicationIssue { publicationIssues( first: 1 orderBy: pubDate_DESC where: {publication: {id: "ckoxbfpx43rn40b60l4wpj8mi"}} ) { cover { url(transformation: {document: {output: {format: jpg}}}) } } }
Return all press releases of the newer past.
Example
Not used in production right now.
Query
query pressReleases { articles( where: {articleGroups_some: {id: "ckli1wdb47mon0a13oklyfzww"}, isFree: true, OR: [{isHidden: false}, {isHidden: null}]} orderBy: pubDate_DESC ) { ...pressRelease } } fragment pressRelease on Article { id title subtitle slug content featuredImage { id url } pubDate }