Introduction
The EU Pollinator Hub is an integrative tool to centralise, analyse and visualise bee and pollinator-related data based on principles of collaboration and conservation.
Bees and other insect pollinators are becoming increasingly relevant in the public debate. European authorities now recognise the environmental risks pollinators face and the need for institutional action. Given their importance for ecosystems and their role in our food security, the commitment to protect pollinators has been growing, and data is essential to fulfilling this commitment.
Different agents and stakeholders are continually collecting data related to the status of pollinators, such as researchers, environmental, health or agricultural authorities, national beekeeping or farming associations. The EU Pollinator Hub has been conceived to valorise their efforts and improve collaborations based on data-sharing. At the same time, the EU Pollinator Hub is constantly developing to provide access to valuable data from different consenting sources. In a collaborative spirit, the EU Pollinator Hub centralises and presents this data, also working as a communicative tool for the benefit of bees and pollinators in general.
The EU Pollinator Hub is coordinated by BeeLife European Beekeeping Coordination, an NGO focused on the protection of pollinators and biodiversity in Europe. BeeLife has initialised the first stages of this integrative platform within the Internet of Bees (IoBee) project.
The EU Pollinator Hub is also an attempt to materialise the conclusions of the EU Bee Partnership regarding the need for further bee-data integration. The partnership is a stakeholder platform dynamised by the European Food Safety Authority that includes representatives from the beekeeping and farming sectors, NGOs, veterinarians, academia, industry, producers, and scientists.
This new tool also includes developments from the Apimondia working group on the standardisation of data on bees - Bee XML. Bee XML is the ongoing measure to reach a new model for sharing bee data, and the EU Pollinator Hub aims at implementing these standards.
This documentation aims to provide all the information you need to work with our API.
Authenticating requests
To authenticate requests, include an Authorization
header with the value "Bearer {YOUR_AUTH_KEY}"
.
All authenticated endpoints are marked with a requires authentication
badge in the documentation below.
You can retrieve your token by visiting your dashboard and clicking API Tokens.
Entities
This route will allow modifications to the meta-data for the Entities. It includes basic information like name, description and contact information. It directly “owns” datasets. It is identified by UID which is created during the data entity creation procedure.
Show Entities
requires authentication
Display a listing of Entities, the User has access to.
Example request:
curl --request GET \
--get "https://pollinator-hub/api/v1/entities" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://pollinator-hub/api/v1/entities';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://pollinator-hub/api/v1/entities"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'https://pollinator-hub/api/v1/entities'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": [
{
"name": "EU Pollinator Hub",
"uid": "euph",
"contact": [
{
"type": "url",
"value": "https://pollinatorhub.eu"
},
{
"type": "email",
"value": "hello@pollinatorhub.eu"
}
],
"abbreviation": "EUPH",
"registry_number": "N/A",
"description": "The EU Pollinator Hub is a data hub related to pollinators, which is provided by the European Food Safety Authority (EFSA).",
"address": "N/A",
"country": {
"iso-3166-country-name": "the Kingdom of Belgium",
"iso-3166-numeric-country-code": "56",
"iso-3166-country-name-short-lc": "Belgium",
"iso-3166-alpha-2-country": "BE",
"iso-3166-alpha-3-country": "BEL"
},
"user_id": 1,
"created_at": "2023-07-04T11:24:58.000000Z",
"updated_at": "2023-07-04T11:25:00.000000Z"
},
}
Example response (400, Bad Request):
Example response (401, Unauthorized):
Example response (403, Forbidden):
Example response (500, Internal server error):
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Response
Response Fields
data
string[]
A list of entities available to the User.
*
object
name
string
A descriptive name of the entity.
slug
string
The URL used to access the entity
uid
string
The unique identifier used to identify the entity within the platform.
contact
object[]
A list of contact points for the entity.
type
string
The type of the contact.
value
string
The actual value of the contact, for example email address, url or other.
abbreviation
string
Abbreviation or short name of the entity.
registry_number
string
A public unique identifier used to identify a legal entity. Can be empty for private persons.
description
string
A longer description about the entity. Uses Markdown for styling.
address
string
Full address of the entity. Can be empty for private persons.
country
object
Country the entity resides in.
iso-3166-country-name
string
Full name of the country.
iso-3166-country-name-short-lc
string
Short name, written in lower case letters, of the country.
iso-3166-numeric-country-code
string
Numeric code of the country according to ISO-3166 standard.
iso-3166-alpha-2-country
string
A two-letter code that represents a country name, recommended as general purpose code.
iso-3166-alpha-3-country
string
A three-letter code that represents a country name.
user_id
integer
Numeric identifier of a user.
type
string
Type of the Entity.
personal_team
boolean
This Entity represents the User.
created_at
string
The date and time the entity was created.
updated_at
string
The date and time the entity was last updated.
Create Entity
requires authentication
Store an Entity in storage.
Example request:
curl --request POST \
"https://pollinator-hub/api/v1/entities" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"European Food Safety Authority\",
\"abbreviation\": \"EFSA\",
\"description\": \"No-example\",
\"user_id\": 14,
\"country_id\": \"IT\",
\"type\": \"person\"
}"
$client = new \GuzzleHttp\Client();
$url = 'https://pollinator-hub/api/v1/entities';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'European Food Safety Authority',
'abbreviation' => 'EFSA',
'description' => 'No-example',
'user_id' => 14,
'country_id' => 'IT',
'type' => 'person',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://pollinator-hub/api/v1/entities"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "European Food Safety Authority",
"abbreviation": "EFSA",
"description": "No-example",
"user_id": 14,
"country_id": "IT",
"type": "person"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json
url = 'https://pollinator-hub/api/v1/entities'
payload = {
"name": "European Food Safety Authority",
"abbreviation": "EFSA",
"description": "No-example",
"user_id": 14,
"country_id": "IT",
"type": "person"
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show Entity
requires authentication
Display the specified Entity.
Example request:
curl --request GET \
--get "https://pollinator-hub/api/v1/entities/3" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://pollinator-hub/api/v1/entities/3';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://pollinator-hub/api/v1/entities/3"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'https://pollinator-hub/api/v1/entities/3'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"name": "EU Pollinator Hub",
"uid": "euph",
"contact": [
{
"type": "url",
"value": "https://pollinatorhub.eu"
},
{
"type": "email",
"value": "hello@pollinatorhub.eu"
}
],
"abbreviation": "EUPH",
"registry_number": "N/A",
"description": "The EU Pollinator Hub is a data hub related to pollinators, which is provided by the European Food Safety Authority (EFSA).",
"address": "N/A",
"country": {
"iso-3166-country-name": "the Kingdom of Belgium",
"iso-3166-numeric-country-code": "56",
"iso-3166-country-name-short-lc": "Belgium",
"iso-3166-alpha-2-country": "BE",
"iso-3166-alpha-3-country": "BEL"
},
"user_id": 1,
"created_at": "2023-07-04T11:24:58.000000Z",
"updated_at": "2023-07-04T11:25:00.000000Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Response
Response Fields
data
object
name
string
A descriptive name of the entity.
slug
string
The URL used to access the entity
uid
string
The unique identifier used to identify the Entity within the platform.
contact
object[]
A list of contact points for the entity.
type
string
The type of the contact.
value
string
The actual value of the contact, for example email address, url or other.
abbreviation
string
Abbreviation or short name of the entity.
registry_number
string
A public unique identifier used to identify a legal entity. Can be empty for private persons.
description
string
A longer description about the entity. Uses Markdown for styling.
address
string
Full address of the entity. Can be empty for private persons.
country
object
Country the entity resides in.
iso-3166-country-name
string
Full name of the country.
iso-3166-country-name-short-lc
string
Short name, written in lower case letters, of the country.
iso-3166-numeric-country-code
string
Numeric code of the country according to ISO-3166 standard.
iso-3166-alpha-2-country
string
A two-letter code that represents a country name, recommended as general purpose code.
iso-3166-alpha-3-country
string
A three-letter code that represents a country name.
user_id
integer
Numeric identifier of a user.
type
string
Type of the Entity.
personal_team
boolean
This Entity represents the User.
created_at
string
The date and time the entity was created.
updated_at
string
The date and time the entity was last updated.
Update Entity
requires authentication
Update the specified Entity in storage.
Example request:
curl --request PUT \
"https://pollinator-hub/api/v1/entities/3" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"European Food Safety Authority\",
\"abbreviation\": \"EFSA\",
\"description\": \"No-example\",
\"user_id\": 0,
\"country_id\": \"IT\"
}"
$client = new \GuzzleHttp\Client();
$url = 'https://pollinator-hub/api/v1/entities/3';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'European Food Safety Authority',
'abbreviation' => 'EFSA',
'description' => 'No-example',
'user_id' => 0,
'country_id' => 'IT',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://pollinator-hub/api/v1/entities/3"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "European Food Safety Authority",
"abbreviation": "EFSA",
"description": "No-example",
"user_id": 0,
"country_id": "IT"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json
url = 'https://pollinator-hub/api/v1/entities/3'
payload = {
"name": "European Food Safety Authority",
"abbreviation": "EFSA",
"description": "No-example",
"user_id": 0,
"country_id": "IT"
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
Example response (200):
{}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Entity
requires authentication
Remove the specified Entity from storage.
Example request:
curl --request DELETE \
"https://pollinator-hub/api/v1/entities/3" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://pollinator-hub/api/v1/entities/3';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://pollinator-hub/api/v1/entities/3"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
import requests
import json
url = 'https://pollinator-hub/api/v1/entities/3'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Example response (204):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Datasets
This route will allow modifications to the meta-data for the Datasets. It includes basic information like name, description and contact information. It is owned by one or more entities. It directly owns one or more Dataset Parts. It is identified by UID which is created during the data entity creation procedure.
Show Datasets
requires authentication
Display a listing of the Datasets, the User has access to..
Example request:
curl --request GET \
--get "https://pollinator-hub/api/v1/datasets?entity=euph" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://pollinator-hub/api/v1/datasets';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'entity' => 'euph',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://pollinator-hub/api/v1/datasets"
);
const params = {
"entity": "euph",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'https://pollinator-hub/api/v1/datasets'
params = {
'entity': 'euph',
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
Example response (200):
{
"data": [
{
"entities": [
"euph"
],
"name": "EUPH Reference dataset containing licences",
"long_name": "EUPH Reference dataset containing licences",
"number": "000026",
"slug": "licences",
"uid": "licences",
"description": "The dataset contains all licences for data hosted on the EUPH.",
"status": "publish",
"public": true,
"licence": "cc-by",
"published_at": null
},
]
}
Example response (400, Bad Request):
Example response (401, Unauthorized):
Example response (403, Forbidden):
Example response (500, Internal server error):
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Response
Response Fields
data
object[]
A list of Datasets available to the User.example email address, url or other.
*
object
name
string
The actual name of the dataset.
long_name
string
The long version of the name of the dataset.
number
string
Number to identify the dataset. The number will be automatically generated when the dataset is created.
slug
string
The URL used to access the entity
uid
string
The unique identifier used to identify the entity within the platform.
description
string
Longer description about the dataset. Uses Markdown for styling.
entities
string[]
Array containing the uid of the entities of this dataset.
*
string
The Uid of the entity
contact
object[]
A list of contact points for the entity.
type
string
The type of the contact.
value
string
The actual value of the contact, for
status
string
The status of the dataset. The list of available status are the following: draft, pending, reject, reviewing, pending-peer-rev, peer-reviewing, publish, publish-with-pw, trash, hidden
public
boolean
1 means that the data of this dataset are public.
licence
string|null
The uid of the licence of this entity.
published_at
string|null
The date and time the dataset was published.
created_at
string
The date and time the dataset was created.
updated_at
string
The date and time the dataset was last updated.
Create Dataset
requires authentication
Store a Dataset in storage.
Example request:
curl --request POST \
"https://pollinator-hub/api/v1/datasets" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"entities\": [
\"euph\"
],
\"name\": \"ISO 3166-1:2020\",
\"long_name\": \"vlxmjnulygdmmcrpskonlqbautjblunmehwjlgrheflzlpyxyamfphrenquknbusknrgndtgawvvzdtp\",
\"description\": \"Qui est debitis quae sit unde quia.\",
\"status\": \"pending\",
\"public\": true,
\"licence\": \"cc-by\",
\"published_at\": \"2023-07-04T11:24:58.000000Z\"
}"
$client = new \GuzzleHttp\Client();
$url = 'https://pollinator-hub/api/v1/datasets';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'entities' => [
'euph',
],
'name' => 'ISO 3166-1:2020',
'long_name' => 'vlxmjnulygdmmcrpskonlqbautjblunmehwjlgrheflzlpyxyamfphrenquknbusknrgndtgawvvzdtp',
'description' => 'Qui est debitis quae sit unde quia.',
'status' => 'pending',
'public' => true,
'licence' => 'cc-by',
'published_at' => '2023-07-04T11:24:58.000000Z',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://pollinator-hub/api/v1/datasets"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"entities": [
"euph"
],
"name": "ISO 3166-1:2020",
"long_name": "vlxmjnulygdmmcrpskonlqbautjblunmehwjlgrheflzlpyxyamfphrenquknbusknrgndtgawvvzdtp",
"description": "Qui est debitis quae sit unde quia.",
"status": "pending",
"public": true,
"licence": "cc-by",
"published_at": "2023-07-04T11:24:58.000000Z"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json
url = 'https://pollinator-hub/api/v1/datasets'
payload = {
"entities": [
"euph"
],
"name": "ISO 3166-1:2020",
"long_name": "vlxmjnulygdmmcrpskonlqbautjblunmehwjlgrheflzlpyxyamfphrenquknbusknrgndtgawvvzdtp",
"description": "Qui est debitis quae sit unde quia.",
"status": "pending",
"public": true,
"licence": "cc-by",
"published_at": "2023-07-04T11:24:58.000000Z"
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Show Dataset
requires authentication
Display the specified Dataset.
Example request:
curl --request GET \
--get "https://pollinator-hub/api/v1/datasets/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://pollinator-hub/api/v1/datasets/1';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://pollinator-hub/api/v1/datasets/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'https://pollinator-hub/api/v1/datasets/1'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
access-control-allow-origin: *
{
"data": {
"name": "EUPH",
"long_name": "EUPH",
"number": "000001",
"uid": "EUPHA1.0.0",
"description": "This dataset contains the basic data created for the platform to function.",
"entities": [
"euph"
],
"contact": [],
"licence": "euph",
"published_at": null,
"created_at": "2023-09-01T08:53:36.000000Z",
"updated_at": "2024-01-26T17:32:58.000000Z"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Response
Response Fields
data
object
name
string
The actual name of the dataset.
long_name
string
The long version of the name of the dataset.
number
string
Number to identify the dataset. The number will be automatically generated when the dataset is created.
slug
string
The URL used to access the entity
uid
string
The unique identifier used to identify the entity within the platform.
description
string
Longer description about the dataset. Uses Markdown for styling.
entities
string[]
Array containing the uid of the entities of this dataset.
*
string
The Uid of the entity
contact
object[]
A list of contact points for the entity.
type
string
The type of the contact.
value
string
The actual value of the contact, for example email address, url or other.
status
string
The status of the dataset. The list of available status are the following: draft, pending, reject, reviewing, pending-peer-rev, peer-reviewing, publish, publish-with-pw, trash, hidden
public
boolean
1 means that the data of this dataset are public.
licence
string|null
The uid of the licence of this entity.
published_at
string|null
The date and time the dataset was published.
created_at
string
The date and time the dataset was created.
updated_at
string
The date and time the dataset was last updated.
Update Dataset
requires authentication
Update the specified Dataset in storage.
Example request:
curl --request PUT \
"https://pollinator-hub/api/v1/datasets/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"entities\": [
\"euph\"
],
\"name\": \"ISO 3166-1:2020\",
\"long_name\": \"No-example\",
\"description\": \"No-example\",
\"status\": \"pending\",
\"licence\": \"cc-by\",
\"public\": true,
\"published_at\": \"2023-07-04T11:24:58.000000Z\"
}"
$client = new \GuzzleHttp\Client();
$url = 'https://pollinator-hub/api/v1/datasets/1';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'entities' => [
'euph',
],
'name' => 'ISO 3166-1:2020',
'long_name' => 'No-example',
'description' => 'No-example',
'status' => 'pending',
'licence' => 'cc-by',
'public' => true,
'published_at' => '2023-07-04T11:24:58.000000Z',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://pollinator-hub/api/v1/datasets/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"entities": [
"euph"
],
"name": "ISO 3166-1:2020",
"long_name": "No-example",
"description": "No-example",
"status": "pending",
"licence": "cc-by",
"public": true,
"published_at": "2023-07-04T11:24:58.000000Z"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json
url = 'https://pollinator-hub/api/v1/datasets/1'
payload = {
"entities": [
"euph"
],
"name": "ISO 3166-1:2020",
"long_name": "No-example",
"description": "No-example",
"status": "pending",
"licence": "cc-by",
"public": true,
"published_at": "2023-07-04T11:24:58.000000Z"
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
Example response (200):
{}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete Dataset
requires authentication
Remove the specified Dataset from storage.
Example request:
curl --request DELETE \
"https://pollinator-hub/api/v1/datasets/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://pollinator-hub/api/v1/datasets/1';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://pollinator-hub/api/v1/datasets/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
import requests
import json
url = 'https://pollinator-hub/api/v1/datasets/1'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Example response (204):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Dataset Parts
Show Dataset Parts
requires authentication
Display a listing of Dataset Parts, the User has access to.
Example request:
curl --request GET \
--get "https://pollinator-hub/api/v1/datasets/1/parts" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://pollinator-hub/api/v1/datasets/1/parts';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://pollinator-hub/api/v1/datasets/1/parts"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'https://pollinator-hub/api/v1/datasets/1/parts'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": [
{
"name": "ISO 3166-1:2020",
"description": "File iso3166_1_2020.csv contains 291 records of countries included in the ISO standard 3166-1:2020...",
"uid": "DTST1.PRTA1.0",
"type": "file",
"licence_id": "unlicenced",
"created_at": "2023-07-04T11:24:58.000000Z",
"updated_at": "2023-07-04T11:24:58.000000Z"
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create Dataset Part.
requires authentication
Store a Dataset Part in storage.
Example request:
curl --request POST \
"https://pollinator-hub/api/v1/datasets/1/parts" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"ISO 3166-1:2020\",
\"description\": \"No-example\",
\"type\": \"api\"
}"
$client = new \GuzzleHttp\Client();
$url = 'https://pollinator-hub/api/v1/datasets/1/parts';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'name' => 'ISO 3166-1:2020',
'description' => 'No-example',
'type' => 'api',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://pollinator-hub/api/v1/datasets/1/parts"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "ISO 3166-1:2020",
"description": "No-example",
"type": "api"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json
url = 'https://pollinator-hub/api/v1/datasets/1/parts'
payload = {
"name": "ISO 3166-1:2020",
"description": "No-example",
"type": "api"
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (201):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 58
access-control-allow-origin: *
{
"data": {
"name": "ISO 3166-1:2020",
"description": "No-example",
"type": "api",
"licence": null,
"dataset_uid": "EUPHA1.0.0",
"published_at": null,
"created_at": "2024-05-17T13:22:36.000000Z",
"updated_at": "2024-05-17T13:22:36.000000Z"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Display the specified resource.
requires authentication
Example request:
curl --request GET \
--get "https://pollinator-hub/api/v1/parts/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://pollinator-hub/api/v1/parts/1';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://pollinator-hub/api/v1/parts/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'https://pollinator-hub/api/v1/parts/1'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 57
access-control-allow-origin: *
{
"data": {
"name": "ISO 3166:2020",
"description": "Data in this table was obtained from the International Organization for Standardization (ISO) Data, an independent, non-governmental international organization with a membership of 167 national standards bodies. It contains codes and names for the representation of names of countries and their subdivisions.",
"type": "file",
"licence": "euph",
"dataset_uid": "CNTRS2.0.0",
"published_at": null,
"created_at": "2023-01-26T18:18:14.000000Z",
"updated_at": "2024-01-26T17:32:58.000000Z"
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update the specified resource in storage.
requires authentication
Example request:
curl --request PUT \
"https://pollinator-hub/api/v1/parts/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"entities\": [
\"euph\"
],
\"name\": \"ISO 3166-1:2020\",
\"description\": \"No-example\",
\"type\": \"api\"
}"
$client = new \GuzzleHttp\Client();
$url = 'https://pollinator-hub/api/v1/parts/1';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'entities' => [
'euph',
],
'name' => 'ISO 3166-1:2020',
'description' => 'No-example',
'type' => 'api',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://pollinator-hub/api/v1/parts/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"entities": [
"euph"
],
"name": "ISO 3166-1:2020",
"description": "No-example",
"type": "api"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json
url = 'https://pollinator-hub/api/v1/parts/1'
payload = {
"entities": [
"euph"
],
"name": "ISO 3166-1:2020",
"description": "No-example",
"type": "api"
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
Example response (200):
Show headers
content-type: text/html; charset=UTF-8
cache-control: no-cache, private
x-ratelimit-limit: 60
x-ratelimit-remaining: 56
access-control-allow-origin: *
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Remove the specified resource from storage.
requires authentication
Example request:
curl --request DELETE \
"https://pollinator-hub/api/v1/parts/1" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://pollinator-hub/api/v1/parts/1';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://pollinator-hub/api/v1/parts/1"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
import requests
import json
url = 'https://pollinator-hub/api/v1/parts/1'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Example response (204):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Data
Show Data
requires authentication
Display a listing of all data related to this Dataset Part. Is paginated..
Example request:
curl --request GET \
--get "https://pollinator-hub/api/v1/parts/1/data" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://pollinator-hub/api/v1/parts/1/data';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://pollinator-hub/api/v1/parts/1/data"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
import requests
import json
url = 'https://pollinator-hub/api/v1/parts/1/data'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"records": [
{
"id": [
"ISO 3166-1"
],
"timestamp": "2020",
"data": [
{
"descriptors": "iso-3166-numeric-country-code",
"value": "10",
"origin": null,
"unit": null,
},
{
"descriptors": "iso-3166-country-name-short",
"value": "ANTARCTICA",
"origin": null,
"unit": null,
},
...
]
},
...
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Response
Response Fields
records
object[]
List of Records.
*
object
id
string[]
List of Ids, this record is associated with.
timestamp
string
Timestamp this record was recorded at.
data
object[]
List of data contained within the Record.
*
object
descriptor
string
The UID of the descriptor this datum represents.
value
The value of the datum.
origin
The UID of the Origin, this datum is related to. Can be null.
unit
The UID of the Unit, this datum is related to. Can be null.
Store Data
requires authentication
Store a set of records within provided Dataset Part.
Example request:
curl --request POST \
"https://pollinator-hub/api/v1/parts/1/data" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"records\": [
\"adipisci\"
]
}"
$client = new \GuzzleHttp\Client();
$url = 'https://pollinator-hub/api/v1/parts/1/data';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'records' => [
'adipisci',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://pollinator-hub/api/v1/parts/1/data"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"records": [
"adipisci"
]
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json
url = 'https://pollinator-hub/api/v1/parts/1/data'
payload = {
"records": [
"adipisci"
]
}
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete all Data
requires authentication
Removes all data related to this Dataset Part.
Example request:
curl --request DELETE \
"https://pollinator-hub/api/v1/parts/1/data" \
--header "Authorization: Bearer {YOUR_AUTH_KEY}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://pollinator-hub/api/v1/parts/1/data';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
"https://pollinator-hub/api/v1/parts/1/data"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());
import requests
import json
url = 'https://pollinator-hub/api/v1/parts/1/data'
headers = {
'Authorization': 'Bearer {YOUR_AUTH_KEY}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Example response (204):
Empty response
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.