Programatically update/delete cards
I have a python script which I use in conjuntion with the DomoStats Activity Log, Python SDK, to classify cards that are abandoned or otherwise need to be deleted. In our instance, this is close to 1000 cards. I do not see a way to interact with cards at the API level. Additionally, I am trying to rename the cards that we are keeping to fit a standardized naming format and autofill in the description field.
I really do not want to manually do this for all of these cards. Is there a way to programmatically achieve this?
Best Answers
-
Have you investigated the CLI tool? If you have the list of cards you want deleted, the CLI should do the trick.
I think you would need to reach out to your Customer Success Manager to get the install file. Ask them for the Command Line Interface tool.
______________________________________________________________________________________________
“There is a superhero in all of us, we just need the courage to put on the cape.” -Superman
______________________________________________________________________________________________0 -
Hi @user09644
As for using the pydomo SDK it doesn't expose the APIs for cards at this time. As such they're not supported. As @ST_-Superman-_ mentioned you could attempt to utilize the Java CLI and the 'delete-card' command. You might want to also use the 'backup-card' command first in case you accidentally remove a card you wanted to keep. There's also a 'rename-card' command to rename cards.
You can create a script of commands to run via the CLI and pass it in as parameter so you don't have to run it multiple times.
java -jar domoUtil.jar -e "path_to_file.txt"
You can download the CLI tool from Admin -> Tool Downloads in your instance.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0
Answers
-
Thanks for the comments. I'm trying to authenticate into the Domo CLI. I am able to successfully do it in my developer sandbox instance, but can not in the production version of Domo. I am a major-domo and not an admin. Is there anything special that I need to do to authenticate if my org uses SSO? For the test case authenticating into the developer sandbox I issued and used a token.
0 -
You need a Token for authentication which, depending on your permissions you or an Admin would need to create on your production environment.
Note that the CLI will authenticate as the user who created the token
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
Got it - I was following along in the documentation and the first example made it seem like I could connect without a token. Thanks!
Example
connect -u [email protected] -p abc123 -s xyzcompany.domo.com
0 -
For clarification for others who might read this thread.
Username and password authentication with the CLI isn't an option with Single Sign On (SSO) as you're not authenticating with Domo but rather your own system. If you used direct sign on then username and password authentication is an option.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1
Categories
- 11K All Categories
- 5 Private Company Board
- 2 APAC User Group
- 12 Welcome
- 42 Domo News
- 9.9K Using Domo
- 2K Dataflows
- 2.5K Card Building
- 2.2K Ideas Exchange
- 1.2K Connectors
- 349 Workbench
- 267 Domo Best Practices
- 12 Domo Certification
- 474 Domo Developer
- 51 Domo Everywhere
- 110 Apps
- 726 New to Domo
- 85 Dojo
- Domopalooza
- 1.1K 日本支部
- 4 道場-日本支部へようこそ
- 29 お知らせ
- 65 Kowaza
- 302 仲間に相談
- 664 ひらめき共有