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.
Cached data include a timestamp
in the JSON object which allows to automatically check the age of the data.
{ "data": [ <data according to GraphQL queries below> ], "timestamp": "2022-07-05T17:55:21.764Z" }
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
{ 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" } ] } ) { 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 ($today: Date!) { awardings( orderBy: announcementEnd_ASC where: { announcementStart_lte: $today, announcementEnd_gte: $today } ) { 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.
Example
www.gdch.de/veranstaltungen/die-gdch-vor-ort.html
Data returned
{ "type": "talk", "id": "clbw0vz21iu9y0bt654a8d0tr", "startDate": "2023-02-09T15:15:00+00:00", "endDate": "2023-02-09T16:15:00+00:00", "title": "Aging Mechanisms in Lithium-Ion Cells—Detection, Attenuation, and practical Consequences", "subtitle": "Dr. Thomas Waldmann, ZSW Ulm", "slug": "aging-mechanisms-in-lithium-ion-cells-detection-attenuation-and-practical-consequences-2023", "ctaTitle": "Zoom Link", "ctaLink": "https://gdch.link/ulm-kolloq", "organization": "OV Ulm", "tags": [ "hybrid" ], "location": "Universität Ulm, Albert-Einstein-Allee 11, 89081 Ulm, Deutschland", "href": "https://gdch.app/event/aging-mechanisms-in-lithium-ion-cells-detection-attenuation-and-practical-consequences-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 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 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 ($type: [OrganizationType!]) { organizations(where: { type_in: $type }, orderBy: name_ASC, stage: DRAFT) { ...organizationData adminPersons( where: { AND: [ { id_not: "ckiin8o9k06ki0954h57lmtai" } # Max Bräutigam { id_not: "ckma5p6iogzud0a61lbnegm7c" } # Maike Fries { id_not: "ckm9yepg0u7db0b08s3h4lmnh" } # Nicole Bürger ] } ) { ...managerData } personRole { title person { ...managerData } } events(orderBy: startDate_DESC) { ...eventData } } } fragment eventData on Event { id # unique id title # title of talk or event title talkLecturer # only if type=talk talkLecturerAffiliation # only if type=talk attendanceType # online, offline, or hybrid type # talk, recurring_meetup, excursion, symposia, other description startDate endDate image { # manager can provide a featured image url width height fileName } locationTitle # location title, e.g. Gasthaus zum Löwen locationAddress # street, number, postal code, city coordinates { longitude latitude } slug # used for https://gdch.app/event/{slug} statusApp # live, cancelled, or draft } fragment managerData on Person { id # unique id firstname lastname title # title, e.g. Prof.Dr. slugName # used in https://gdch.app/profile/{slug} mailSocialLink # public email as entered in profile linkedinSocialLink # social links as entered in profile xingSocialLink twitterSocialLink profileImage { url( transformation: { document: { output: { format: webp } } image: { resize: { height: 200, width: 200, fit: crop } } } ) } } fragment organizationData on Organization { id # unique id name # the organization’s name type # type as in orgtype slug # slug used in URLs coordinates { # used if LocalSection, RegionalForum, or VcwStammtisch longitude latitude } logo { url # typically returns the SVG logo } tray # misc data }
/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 ($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 # unique id title # title of talk or event title talkLecturer # only if type=talk talkLecturerAffiliation # only if type=talk attendanceType # online, offline, or hybrid type # talk, recurring_meetup, excursion, symposia, other description startDate endDate image { # manager can provide a featured image url width height fileName } locationTitle # location title, e.g. Gasthaus zum Löwen locationAddress # street, number, postal code, city coordinates { longitude latitude } slug # used for https://gdch.app/event/{slug} statusApp # live, cancelled, or draft } fragment managerData on Person { id # unique id firstname lastname title # title, e.g. Prof.Dr. slugName # used in https://gdch.app/profile/{slug} mailSocialLink # public email as entered in profile linkedinSocialLink # social links as entered in profile xingSocialLink twitterSocialLink profileImage { url( transformation: { document: { output: { format: webp } } image: { resize: { height: 200, width: 200, fit: crop } } } ) } } fragment organizationData on Organization { id # unique id name # the organization’s name type # type as in orgtype slug # slug used in URLs coordinates { # used if LocalSection, RegionalForum, or VcwStammtisch longitude latitude } logo { url # typically returns the SVG logo } tray # misc data }
/api/geo/orgtype/orgtype
Return geographical data that can be used with OpenLayers.
Organization types (orgtype
) may be:
Example
Query
query ($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:
{ 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
{ articles( where: { articleGroups_some: { id: "ckli1wdb47mon0a13oklyfzww" # id of press releases article group } isFree: true OR: [{ isHidden: false }, { isHidden: null }] } orderBy: pubDate_DESC ) { id title subtitle slug content featuredImage { id url } pubDate } }