|
|
|
@ -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
|
|
|
|
|
}
|
|
|
|
|
```
|