Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Charline_74
Helper III
Helper III

API Dataflows - Update Dataflow

Hello, 

I am trying to set up this API:

https://learn.microsoft.com/en-us/rest/api/power-bi/dataflows/update-dataflow

In order to change the name of a dataflow.

My code: 

$body=@{
    updateDetails=@(
        @{
            name = "DTF TEST Pipeline 1.0.1"
        }
    )
}
Invoke-PowerBIRestMethod -Url "https://api.powerbi.com/v1.0/myorg/groups/4c2d4aa2-c195-4ecf-804a-be2afff547c6/dataflows/2ed4a772-827d-4d3b-87aa-6c0be92fc79f" -Method Patch -Body $body

But I have this error:

Invoke-PowerBIRestMethod : Une ou plusieurs erreurs se sont produites.
Au caractère Ligne:21 : 1
+ Invoke-PowerBIRestMethod -Url "https://api.powerbi.com/v1.0/myorg/gro ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (Microsoft.Power...werBIRestMethod:InvokePowerBIRestMethod) [Invoke-PowerBIRestMethod], AggregateException
    + FullyQualifiedErrorId : Une ou plusieurs erreurs se sont produites.,Microsoft.PowerBI.Commands.Profile.InvokePowerBIRestMethod
 
Invoke-PowerBIRestMethod : Encountered errors when invoking the command: {
  "code": "BadRequest",
  "message": "Bad Request",
  "details": [
    {
      "message": "Unexpected character encountered while parsing value: S. Path '', line 0, position 0.",
      "target": "dataflowUpdateInformation"
    }
  ]
}
Au caractère Ligne:21 : 1
+ Invoke-PowerBIRestMethod -Url "https://api.powerbi.com/v1.0/myorg/gro ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (Microsoft.Power...werBIRestMethod:InvokePowerBIRestMethod) [Invoke-PowerBIRestMethod], Exception
    + FullyQualifiedErrorId : Encountered errors when invoking the command: {
  "code": "BadRequest",
  "message": "Bad Request",
  "details": [
    {
      "message": "Unexpected character encountered while parsing value: S. Path '', line 0, position 0.",
      "target": "dataflowUpdateInformation"
    }
  ]
},Microsoft.PowerBI.Commands.Profile.InvokePowerBIRestMethod

Can you help me?

Thanks

Charline

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

HI @Charline_74,

According to the error message, it seems your request body part include unexpected characters, so these quests failed to be verified on sever side.

400 Bad Request - HTTP | MDN (mozilla.org)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

HI @Charline_74,

According to the error message, it seems your request body part include unexpected characters, so these quests failed to be verified on sever side.

400 Bad Request - HTTP | MDN (mozilla.org)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.