Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi, I am facing an issue while trying to change Report parameter values on power bi service using api request call using the syntax provided in the power bi documentation.
The query that I am sending using python is as below
dest = 'https://api.powerbi.com/v1.0/myorg/groups/' + self.group_id + '/datasets/' + self.dataset_id + '/Default.UpdateParameters'
headers = {'Authorization': 'Bearer ' + self.access_token}
data = {"updateDetails": [{"name": "ScenarioID","newValue": "110"},{"name":"ChildID","newValue":"13"}]}
Param = requests.post(dest, data=data, headers=headers)
Which is giving me below response
{'error': {'code': 'InvalidRequest',
'message': 'Dataset Parameters list is invalid in DatasetID. Reason: Invalid parameter update details',
'target': 'DatasetID'}}
I am unable to understand how to resolve this I have parameters defined as
Required box ticked.
Type Decimal Number (I have tried it with text type as well)
suggested values: any
Current Value 108
Please help!
Try this:
dest = 'https://api.powerbi.com/v1.0/myorg/groups/' + self.group_id + '/datasets/' + self.dataset_id + '/Default.UpdateParameters'
body= {
"updateDetails": [
{
"name": "DataBase",
"newValue": "myDB"
},
{
"name": "Server",
"newValue": "123.456.789"
}
]
}
header = {'Content-Type': 'application/json'
,'Authorization': f'Bearer {tokenPBI}', 'Accept': 'text/plain'}
requests.post(dest,
data=json.dumps(body),
headers=header
)
Regards
It seems quite a trivial problem but I am unable to figure out the solution.
Please help as it is quite important for my client.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 1 |
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 3 |