The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi
I am using this API to get execution details
https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/refreshes/{refreshId}
but the response return following message:
{"error":{"code":"MethodNotAllowed","message":"Operation failed - Refresh details unavailable. Dataset ID 86f3b49a-2ed0-451d-9a6b-35ed4b9a2397 Refresh ID a697c8f7-6a56-4954-be5f-5a4b86213a69 RefreshType is Scheduled."}}
I entered "requestId" as {refreshId} in the API, what did I miss in this API call?
Thanks
Wangzhen
Solved! Go to Solution.
Hi, @wangzhen
Make sure you have the correct groupId and datasetId. you can list all groups and datasets to verify these IDs
GET https://api.powerbi.com/v1.0/myorg/groups
GET https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets
Make sure you have the correct refreshId. you can use the following API to get a list of refreshes for the dataset:
GET https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/refreshes
Make sure your application has the necessary permissions: Dataset.ReadWrite.All
Dataset.Read.All
Here is the correct usage of manual refresh:
GET https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/refreshes/{refreshId}
If you need more information about scheduled refreshes, consider: triggering a manual refresh:
POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/refreshes
Use to set a new historical record:
GET https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/refreshes
By following these steps, you should be able to retrieve refresh execution details using the Power BI REST API.
hackcrr
If this post helps, then please consider Accept it as the solution and kudos to this post to help the other members find it more quickly
Hello ,
I saw this topic because I am also facing the same error.
I wanted to share more info that may be helps you.
If the refresh id done "Via API" and not "VIA Enhanced API" you will always get the 405 error.
it is mentionned also in the documentation here :
I hope this helps.
Insaf
Hi, @wangzhen
Make sure you have the correct groupId and datasetId. you can list all groups and datasets to verify these IDs
GET https://api.powerbi.com/v1.0/myorg/groups
GET https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets
Make sure you have the correct refreshId. you can use the following API to get a list of refreshes for the dataset:
GET https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/refreshes
Make sure your application has the necessary permissions: Dataset.ReadWrite.All
Dataset.Read.All
Here is the correct usage of manual refresh:
GET https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/refreshes/{refreshId}
If you need more information about scheduled refreshes, consider: triggering a manual refresh:
POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/refreshes
Use to set a new historical record:
GET https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/refreshes
By following these steps, you should be able to retrieve refresh execution details using the Power BI REST API.
hackcrr
If this post helps, then please consider Accept it as the solution and kudos to this post to help the other members find it more quickly