Add get single entities page

This commit is contained in:
Serafeim Chatzopoulos 2024-07-05 19:38:08 +03:00
parent 9cf1a50f47
commit 94e96f64b5
6 changed files with 131 additions and 4 deletions

View File

@ -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:
<Tabs>
<TabItem value="research-product-curl" label="Curl">
```bash
curl -X GET "https://openaire-api.athenarc.gr/researchProducts/doi_dedup___::2b3cb7130c506d1c3a05e9160b2c4108" -H "accept: application/json"
```
</TabItem>
<TabItem value="research-product-python" label="Python">
```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}")
```
</TabItem>
</Tabs>
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
}
```

View File

@ -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).

View File

@ -1,2 +1,5 @@
# Filter search results
:::info warning
To be completed soon, for the next beta release.
:::

View File

@ -1 +1,5 @@
# Search entities
# Search entities
:::info warning
To be completed soon, for the next beta release.
:::

View File

@ -1 +1,5 @@
# Pagination
# Pagination
:::info warning
To be completed soon, for the next beta release.
:::

View File

@ -1 +1,5 @@
# Sort search results
# Sort search results
:::info warning
To be completed soon, for the next beta release.
:::