Demonstrator built by Datopian · not an official website of the Ville de Cannes · data from data.cannes.com and national public sources

API and developers

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

In service, the catalogue runs on CKAN: the same data comes from the standard CKAN Action API, with search, filters and SQL on the tables, so 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

One dataset's metadata (CKAN package_show format): Délibérations

/data/datasets/deliberations.json

Governance report: freshness, schemas and metadata per dataset and service

/data/quality.json

Tables

Each table is one JSON file (CKAN DataStore format: columns, then rows), one CSV and, with geometries, one GeoJSON. Example: Délibérations

The whole table as JSON

/data/tables/ecd9c5ef-0a4b-4e96-9f32-d581245ff327.json
curl
curl '/data/tables/ecd9c5ef-0a4b-4e96-9f32-d581245ff327.json'

A table with geometries as GeoJSON: Equipements publics cannois

/data/tables/143155fd-6074-47c9-b95a-dede97fb6b47.geojson

DCAT-AP

The whole catalogue in DCAT-AP 3 (ckanext-dcat), with EU frequency and licence URIs and high-value dataset categories. Each dataset page also links its own DCAT record.

Catalogue (Turtle)

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

Catalogue (RDF/XML)

/catalog.xml

Catalogue (JSON-LD)

/catalog.jsonld

Ville de Cannes datasets only (RDF/XML)

/catalog-ville-de-cannes.xml

The old data.cannes.com DCAT export address, which data.gouv.fr harvests daily, redirects here, so the harvest keeps working:

/api/explore/v2.1/catalog/exports/dcat/?where=…

Static files and the CKAN API

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

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:ville-de-cannes

Read-only access with no key. In service, writing (publishing, updating) needs a CKAN API token per service.