API
This demo is a static website: the catalogue and every table on it are also published as plain JSON files, in CKAN's formats. Anyone can read them; no key needed.
In the full service the catalogue runs on CKAN, and the same data comes from the standard CKAN Action API, with search, filters and SQL, so existing CKAN clients, harvesters and tools work unchanged. Reference:
The catalogue
Every dataset: title, description, department, topics, formats
curl '/data/search.json'
Departments (CKAN organization_list format)
Topics (CKAN group_list format)
One dataset's metadata (CKAN package_show format)
Tables
Each table copied into the catalogue is one JSON file (CKAN DataStore format: columns, then rows) and one CSV. Example: Rent-controlled properties
The whole table as JSON
curl '/data/tables/9edb9a7d-76c9-4633-bc2a-5d278c9c4a8c.json'
The whole table as CSV
ArcGIS layers
Map layers keep their ArcGIS REST endpoints. Each map layer's dataset page lists them in its API box, next to the dataset metadata.
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.
| File in this demo | CKAN | Call on the CKAN service |
|---|---|---|
| /data/search.json | package_search | /api/3/action/package_search?q=…&fq=groups:… |
| /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 |