Skip to content

canvas api get

canvas api get

Make a read-only GET request to Canvas

Synopsis

Make a raw GET request to any Canvas API endpoint.

A GET-only sibling of "canvas api": it never mutates state, so it is exposed to read-only MCP clients (it carries the readOnlyHint annotation). For other verbs, use "canvas api ".

Examples:

# List all courses
canvas api get /api/v1/courses

# Search users with query parameters
canvas api get /api/v1/users -q "search_term=john" -q "per_page=50"

# Follow pagination
canvas api get /api/v1/courses --paginate
canvas api get <PATH> [flags]

Options

  -H, --header stringArray   Custom headers (key:value, repeatable)
  -h, --help                 help for get
      --paginate             Follow pagination links
  -q, --query stringArray    Query parameters (key=value, repeatable)
      --raw                  Output raw response without formatting
      --show-headers         Include response headers in output

Options inherited from parent commands

      --as-user int       Masquerade as another user (admin feature, requires permission)
      --columns strings   Select specific columns to display (comma-separated)
      --config string     config file (default is $HOME/.canvas-cli/config.yaml)
      --dry-run           Print curl commands instead of executing requests
      --filter string     Filter results by text (case-insensitive substring match)
      --instance string   Canvas instance URL (overrides config)
      --limit int         Limit number of results for list operations (0 = unlimited)
      --no-cache          Disable caching of API responses
  -o, --output string     Output format: table, json, yaml, csv (default "table")
      --quiet             Suppress informational messages, only output data and errors
      --show-token        Show actual token in dry-run output (default: redacted)
      --sort string       Sort results by field (prefix with - for descending, e.g., -name)
  -v, --verbose           Enable verbose output

SEE ALSO

Auto generated by spf13/cobra on 6-Aug-2026