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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

unable to refresh Dataflow using REST API

HI,

 

I want to try refresh Dataflow using API and it shows an error like write error

Script:-Invoke-PowerBIRestMethod -Url 'dataflows/XYZ/refreshes'-Method Post -Body ('XYZ') but it shows Below Error

Mohit_Kumawat_0-1652864894144.png

@dm-p 

@lbendlin Suggest me 

 

try this Link Also

 

 

 

 

 

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

HI @Anonymous,

I think you missed the required parameters in your requests so they are send failed.

Dataflows - Refresh Dataflow - REST API (Power BI Power BI REST APIs) | Microsoft Docs

As the document said, it required the URL parameter(dataflowId, groupId) and body parameter(notifyOption) which you did not provide.

Sample code: please replace the {} part with your group and dataflow id.

$Body ="{'notifyOption'='MailOnFailure'}"
Invoke-PowerBIRestMethod -Url 'groups/{groupId}/dataflows/{dataflowId}/refreshes' -Method Post -Body $Body

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

2 REPLIES 2
Anonymous
Not applicable

Hi, 

 

Thanks for Your Update,

 

according to the above sample code We replace the {} part with your group and dataflow id Still We have Same Error 

Mohit_Kumawat_0-1656322639580.png

 

Kindly Let me know if any permission is Required from Tenant Side and if there is any how can we Allow this.

 

 

v-shex-msft
Community Support
Community Support

HI @Anonymous,

I think you missed the required parameters in your requests so they are send failed.

Dataflows - Refresh Dataflow - REST API (Power BI Power BI REST APIs) | Microsoft Docs

As the document said, it required the URL parameter(dataflowId, groupId) and body parameter(notifyOption) which you did not provide.

Sample code: please replace the {} part with your group and dataflow id.

$Body ="{'notifyOption'='MailOnFailure'}"
Invoke-PowerBIRestMethod -Url 'groups/{groupId}/dataflows/{dataflowId}/refreshes' -Method Post -Body $Body

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.