-
Notifications
You must be signed in to change notification settings - Fork 0
GraphQL API
Stephan Kulla edited this page Jan 30, 2023
·
1 revision
We offer a GraphQL endpoint at https://api.serlo.orq/graphql in order to query Serlo content. For example to fetch data about the article https://serlo.org/1565 you can use:
curl -i -H 'Content-Type: application/json' -X POST \
-d '{"query": "query { uuid(id: 1565) { __typename }}"}' \
https://api.serlo.org/graphql
You can use the API playgroud at https://api.serlo.orq/___graphql to test your queries. There is also an embedded documentation for the schema.
Serlo content is saved inside a taxonomy (tree of content areas). Given the ID of a taxonomy term (e.g. 134206
for https://de.serlo.org/community/134206/methodenkiste) you can traverse its children via the query:
{
uuid(id:134206) {
id
... on TaxonomyTerm {
children {
nodes {
id
__typename
title
}
}
}
}
}
The result looks like this:
{
"data": {
"uuid": {
"id": 134206,
"children": {
"nodes": [
{
"id": 126369,
"__typename": "Article",
"title": "Auditiver Lerntyp"
},
{
"id": 126373,
"__typename": "Article",
"title": "Kommunikativer Lerntyp"
},
{
"id": 134811,
"__typename": "Article",
"title": "Was ist die Methodenkiste?"
},
{
"id": 134638,
"__typename": "Article",
"title": "Was ist die Methodenkiste?"
},
{
"id": 136257,
"__typename": "Article",
"title": "Mindmap "
},
{
"id": 136677,
"__typename": "Article",
"title": "Möglichkeit durch das Programm \"Microsoft Power Point\""
},
{
"id": 134952,
"__typename": "Article",
"title": "Motivierter im Sport"
},
{
"id": 179565,
"__typename": "Course",
"title": "179565"
},
{
"id": 179566,
"__typename": "Course",
"title": "Wissenschaftliches Denken"
},
{
"id": 179704,
"__typename": "Course",
"title": "179704"
}
]
}
}
}
}
- Home
- Serlo Infrastructure
- Serlo Infrastructure for Non programmers
- Resources for new programmers
- Setup of the toolchain
- Best Practices
- Data Privacy for Devs
- How Tos
- Single Sign On
- Integration with the Data Wallet
- User-Journey: SSO and Data Wallet
- User-Journey: Collaboration with Serlo Editor + Datenraum
- Integration of "Datenraum" into the Serlo Editor
- Introduction to the Serlo editor
- Core concepts of the Serlo editor
- Packages of the Serlo editor
- Creating a new plugin (outdated)
- Redux process in the Serlo editor
- The content format of the Serlo editor
- Serlo Editor Plugin Initial State
- How the Serlo Editor is integrated into edu-sharing via LTI
- Learner Events and xAPI