Announcing DAP CLI 2.0 – New Features, Better Usability, and a New Foundation

sgergely
Instructure
Instructure
0
2175

Canvas.png

We’re excited to release the data access platform (DAP) command line interface (CLI) referred to as DAP CLI 2.0.  For developers and data engineers that access data from Canvas Data, this is a major version update that introduces new functionality, improves usability, and lays the groundwork for better support and transparency. This release includes breaking changes, so please review the updates carefully before upgrading.

🔧 1. Logging & Debugging Options

Understanding and debugging your DAP CLI workflows just got easier. In version 2.0, we’re introducing configurable logging:

  • Set the log level:
dap --loglevel debug initdb --namespace canvas --table accounts
  • Write logs to a file:
dap --logfile dap.log syncdb --namespace canvas --table accounts
  • Use JSON log format for structured logging:
dap --logformat json syncdb --namespace canvas --table accounts

In JSON format, logs include additional metadata such as namespace, table, and clientId, making it easier to filter and analyze logs in observability platforms like Splunk, Observe, or Datadog.

🧠 2. Improved CLI Output for Accessibility

We’ve redesigned stdout messaging to provide cleaner, more actionable feedback to users. This update supports accessibility efforts and reduces the learning curve for new users by improving the clarity and structure of command-line output. We're also rewriting the help and manual pages to be more helpful and actionable, with links to our web-based documentation for easy access to detailed guides. In addition, error messages are being revised to make them easier to understand and provide clearer next steps.

Screenshot 2025-07-02 at 21.47.44.png

📊 4. Usage Tracking with Opt-Out Support

To help us improve the CLI experience and guide product decisions, we’re introducing anonymous usage tracking. We’ll collect limited metadata such as:

  • DAP CLI version
  • Python version
  • Operating system (and WSL detection)
  • Database flavor and version
  • CLI commands used (e.g., initdb, syncdb, snapshot)
  • Namespace and table(s)
  • Whether the CLI or library is used

Tracking is enabled by default but can be disabled in two ways:

  • Use the --no-tracking flag
  • Set the environment variable to any of the values: DAP_TRACKING=false/0/no/off

Tracking is fully transparent—events are recorded in a separate file so users can audit what’s being captured. Tracking is only triggered if there is a network request is sent, so just by reading a manual tracking is not triggered. Source code can be downloaded and the tracking can be checked in this file:

instructure_dap_client-2.0.0/dap/tracking.py

⚠️ Breaking Change Notice

Because of these changes, DAP CLI 2.0 is not backwards-compatible with previous configurations or logging expectations. Please review the updated documentation before upgrading and test the new version in a development environment.

📦 How to Upgrade

Install the new version using pip:

pip install -U instructure-dap-client

Thank you for helping us make DAP CLI better with your feedback and ideas. If you encounter any issues or have suggestions join the conversation in the Canvas Community forums.