GDCh’s Open Data Plat­form

Documentation

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.

Impressum

/api/awardings

Return all currently running awardings.

Example

www.gdch.de/ausschreibungen

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 } } } ) } } } }

/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 ($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 } 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 } }

/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 ($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 } }

/api/geo/orgtype/orgtype

Return geographical data that can be used with OpenLayers.

Organization types (orgtype) may be:

Example

www.gdch.de/vcw-stammtische

Query

query ($type: OrganizationType) { organizations(where: { type: $type }) { id name slug coordinates { longitude latitude } tray events(first: 1, orderBy: startDate_DESC) { title startDate } } }

/api/latest-nch-cover-image

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) { cover { url(transformation: { document: { output: { format: jpg } } }) } } }

/api/pressreleases

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 isHidden: false } orderBy: pubDate_DESC ) { id title subtitle slug content featuredImage { id url } pubDate } }