MENU navbar-image

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://app.pollinatorhub.eu/api/v1/entities" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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):



 

Request   

GET api/v1/entities

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

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://app.pollinatorhub.eu/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\": 8,
    \"country_id\": \"IT\",
    \"type\": \"legal-entity\"
}"
$client = new \GuzzleHttp\Client();
$url = 'https://app.pollinatorhub.eu/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' => 8,
            'country_id' => 'IT',
            'type' => 'legal-entity',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.pollinatorhub.eu/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": 8,
    "country_id": "IT",
    "type": "legal-entity"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json

url = 'https://app.pollinatorhub.eu/api/v1/entities'
payload = {
    "name": "European Food Safety Authority",
    "abbreviation": "EFSA",
    "description": "No-example",
    "user_id": 8,
    "country_id": "IT",
    "type": "legal-entity"
}
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):


{}
 

Request   

POST api/v1/entities

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

A descriptive name of the entity. Must not be greater than 250 characters. Must be at least 8 characters. Example: European Food Safety Authority

abbreviation   string   

Abbreviation or short name of the entity. Must not be greater than 50 characters. Must be at least 3 characters. Example: EFSA

address   string  optional  

Full address of the entity. It is not required for private persons. This field is required unless registry_number is in null. Must not be greater than 15000000 characters. Must be at least 10 characters.

registry_number   string  optional  

A public unique identifier used to identify a legal entity. Can be empty for private persons. Must not be greater than 20 characters. Must be at least 5 characters.

description   string   

A longer description about the entity. Accepts Markdown for styling. Must not be greater than 16777215 characters. Must be at least 10 characters. Example: No-example

user_id   integer   

Example: 8

country_id   string   

A two-letter code that represents a country name, recommended as general purpose code. Must be 2 characters. Example: IT

Must be one of:
contact   object  optional  

A list of contact points for the entity.

type   string   

Example: legal-entity

Must be one of:
  • person
  • legal-entity

Show Entity

requires authentication

Display the specified Entity.

Example request:
curl --request GET \
    --get "https://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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"
}
 

Request   

GET api/v1/entities/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The unique identifier used to identify the Entity within the platform. Example: 3

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://app.pollinatorhub.eu/api/v1/entities/eum" \
    --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\",
    \"contact\": [
        {
            \"type\": \"email\",
            \"value\": \"example@pollinatorhub.eu\"
        }
    ]
}"
$client = new \GuzzleHttp\Client();
$url = 'https://app.pollinatorhub.eu/api/v1/entities/eum';
$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',
            'contact' => [
                [
                    'type' => 'email',
                    'value' => 'example@pollinatorhub.eu',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://app.pollinatorhub.eu/api/v1/entities/eum"
);

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",
    "contact": [
        {
            "type": "email",
            "value": "example@pollinatorhub.eu"
        }
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json

url = 'https://app.pollinatorhub.eu/api/v1/entities/eum'
payload = {
    "name": "European Food Safety Authority",
    "abbreviation": "EFSA",
    "description": "No-example",
    "user_id": 0,
    "country_id": "IT",
    "contact": [
        {
            "type": "email",
            "value": "example@pollinatorhub.eu"
        }
    ]
}
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):


{}
 

Request   

PUT api/v1/entities/{id}

PATCH api/v1/entities/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the entity. Example: eum

uid   string   

The unique identifier used to identify the Entity within the platform. Example: euph

Body Parameters

name   string   

A descriptive name of the entity. Must not be greater than 250 characters. Must be at least 8 characters. Example: European Food Safety Authority

abbreviation   string   

Abbreviation or short name of the entity. Must not be greater than 50 characters. Must be at least 3 characters. Example: EFSA

address   string  optional  

Full address of the entity. It is not required for private persons. This field is required unless registry_number is in null. Must not be greater than 16777215 characters. Must be at least 10 characters.

registry_number   string  optional  

A public unique identifier used to identify a legal entity. Can be empty for private persons. Must not be greater than 20 characters. Must be at least 5 characters.

description   string   

A longer description about the entity. Accepts Markdown for styling. Must not be greater than 15000000 characters. Must be at least 10 characters. Example: No-example

user_id   integer   

Numeric identifier of a User. Example: 0

country_id   string   

A two-letter code that represents a country name, recommended as general purpose code. Must be 2 characters. Example: IT

Must be one of:
contact   object[]  optional  

A list of contact points for the entity.

type   string   

The type of the contact. Should be one of: email, url, phone, address, url-facebook, url-twitter, url-linkedin, url-youtube, url-vimeo. Example: email

value   string   

The actual value of the contact, for example email address, url or other. Example: example@pollinatorhub.eu

Delete Entity

requires authentication

Remove the specified Entity from storage.

Example request:
curl --request DELETE \
    "https://app.pollinatorhub.eu/api/v1/entities/possimus" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
$client = new \GuzzleHttp\Client();
$url = 'https://app.pollinatorhub.eu/api/v1/entities/possimus';
$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://app.pollinatorhub.eu/api/v1/entities/possimus"
);

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://app.pollinatorhub.eu/api/v1/entities/possimus'
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
 

