Goldie the Scholar Retriever
Goldie the Scholar Retriever · GPT-Aktionen
PID Graph - GraphQL API
An API to query repositories using PID from the PID Graph - GraphQL API.
POST /graphqlMake a GraphQL querySend a GraphQL query to the server.
Ursprüngliches API-Schema
{
"components": {
"schemas": {
"Error": {
"properties": {
"locations": {
"description": "The locations of the errors in the query, if available.",
"items": {
"$ref": "#/components/schemas/ErrorLocation"
},
"type": "array"
},
"message": {
"description": "A description of the error.",
"type": "string"
},
"path": {
"description": "The path of the field that caused the error, if available.",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array"
}
},
"type": "object"
},
"ErrorLocation": {
"properties": {
"column": {
"description": "The column number of the error.",
"type": "integer"
},
"line": {
"description": "The line number of the error.",
"type": "integer"
}
},
"type": "object"
},
"ErrorResponse": {
"properties": {
"errors": {
"description": "A list of errors that occurred during the request.",
"items": {
"$ref": "#/components/schemas/Error"
},
"type": "array"
}
},
"type": "object"
},
"GraphQLRequest": {
"properties": {
"query": {
"description": "The GraphQL query.",
"type": "string"
},
"variables": {
"additionalProperties": true,
"description": "The variables for the query.",
"type": "object"
}
},
"required": [
"query"
],
"type": "object"
},
"GraphQLResponse": {
"properties": {
"data": {
"additionalProperties": true,
"description": "The result of the query.",
"type": "object"
},
"errors": {
"description": "A list of errors that occurred during the request.",
"items": {
"$ref": "#/components/schemas/Error"
},
"type": "array"
}
},
"type": "object"
}
}
},
"info": {
"description": "An API to query repositories using PID from the PID Graph - GraphQL API.",
"title": "PID Graph - GraphQL API",
"version": "1.0.0"
},
"openapi": "3.0.0",
"paths": {
"/graphql": {
"post": {
"description": "Send a GraphQL query to the server.",
"operationId": "graphql_request",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GraphQLRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GraphQLResponse"
}
}
},
"description": "A successful GraphQL response"
},
"400": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Bad request"
},
"500": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "Internal server error"
}
},
"summary": "Make a GraphQL query"
}
}
},
"servers": [
{
"description": "Local development server",
"url": "https://inmedias-res.org"
}
],
"x-graphql-queries": [
{
"name": "Fetch from a topic, such a Biology",
"query": "{ \n repositories(query:\"Biology\" ) {\n nodes{\n uid\n url\n re3dataUrl\n description\n keyword\n }\n }\n}\n"
},
{
"name": "Fetch all repositories with the FAIR Data project criteria",
"query": "{ \n repositories(subjectId:\"34\", hasPid:\"true\", isOpen:\"true\" ) {\n nodes{\n uid\n url\n re3dataUrl\n description\n keyword\n }\n }\n}\n"
},
{
"name": "Fetch the number of citations and views of the repository with ID ONCS.ONC",
"query": "{ \n repository(id: \"ONCS.ONC\") {\n uid\n name\n url\n re3dataUrl\n description\n citationCount\n viewCount\n keyword\n }\n}\n"
},
{
"filters": [
{
"description": "Filter works by whether they have a funder",
"name": "hasFunder",
"type": "boolean"
},
{
"description": "Filter works by whether they have views",
"name": "hasViews",
"type": "integer"
},
{
"description": "Filter works by whether they have downloads",
"name": "hasDownloads",
"type": "integer"
},
{
"description": "Filter works by whether they have citations",
"name": "hasCitations",
"type": "integer"
},
{
"description": "Filter works by field of science",
"name": "fieldOfScience",
"type": "string"
},
{
"description": "Filter works by member ID",
"name": "memberId",
"type": "string"
},
{
"description": "Filter works by repository ID",
"name": "repositoryId",
"type": "string"
}
],
"name": "Fetch all the works from the repository with ID ONCS.ONC and creators with ROR ID https://ror.org/02kkvpp62",
"query": "{ \n repository(id: \"ONCS.ONC\") {\n name\n uid\n url\n re3dataUrl\n description\n clientId\n keyword\n works (first: 25 query: \"creators.nameIdentifiers.nameIdentifier:\\\"https://ror.org/02kkvpp62\\\"\") {\n totalCount\n nodes {\n doi\n titles {\n title\n }\n }\n }\n }\n}\n"
},
{
"name": "Fetch all the types in the GraphQL schema.",
"query": "{ __schema { types { name kind } } }\n"
}
],
"x-graphql-types": [
{
"name": "Dataset"
},
{
"name": "Work"
},
{
"name": "Software"
},
{
"name": "Organisation"
},
{
"name": "Person"
},
{
"name": "Publication"
},
{
"name": "Repository"
}
]
}