Skip to content

We will be performing updates to data.govt.nz on Thursday 12 Jun between 10am and 3pm . During this time, you may experience issues accessing the site.

You can continue to use catalogue.data.govt.nz to search for datasets. If there are any concerns please contact info@data.govt.nz.

Export an agencies datasets into sub-folders including any hosted or referenced data files and a json file with metadata.

Requirements

Steps

  1. Make sure you have the CKANAPI CLI tool installed
  2. Make sure you have the jq and tr tools installed
  3. Run the command below replacing the properties in UPPERCASE with your own values.
ckanapi dump datasets $(ckanapi -r CKAN_URL action package_search q=organization:AGENCY_ID | jq .results[].name | tr -d '"') -r CKAN_URL -D PATH_TO_FILES

Top