Request   

DELETE api/v1/entities/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the entity. Example: possimus

uid   string   

The unique identifier used to identify the Entity within the platform. Example: euph

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://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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):



 

Request   

GET api/v1/datasets

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

entity   string  optional  

Filter datasets by Entity uid. Example: euph

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://app.pollinatorhub.eu/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\": \"ouzsjgmyeaylblvcbyxqqlfpehpjigwxwtbnagckmdzfqignyaojxiatjhucvbjmifcwby\",
    \"description\": \"Suscipit doloribus fugiat voluptas vero cupiditate quaerat neque.\",
    \"status\": \"pending\",
    \"public\": true,
    \"licence\": \"cc-by\",
    \"published_at\": \"2023-07-04T11:24:58.000000Z\"
}"
$client = new \GuzzleHttp\Client();
$url = 'https://app.pollinatorhub.eu/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' => 'ouzsjgmyeaylblvcbyxqqlfpehpjigwxwtbnagckmdzfqignyaojxiatjhucvbjmifcwby',
            'description' => 'Suscipit doloribus fugiat voluptas vero cupiditate quaerat neque.',
            '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://app.pollinatorhub.eu/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": "ouzsjgmyeaylblvcbyxqqlfpehpjigwxwtbnagckmdzfqignyaojxiatjhucvbjmifcwby",
    "description": "Suscipit doloribus fugiat voluptas vero cupiditate quaerat neque.",
    "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://app.pollinatorhub.eu/api/v1/datasets'
payload = {
    "entities": [
        "euph"
    ],
    "name": "ISO 3166-1:2020",
    "long_name": "ouzsjgmyeaylblvcbyxqqlfpehpjigwxwtbnagckmdzfqignyaojxiatjhucvbjmifcwby",
    "description": "Suscipit doloribus fugiat voluptas vero cupiditate quaerat neque.",
    "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):


{}
 

Request   

POST api/v1/datasets

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

entities   string[]   

The UID of of an related Entity.

name   string   

The name of the Dataset Part. Must not be greater than 100 characters. Must be at least 3 characters. Example: ISO 3166-1:2020

long_name   string   

The long version of the name of the dataset. Must not be greater than 256 characters. Must be at least 8 characters. Example: ouzsjgmyeaylblvcbyxqqlfpehpjigwxwtbnagckmdzfqignyaojxiatjhucvbjmifcwby

description   string   

A longer description about the Dataset Part. Accepts Markdown for styling. Must not be greater than 15000000 characters. Must be at least 10 characters. Example: Suscipit doloribus fugiat voluptas vero cupiditate quaerat neque.

status   string   

The status of the dataset. Example: pending

Must be one of:
  • draft
  • pending
public   boolean   

Setting this Dataset Part public attribute to true will make accessible to the public while setting it to false will make it only be used for processing. Example: true

licence   string   

The UID of the licence of this entity. Example: cc-by

Must be one of:
  • cc-by-4-0
  • cc-by-sa-4-0
  • cc-by-nd-4-0
  • cc-by-nc-4-0
  • cc-by-nc-sa-4-0
  • cc-by-nc-nd-4-0
  • cc0-1-0
  • eurostat
  • cc-by-nc-sa-3.0-igo
  • statcube
  • table-specific-licence
published_at   string   

The date this Dataset Part can be published on the platform. A null value is allowed, having no or unknown publishing date. Must be a valid date. Example: 2023-07-04T11:24:58.000000Z

Show Dataset

requires authentication

Display the specified Dataset.

Example request:
curl --request GET \
    --get "https://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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-04-05T17:46:43.000000Z"
    }
}
 

Request   

GET api/v1/datasets/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the dataset. Example: 1

uid   string   

The unique identifier used to identify the Dataset within the platform. Example: countries

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://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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):


{}
 

Request   

PUT api/v1/datasets/{id}

PATCH api/v1/datasets/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the dataset. Example: 1

uid   string   

The unique identifier used to identify the Dataset within the platform. Example: countries

Body Parameters

entities   string[]   

The UID of of an related Entity.

name   string   

