Extension GBIF API Connector


Extension Basics

Title
GBIF API Connector
Name
ckanext-gbif
Type
Public extension
Description
A CKAN extension that connects with the GBIF API. Retrieves additional data like DQIs from GBIF for records with associated GBIF IDs.
CKAN versions
Download-Url (zip)
Last commit
9 months ago (2025-06-09 12:15:23)
Url to repo
Category
Standards Compliance


Background Infos

Description (long)
Show details

ckanext-gbif

A CKAN extension that connects with the GBIF API.

Overview

This extension retrieves additional data (e.g. DQIs) from the GBIF API for a record with an associated GBIF ID.

This extension also provides some templates for displaying these data.

Installation

Installing from PyPI

pip install ckanext-gbif

Installing from source

  1. Clone the repository into the src folder:

    cd $INSTALL_FOLDER/src
    git clone https://github.com/NaturalHistoryMuseum/ckanext-gbif.git
    
  2. Activate the virtual env:

    . $INSTALL_FOLDER/bin/activate
    
  3. Install via pip:

    pip install $INSTALL_FOLDER/src/ckanext-gbif
    

Post-install setup

  1. Add ‘gbif’ to the list of plugins in your config:

    ckan.plugins = ... gbif
    
  2. Install lessc globally:

    npm install -g "less@~4.1"
    

Configuration

Template variables [REQUIRED]

Option Description
ckanext.gbif.organisation_key For linking to the dataset publisher (https://gbif.org/publisher/ORG_KEY)
ckanext.gbif.dataset_key For linking to the dataset itself (https://gbif.org/dataset/DATA_KEY)

Usage

Actions

gbif_record_show

Get the associated GBIF data for a record.

from ckan.plugins import toolkit

gbif_record = toolkit.get_action(u'gbif_record_show')(context, {
    u'occurrence_id': record_gbif_occurrence_id
})

Templates

The templates inherit from record/specimen.html and record/dwc.html and will insert a link to the GBIF view in the content_primary_nav block.

Version
2.1.12
Version release date
2025-06-09
Contact name
Natural History Museum
Contakt email
(not set)
Contact Url


Installation Guide

Configuration hints

Requires lessc (npm install -g less@~4.1). Requires GBIF organisation_key and dataset_key configuration.

Plugins to configure (ckan.ini)
gbif
CKAN Settings (ckan.ini)
# ckanext.gbif.organisation_key = <GBIF organisation key>
# ckanext.gbif.dataset_key = <GBIF dataset key>
DB migration to be executed
(not set)
<< back to Extensions