How to implement commands from the Command Line Interface Tool in Python, specifically api requests

Question: Is it possible to execute command line interface tool operations within Python, specifically the 'list-dataflow' command?
Elaboration: The 'list-dataflow' command in the command line interface tool returns JSON structured metadata for a dataflow. My guess is that this command is just making a GET request to a DOMO api. If that is right, then what url and headers are used to make the request?
I need to implement getting this json data programmatically within Python. I am looking for something like the api that is available for datasets, except for dataflows. For example, you can make a GET request to the url 'https://api.domo.com/v1/datasets/<dataset_id>' with the headers {'Accept': 'application/json', 'Authorization': 'bearer <access_token>'}, and the api returns JSON structured metadata for the dataset with the specified dataset_id. Is there a similar functionality available for dataflows?
I have not seen anything about this functionality or a dataflow api in DOMO's documentation or in the Python library 'pydomo'.
Answers
-
@walker_page when you run a command via the Java cli it prints to screen which API it's hitting. If it's just sending a POST request, then recreating the request in python should be pretty straight forward.
Jae Wilson
Check out my π₯ Domo Training YouTube Channel π¨βπ»
**Say "Thanks" by clicking the β€οΈ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0 -
@jaeW_at_Onyx , thanks for your response. I have noticed it printing api info when I run the 'connect' command to connect to my company's instance, but no api info is printed when running the list-dataflow command.
0 -
those may be private APIs.
you can monitor network traffic from Chrome to see which APIs the browser is hitting. And you can watch the youtube video i linked to see how you authenticate against Domo.
leveraging private APIs is not something Domo supports, so you have to sleuth a bit.
There may be some wizards in the Domo User Group that have done it befroe.
Jae Wilson
Check out my π₯ Domo Training YouTube Channel π¨βπ»
**Say "Thanks" by clicking the β€οΈ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"1 -
Also as a warning private APIs aren't supported by Domo so you're using those at your own risk as they could change without warning and cause issues or break your script.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1
Categories
- All Categories
- 2K Product Ideas
- 2K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 311 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3.8K Transform
- 656 Datasets
- 115 SQL DataFlows
- 2.2K Magic ETL
- 811 Beast Mode
- 3.3K Visualize
- 2.5K Charting
- 80 App Studio
- 45 Variables
- 771 Automate
- 190 Apps
- 481 APIs & Domo Developer
- 77 Workflows
- 23 Code Engine
- 36 AI and Machine Learning
- 19 AI Chat
- AI Playground
- AI Projects and Models
- 17 Jupyter Workspaces
- 410 Distribute
- 120 Domo Everywhere
- 280 Scheduled Reports
- 10 Software Integrations
- 142 Manage
- 138 Governance & Security
- 8 Domo Community Gallery
- 48 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 114 Community Announcements
- 4.8K Archive