π 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.
- π Full CKAN API reference: Action API
- π Full DataStore API reference: DataStore API
βοΈ 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
π Finding Resource and Package IDs
- Go to any dataset page on CanWINβs CKAN site.
- Under Data and Resources, click on a resource.
- Scroll to Additional Information β look for Resource id and Package id.
These IDs are required for DataStore queries.