Forum Discussion
Cha74910
Jan 04, 2023Copper Contributor
API to change the name of a dataflow
Hello, I would like to be able to change the name of a dataflow using this API: https://learn.microsoft.com/en-us/rest/api/power-bi/dataflows/update-dataflow Here is my code: $body=@{
...
AndySvints
Jan 06, 2023Steel Contributor
Hello Cha74910,
It looks like that error that you are receiving is related to the Body parameter.
Body parameter of Invoke-PowerBIRestMethod is Type of String and you are passing a HashTable into it.
Try something like this:
Invoke-PowerBIRestMethod -Url "https://api.powerbi.com/v1.0/myorg/groups/8569358a-549c-466a-894c-de113f5c4fb1/dataflows/8774dad3-3f17-4444-b73b-b82cea0812b6" -Method Patch -Body $($body | ConvertTo-Json)
Hope that helps.