Monitor releases
Check what StatCan tables were published on a given date, then pull only the updated vectors — patterns for daily data pipelines and dashboards.
StatCan publishes data on a fixed release calendar. If you're running a data pipeline or dashboard, you want to react to releases rather than polling every vector on every run. The WDS API provides two endpoints for this: one that returns tables released on a specific date, and one that returns series changed since the most recent release.
Check what was released on a date
getChangedCubeList(dateIso) returns all tables (cubes) that were published on the given date.
getChangedCubeList returns HTTP 404 or 409 on non-release dates. The client treats these as successful responses: result.status will be 'SUCCESS' and result.object will be a string message. Do not check the HTTP status code directly — check whether result.object is a string or an array.
Each item in the array includes:
Get series changed since the last release
getChangedSeriesList() takes no arguments and returns all vectors that changed in the most recent release, regardless of which date that was.
This is useful when you want to run a job immediately after a known release and don't need to filter by date.
Full pipeline: check today's releases and pull updated data
The pattern for a daily release-monitoring job:
Call getChangedCubeList with today's date. If result.object is a string, there's no release today — exit early.
Filter the returned cubes for the tables your pipeline cares about.
For each matching table, fetch updated data using the vector IDs you track.
Polling pattern for scheduled jobs
If you're running this as a cron job or scheduled function, structure the invocation so failures are visible and the job can be re-run safely:
StatCan's release calendar is published monthly. You can pre-load it and skip calling getChangedCubeList entirely on known non-release days, reducing unnecessary API calls. The release calendar is available at the Statistics Canada website under "Release dates."
Using getChangedSeriesDataFromVector for targeted updates
If you already know which vectors changed (from getChangedSeriesList) and want to retrieve only those data points that are new since the last release, use getChangedSeriesDataFromVector. This returns only the most recently released datapoints rather than the last N periods: