Collections:
Other Resources:
GraphQL API - api.datacite.org/graphql
How to use GraphQL API, api.datacite.org/graphql?
✍: FYIcenter.com
GraphQL API, api.datacite.org/graphql,
allows you to access DataCite DOI database using the
GraphQL (Graph query language).
When using GraphQL API, you need to use the POST method to send the HTTP request. The GraphQL query, written in JSON format, is included in the HTTP body.
DataCite offers a Web interface that allows you to run GraphQL queries interactively.
1. Go to GraphQL API Web Interface.
2. Enter the following GraphQL query in the input area on the left. It requests for the first 3 datasets of the given Founder:
{
funder(id: "https://doi.org/10.13039/501100000780") {
name
datasets(first: 3, after: "Mg") {
edges {
node {
id
titles {
title
}
}
}
}
}
}
3. Click Play icon. You see the output displayed on the right.
{
"data": {
"funder": {
"name": "European Commission",
"datasets": {
"edges": [
{
"node": {
"id": "https://doi.org/10.1594/pangaea.190844",
"titles": [
{
"title": "Vertical distribution of suspended aggregates at station ALMO-I_PVM11"
}
]
}
},
{
"node": {
"id": "https://doi.org/10.1594/pangaea.190844",
"titles": [
{
"title": "Vertical distribution of suspended aggregates at station ALMO-I_PVM11"
}
]
}
},
{
"node": {
"id": "https://doi.org/10.1594/pangaea.190845",
"titles": [
{
"title": "Vertical distribution of suspended aggregates at station ALMO-I_PVM12"
}
]
}
}
]
}
}
}
}
If you want to run the same GraphQL query with the "curl" command, you can click the "COPY CURL" button to get a copy of the following command line. If you run it, you will get the same result as the Web interface.
curl 'https://api.datacite.org/graphql' -H 'Accept-Encoding: gzip, deflate, br' \
-H 'Content-Type: application/json' -H 'Accept: application/json' \
-H 'Connection: keep-alive' -H 'DNT: 1' -H 'Origin: https://api.datacite.org' \
--data-binary '{"query":"{\n funder(id: \"https://doi.org/10.13039/501100000780\") \
{\n name\n datasets(first: 3, after: \"Mg\") {\n edges {\n \
node {\n id\n titles {\n title\n }\n \
}\n }\n }\n }\n}"}' --compressed
2022-10-11, ∼648🔥, 0💬
Popular Posts:
Paper Summary: Title: Ezra Pound's Meters and Rhythms Author(s): William McNaughton Year: 1963 DOI: ...
Paper Summary: DOI: 10.1038/s42255-022-00575 -zReceived on: 2024-06-03
Paper Summary: DOI: 10.1007/s00710-024-00868 -zReceived on: 2024-08-27
Paper Summary: DOI: 10.15372/FTPRPI20210612 Received on: 2024-04-11
Paper Summary: DOI: 10.1007/s00330-024-11005 -xReceived on: 2024-08-28