Forum Discussion

wangzhen's avatar
wangzhen
Regular Visitor
2 years ago
Solved

API - Get Refresh Execution Details In Group not working

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

  • 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

2 Replies

  • hackcrr's avatar
    hackcrr
    Icon for Memorable Member rankMemorable Member

    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

  • insafM's avatar
    insafM
    Frequent Visitor

    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