GDCh’s Data Plat­form

API Documentation

Loading...

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.

Impressum

Return last 10 articles of Nachrichten aus der Chemie regarding the JCF.

Example

jcf.io/start/neuigkeiten

Query

query articlesForJcf { articles( stage: PUBLISHED 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"}]} ) { ...ApiArticles } } fragment ApiArticles on Article { __typename id isHidden title subtitle slug pubDate publicationIssue { id publication { id title slug } volume issue cover { url( transformation: {image: {resize: {width: 600}}, document: {output: {format: webp}}} ) } slug } firstPage lastPage doi authors { firstname lastname slugName mailSocialLink } authorBackup featuredImage { url( transformation: {image: {resize: {width: 600}}, document: {output: {format: webp}}} ) } content articleGroups { id title slug } localizations(locales: [en, de]) { locale id title subtitle content } }

Return all currently running awardings.

Example

www.gdch.de/ausschreibungen

Query

query upcomingAwardings($today: Date!) { awardings( orderBy: announcementEnd_ASC where: {announcementStart_lte: $today, announcementEnd_gte: $today} ) { ...awarding } } fragment awarding on Awarding { id isHidden 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:

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 webpUrl: url( transformation: {image: {resize: {width: 600}}, document: {output: {format: webp}}} ) } 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 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 webpUrl: url( transformation: {image: {resize: {width: 600}}, document: {output: {format: webp}}} ) } 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:

⚠️ 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

www.gdch.de/ov

Query

query organizationsEventsByOrgType($type: [OrganizationType!]) { organizations( where: {type_in: $type, active: true} orderBy: slug_ASC stage: DRAFT ) { ...organizationData personRoles( where: {NOT: {title_contains: "BV-Verteiler"}, person: {id_not: null}} ) { 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 webpUrl: url( transformation: {image: {resize: {width: 600}}, document: {output: {format: webp}}} ) } 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:

⚠️ 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

jcf.io/kalender

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 webpUrl: url( transformation: {image: {resize: {width: 600}}, document: {output: {format: webp}}} ) } 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

www.gdch.de/vcw-stammtische

Query

query organizationsCoordinatesByOrgType($type: OrganizationType) { organizations(where: {type: $type, active: true}) { 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"}} ) { __typename id slug description pubDate volume issue cover { url(transformation: {document: {output: {format: jpg}}}) } localizations(locales: [en, de]) { locale id description } } }

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 }