diff --git a/docs/apis/graph-api/get-single-entities.md b/docs/apis/graph-api/get-single-entities.md index df00bf2..3b7f13c 100644 --- a/docs/apis/graph-api/get-single-entities.md +++ b/docs/apis/graph-api/get-single-entities.md @@ -1,2 +1,107 @@ +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + # Get single entities +This is a guide on how to retrieve detailed information on a single entity using the OpenAIRE Graph API. + +## Endpoints +Currently, the Graph API supports the following entity types: + +- Research products - endpoint: `GET /researchProducts/{id}` +- Organizations - endpoint: `GET /organizations/{id}` +- Data sources - endpoint: `GET /dataSources/{id}` +- Projects - endpoint: `GET /projects/{id}` + +It is evident that you can retrieve the data of a single entity by providing the entity's unique OpenAIRE identifier (id) in the corresponding endpoint. +You can find more details about OpenAIRE identifiers [here](../../data-model/pids-and-identifiers). + +## Response +The response of the Graph API is a [Research Product](../../data-model/entities/research-product), [Organization](../../data-model/entities/organization), [Data Source](../../data-model/entities/data-source), or [Project](../../data-model/entities/project), depending on the endpoint used. + +## Examples +Here are some examples of how to retrieve single entity records using the Graph API. Please, navigate through the tabs to see the examples for each entity type. + +### Research products + + + +Get the research product with the OpenAIRE identifier `doi_dedup___::2b3cb7130c506d1c3a05e9160b2c4108`: + +[`https://openaire-api.athenarc.gr/researchProducts/doi_dedup___::2b3cb7130c506d1c3a05e9160b2c4108`](https://openaire-api.athenarc.gr/researchProducts/doi_dedup___::2b3cb7130c506d1c3a05e9160b2c4108) + +or using code: + + + + + +```bash +curl -X GET "https://openaire-api.athenarc.gr/researchProducts/doi_dedup___::2b3cb7130c506d1c3a05e9160b2c4108" -H "accept: application/json" +``` + + + + +```python +import requests + +url = "https://openaire-api.athenarc.gr/researchProducts/doi_dedup___::2b3cb7130c506d1c3a05e9160b2c4108" +headers = { + "accept": "application/json" +} + +response = requests.get(url, headers=headers) + +if response.status_code == 200: + print(response.json()) +else: + print(f"Request failed with status code {response.status_code}") +``` + + + + +This API call will return all the data of the research product with the given identifier: + +```json +{ + "id": "doi_dedup___::2b3cb7130c506d1c3a05e9160b2c4108", + "mainTitle": "Political conservatism as motivated social cognition.", + "description": [ + "Analyzing political conservatism as motivated social cognition integrates theories of personality (authoritarianism, dogmatism-intolerance of ambiguity), epistemic and existential needs (for closure, regulatory focus, terror management), and ideological rationalization (social dominance, system justification). A meta-analysis (88 samples, 12 countries, 22,818 cases) confirms that several psychological variables predict political conservatism: death anxiety (weighted mean r = .50); system instability (.47); dogmatism-intolerance of ambiguity (.34); openness to experience (-.32); uncertainty tolerance (-.27); needs for order, structure, and closure (.26); integrative complexity (-.20); fear of threat and loss (.18); and self-esteem (-.09). The core ideology of conservatism stresses resistance to change and justification of inequality and is motivated by needs that vary situationally and dispositionally to manage uncertainty and threat." + ], + "author": [ + { + "fullName": "John T, Jost", + "name": "John T", + "surname": "Jost", + "rank": 1, + "pid": { + "id": { + "scheme": "orcid", + "value": "0000-0002-2844-4645" + }, + "provenance": null + } + } + ], + "type": "publication", + "publicationDate": "2003-01-01", + "publisher": "American Psychological Association (APA)", + "source": [ + "Crossref" + ], + "pid": [ + { + "scheme": "Digital Object Identifier", + "value": "10.1037/0033-2909.129.3.339" + }, + { + "scheme": "PubMed ID", + "value": "12784935" + } + ], + // for brevity, the rest of the fields are omitted +} +``` \ No newline at end of file diff --git a/docs/apis/graph-api/overview.md b/docs/apis/graph-api/overview.md index f8d9c76..59b698b 100644 --- a/docs/apis/graph-api/overview.md +++ b/docs/apis/graph-api/overview.md @@ -3,9 +3,16 @@ The OpenAIRE Graph API provides a comprehensive way for developers to explore the [OpenAIRE Graph](https://graph.openaire.eu/), a vast interconnected dataset that aggregates metadata from a wide range of scholarly resources. The Graph API offers endpoints for accessing and querying this interconnected dataset, enabling users to retrieve detailed information on research products, organizations, data sources, and projects. -You can access the Swagger documentation of the Graph API [here](https://openaire-api.athenarc.gr/swagger-ui/index.html#/). +## Base URL and Swagger documentation +The base URL of the Graph API is: +``` +https://openaire-api.athenarc.gr/api +``` +You can access the API documentation in [api.openaire.eu/graph-api](https://openaire-api.athenarc.gr/swagger-ui/index.html#/). + +## Notes Please note that the Graph API: - is intended for data discovery and exploration; if you are interested in downloading the full OpenAIRE Graph dataset, please navigate [here](../../downloads/full-graph). diff --git a/docs/apis/graph-api/search-entities/filter-search-results.md b/docs/apis/graph-api/search-entities/filter-search-results.md index 2473d2f..d4dd38e 100644 --- a/docs/apis/graph-api/search-entities/filter-search-results.md +++ b/docs/apis/graph-api/search-entities/filter-search-results.md @@ -1,2 +1,5 @@ # Filter search results +:::info warning +To be completed soon, for the next beta release. +::: \ No newline at end of file diff --git a/docs/apis/graph-api/search-entities/overview.md b/docs/apis/graph-api/search-entities/overview.md index e6c67e4..280762b 100644 --- a/docs/apis/graph-api/search-entities/overview.md +++ b/docs/apis/graph-api/search-entities/overview.md @@ -1 +1,5 @@ -# Search entities \ No newline at end of file +# Search entities + +:::info warning +To be completed soon, for the next beta release. +::: \ No newline at end of file diff --git a/docs/apis/graph-api/search-entities/pagination.md b/docs/apis/graph-api/search-entities/pagination.md index 4122fb7..8c0c46f 100644 --- a/docs/apis/graph-api/search-entities/pagination.md +++ b/docs/apis/graph-api/search-entities/pagination.md @@ -1 +1,5 @@ -# Pagination \ No newline at end of file +# Pagination + +:::info warning +To be completed soon, for the next beta release. +::: \ No newline at end of file diff --git a/docs/apis/graph-api/search-entities/sort-search-results.md b/docs/apis/graph-api/search-entities/sort-search-results.md index 91ff48c..e0346a9 100644 --- a/docs/apis/graph-api/search-entities/sort-search-results.md +++ b/docs/apis/graph-api/search-entities/sort-search-results.md @@ -1 +1,5 @@ -# Sort search results \ No newline at end of file +# Sort search results + +:::info warning +To be completed soon, for the next beta release. +::: \ No newline at end of file