Unable to delete PDP policy in a dataset using API
Hi,
I'm new to using APIs to interact with DOMO PDP policies, so I've follow instructions
1/ Create a client in
2/ Install pydomo Python package
3/ Run Python code
from pydomo import Domo
from pydomo.datasets import Policy, PolicyFilter, FilterOperator, PolicyType, Sorting
domo = Domo(client_id,secret,api_host='api.domo.com')
domo.datasets.delete_pdp(dataset_id, policy_id)
(where dataset_id is my DOMO dataset_id, and policy_id is the integer policy_id)
However I got this error
/.venv/lib/python3.9/site-packages/pydomo/DomoAPIClient.py", line 70, in _delete
raise Exception("Error deleting " + obj_desc + ": "
Exception: Error deleting Personalized Data Policy (PDP): {"status":400,"statusReason":"Bad Request","message":"Cannot delete the open filter group","toe":"BHCEJD2786-AU5EM-SK5TR"}
Have anyone faced this issue and how to fix it? Thank you.
Answers
-
Are you attempting to delete the all rows policy? What is the filter logic for your PDP you’re removing?
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1 -
Hi I've figured out the issue when I print all policies in that dataset.
The command domo.datasets.delete_pdp(dataset_id, policy_id) didn't run because the policy_id I put in is the one that has null filter value (in DOMO PDP web interface, it shows as "All Rows")
I tried other policy_id which is specific for a user so the delete command worked.
0 -
Is there any way to bulk delete all policies for a dataset instead of using domo.datasets.delete_pdp(dataset_id, policy_id)?
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 738 Beast Mode
- 56 App Studio
- 40 Variables
- 684 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 46 Workflows
- 10 DomoAI
- 35 Predict
- 14 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 123 Manage
- 120 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive