powerbipowerbi-desktopazure-logic-apps

logic apps, refresh a dataset of power bi


when i created a logic app to refresh a dataset of power bi, and i have the pro license, i get the error "UnsupportedMediaType" i already delete the cache before upload the report to power bi platform, also i create other bi report but with this report i dont have problems to refresh the data, and i dont' have problems to export to pdf but yes for refresh help:

this is the error outputs:

Status 415; { "Cache-Control": "no-store, must-revalidate, no-cache", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Frame-Options": "DENY", "X-Content-Type-Options": "nosniff", "RequestId": "9c92f41e-f6cd-47ed-920f-85d4e8de350e", "Access-Control-Expose-Headers": "RequestId", "Timing-Allow-Origin": "*", "x-ms-apihub-cached-response": "false", "x-ms-apihub-obo": "false", "Date": "Sun, 01 Sep 2024 12:21:10 GMT", "Content-Length": "142", "Content-Type": "application/json" } Body: { "error": { "code": "InvalidRequest", "message": "Invalid dataset. This API can only be called on a Model-based dataset" } }

i want create a pipeline to refresh a dataset and send by email the pdf report, so you can tell me how i can solve it


Solution

  • The dataset refresh API doesn't support DirectQuery mode dataset (or Live Connection) because the reports in DQ mode gets the latest data everytime you want to query it, so no need for a refresh.

    https://community.fabric.microsoft.com/t5/Service/Need-some-input-for-quot-This-API-can-only-be-called-on-a-Model/m-p/256615

    https://community.fabric.microsoft.com/t5/Service/Trying-to-get-refresh-history-from-API-This-API-can-only-be/m-p/3060287