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.
The catalogue
Every dataset: title, description, themes, formats, service
curl '/data/search.json'
Publishers (CKAN organization_list format)
Themes (CKAN group_list format)
A dataset’s metadata (CKAN package_show format): guichets distribution sacs
Governance report: freshness, schemas, licences and personal data per dataset, per service and per organisation
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
curl '/data/tables/0256ac56-7995-4bea-bf40-0a7308514f84.json'
The whole table as CSV
A table with geometries as GeoJSON: guichets distribution sacs
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 (RDF/XML)
Catalogue (JSON-LD)
Datasets of the Communauté urbaine and the Ville de Dunkerque (RDF/XML): what data.gouv.fr would harvest
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.
| File in this demo | CKAN | Call on the CKAN service |
|---|---|---|
| /data/search.json | package_search | /api/3/action/package_search?q=…&fq=groups:finances |
| /data/datasets/<name>.json | package_show | /api/3/action/package_show?id=<name> |
| /data/organizations.json | organization_list | /api/3/action/organization_list?all_fields=true |
| /data/groups.json | group_list | /api/3/action/group_list?all_fields=true |
| /data/tables/<id>.json | datastore_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, .jsonld | ckanext-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.