The name of the Dataset Part. Must not be greater than 100 characters. Must be at least 3 characters. Example: ISO 3166-1:2020

long_name   string   

The long version of the name of the dataset. Must not be greater than 256 characters. Must be at least 8 characters. Example: No-example

description   string   

A longer description about the Dataset Part. Accepts Markdown for styling. Must not be greater than 15000000 characters. Must be at least 10 characters. Example: No-example

status   string   

The status of the dataset. Example: pending

Must be one of:
  • draft
  • pending
licence   string   

The UID of the licence of this entity. Example: cc-by

Must be one of:
  • cc-by-4-0
  • cc-by-sa-4-0
  • cc-by-nd-4-0
  • cc-by-nc-4-0
  • cc-by-nc-sa-4-0
  • cc-by-nc-nd-4-0
  • cc0-1-0
  • eurostat
  • cc-by-nc-sa-3.0-igo
  • statcube
  • table-specific-licence
public   boolean   

Setting this Dataset Part public attribute to true will make accessible to the public while setting it to false will make it only be used for processing. Example: true

published_at   string   

The date this Dataset Part can be published on the platform. A null value is allowed, having no or unknown publishing date. Must be a valid date. Example: 2023-07-04T11:24:58.000000Z

Delete Dataset

requires authentication

Remove the specified Dataset from storage.

Example request:
curl --request DELETE \
    "https://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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
 

Request   

DELETE api/v1/datasets/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the dataset. Example: 1

uid   string   

The unique identifier used to identify the Dataset within the platform. Example: countries

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://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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"
        }
    ]
}
 

Request   

GET api/v1/datasets/{dataset_id}/parts

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

dataset_id   integer   

The ID of the dataset. Example: 1

dataset_uid   string   

The UID of the dataset to display related parts of.

Create Dataset Part.

requires authentication

Store a Dataset Part in storage.

Example request:
curl --request POST \
    "https://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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-07-10T11:53:18.000000Z",
        "updated_at": "2024-07-10T11:53:18.000000Z"
    }
}
 

Request   

POST api/v1/datasets/{dataset_id}/parts

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

dataset_id   integer   

The ID of the dataset. Example: 1

Body Parameters

name   string   

The name of the Dataset Part. Must not be greater than 150 characters. Must be at least 8 characters. Example: ISO 3166-1:2020

description   string   

A longer description about the Dataset Part. Accepts Markdown for styling. Must not be greater than 15000000 characters. Must be at least 10 characters. Example: No-example

entities   string[]  optional  
type   string   

The type this Dataset Part represents. Use 'api' when uploading data via the API. The list of available types are: api ,remote ,file ,files. Example: api

Must be one of:
  • api
  • file
  • files
  • remote

Display the specified resource.

requires authentication

Example request:
curl --request GET \
    --get "https://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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"
    }
}
 

Request   

GET api/v1/parts/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The numeric identifier used to identify the Dataset Part within the platform. Example: 1

Update the specified resource in storage.

requires authentication

Example request:
curl --request PUT \
    "https://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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: *
 


 

Request   

PUT api/v1/parts/{id}

PATCH api/v1/parts/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The numeric identifier used to identify the Dataset Part within the platform. Example: 1

Body Parameters

entities   string[]  optional  

The UID of of an related Entity.

name   string   

The name of the Dataset Part. Must not be greater than 150 characters. Must be at least 3 characters. Example: ISO 3166-1:2020

description   string   

A longer description about the Dataset Part. Accepts Markdown for styling. Must not be greater than 15000000 characters. Must be at least 10 characters. Example: No-example

type   string   

The type this Dataset Part represents. Use 'api' when uploading data via the API. The list of available types are: api ,remote ,file ,files. Example: api

Must be one of:
  • file
  • files
  • remote
  • api

Remove the specified resource from storage.

requires authentication

Example request:
curl --request DELETE \
    "https://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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
 

Request   

DELETE api/v1/parts/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The numeric identifier used to identify the Dataset Part within the platform. Example: 1

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://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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,
                 },
                 ...
             ]
         },
         ...
     ]
}
 

Request   

GET api/v1/parts/{part_id}/data

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

part_id   integer   

The ID of the Dataset Part. Example: 1

Query Parameters

page   integer  optional  

Chose the number of the page. Default 1.

limit   integer  optional  

Chose the number of records to return per page (max 1000). Default 1000.

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.

Delete all Data

requires authentication

Removes all data related to this Dataset Part.

Example request:
curl --request DELETE \
    "https://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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://app.pollinatorhub.eu/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
 

Request   

DELETE api/v1/parts/{part_id}/data

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

part_id   integer   

The ID of the Dataset Part. Example: 1