Skip to content

πŸš€ Introduction to the CKAN API

The CanWIN site is powered by CKAN, an open-source data management system used by governments, agencies, NGOs, and citizen science projects.

The CKAN API allows you to programmatically explore, query, and manage datasets in CanWIN. The DataStore API extends this functionality to structured data (like CSV tables), enabling filtering, sorting, and direct row-level queries.


🧩 CKAN vs DataStore

API Purpose Typical Use Case
CKAN API Access metadata, datasets, and packages List datasets, search by keyword
DataStore API Query structured tabular data Filter rows in a CSV resource

πŸ”— Endpoints

All API calls use the following format:

https://canwin-datahub.ad.umanitoba.ca/data/api/3/action/<action_function>

  • A full list of the different CKAN API action functions can be found here.

  • A full list of the DataStore action functions can be found here.

CKAN API Example
https://canwin-datahub.ad.umanitoba.ca/data/api/3/action/package_list
DataStore API Example
https://canwin-datahub.ad.umanitoba.ca/data/api/3/action/datastore_search

βš™οΈ Parameters

Parameters refine your API requests. They are added to the endpoint using ? and separated with &.

Parameter Applies to Description Example
q CKAN, DataStore Query string for search q=fish
resource_id DataStore Unique ID of a resource (table) resource_id=c5c16064-e2b3-4618-9b27-0dbf5c1388c2
Search Examples
https://canwin-datahub.ad.umanitoba.ca/data/api/3/action/package_search?q=fish
https://canwin-datahub.ad.umanitoba.ca/data/api/3/action/datastore_search?resource_id=c5c16064-e2b3-4618-9b27-0dbf5c1388c2&q=fish

πŸ†” Finding Resource and Package IDs

  1. Go to any dataset page on CanWIN’s CKAN site.
  2. Under Data and Resources, click on a resource.
  3. Scroll to Additional Information β†’ look for Resource id and Package id.

These IDs are required for DataStore queries.