Proof of concept by Datopian · not an official City of Jersey City website · data from the City's open data portal and ArcGIS Online

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:

docs.ckan.org/en/2.11/api

The catalogue

Every dataset: title, description, department, topics, formats

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

Departments (CKAN organization_list format)

/data/organizations.json

Topics (CKAN group_list format)

/data/groups.json

One dataset's metadata (CKAN package_show format)

/data/datasets/rent-controlled-properties.json

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

/data/tables/9edb9a7d-76c9-4633-bc2a-5d278c9c4a8c.json
curl
curl '/data/tables/9edb9a7d-76c9-4633-bc2a-5d278c9c4a8c.json'

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.

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:…
/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