Jae Wilson @DataCrew

Query Domo Jupyter using Python 3 of 4 || recursive functions

September 14, 2023

When the API returns what it has, not what you need — and how to bridge that gap with recursive Python.

Domo Jupyter's content API returns only the items at the path you specify. If your target file lives inside a subfolder, it simply won't appear in the response. The API isn't broken; it's just literal. The fix lives entirely in your library code.

Why It Matters

Without recursive traversal, any content search against Domo Jupyter is shallow by default — you'll miss files nested inside folders, and your queries silently return incomplete results. This matters especially as workspaces grow and teams organize content into folder hierarchies. More broadly, this video surfaces a design principle that applies across API wrapper development: distinguishing between what the API does and what callers actually expect it to do, then owning that gap explicitly in your library layer.

What You'll Learn

  • Recognize the behavioral gap between a raw API response and a caller's reasonable expectations
  • Build a recursive Python function that traverses Domo Jupyter folders and subfolders
  • Decide when recursive behavior belongs on a class method versus a standalone utility function
  • Apply the factory design pattern to keep routes responsible only for API interaction
  • Compose authentication, request construction, and response handling as separate concerns