Datopian demonstration, not an official website of the Communauté urbaine de Dunkerque

API and developers

This demo is a static site: the catalogue, every table and the metadata are published as files, in CKAN and DCAT-AP formats. No key, open CORS.

In production the catalogue runs on CKAN: the same data is served by CKAN’s standard Action API, with search, filters and SQL over the tables; existing CKAN clients and the data.gouv.fr harvester work unchanged.

docs.ckan.org/en/2.11/api

The catalogue

Every dataset: title, description, themes, formats, service

/data/search.json
curl
curl '/data/search.json'

Publishers (CKAN organization_list format)

/data/organizations.json

Themes (CKAN group_list format)

/data/groups.json

A dataset’s metadata (CKAN package_show format): guichets distribution sacs

/data/datasets/guichets-distribution-sacs.json

Governance report: freshness, schemas, licences and personal data per dataset, per service and per organisation

/data/quality.json

The tables

Every table is a JSON file (CKAN DataStore format: columns then rows), a CSV and, with geometries, a GeoJSON. Example: guichets distribution sacs

The whole table as JSON

/data/tables/0256ac56-7995-4bea-bf40-0a7308514f84.json
curl
curl '/data/tables/0256ac56-7995-4bea-bf40-0a7308514f84.json'

A table with geometries as GeoJSON: guichets distribution sacs

/data/tables/0256ac56-7995-4bea-bf40-0a7308514f84.geojson

DCAT-AP

This demo’s datasets in DCAT-AP 3 (ckanext-dcat), with EU frequency and licence URIs and high-value dataset categories. Every dataset page also gives its own DCAT record.

Catalogue (Turtle)

/catalog.ttl
curl
curl '/catalog.ttl'

Catalogue (RDF/XML)

/catalog.xml

Catalogue (JSON-LD)

/catalog.jsonld

Datasets of the Communauté urbaine and the Ville de Dunkerque (RDF/XML): what data.gouv.fr would harvest

/catalog-cud-ville.xml

The old address of the data.dunkerque-agglo.fr DCAT export redirects here.

/api/explore/v2.1/catalog/exports/dcat

Old export addresses

Géo2France harvests all 174 datasets every day through the Explore API export addresses. For the 71 datasets in this demo they redirect to its copies (CSV and GeoJSON with the same content; the JSON is in CKAN DataStore format); for the others, to the current portal:

/api/explore/v2.1/catalog/datasets/guichets-distribution-sacs/exports/csv
/api/explore/v2.1/catalog/datasets/guichets-distribution-sacs/exports/json
/api/explore/v2.1/catalog/datasets/guichets-distribution-sacs/exports/geojson

The static files and the CKAN API

Every file of this demo stands for a CKAN call; on the CKAN service the calls also take filters, paging and SQL.

The static files and the CKAN API
File in this demoCKANCall on the CKAN service
/data/search.jsonpackage_search/api/3/action/package_search?q=…&fq=groups:finances
/data/datasets/<name>.jsonpackage_show/api/3/action/package_show?id=<name>
/data/organizations.jsonorganization_list/api/3/action/organization_list?all_fields=true
/data/groups.jsongroup_list/api/3/action/group_list?all_fields=true
/data/tables/<id>.jsondatastore_search/api/3/action/datastore_search?resource_id=<id>&filters={…}&q=…
—datastore_search_sql/api/3/action/datastore_search_sql?sql=SELECT … FROM "<id>"
/data/tables/<id>.csv/datastore/dump/datastore/dump/<id>?format=csv|json|tsv|xlsx
/catalog.ttl, .xml, .jsonldckanext-dcat/catalog.ttl?fq=organization:communaute-urbaine-de-dunkerque

Read with no key and no quota. In production, writing (publishing, updating) uses one CKAN API token per service.