Skip to content

We will be performing scheduled maintenance on catalogue.data.govt.nz on Tuesday, 18 November, between 10:00 AM and 11:00 AM (NZDT).

During this time, you may experience intermittent issues accessing the site. We apologise for any inconvenience this may cause and appreciate your understanding.

If you have any questions or concerns, please contact us at info@data.govt.nz.

Thank you for your patience and support.

The data.govt.nz Team

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