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
sjc4062
Frequent Visitor

API- Get Last Refresh of all reports of a workspace

I am looking to develop a solution to alert me when any report does not automatically refresh overnight. 

The powerbi rest API seems to be the easiest way to accomplish this

 

I can get a full list of all the reports in my workspace using this: 

Get https://api.powerbi.com/v1.0/myorg/groups/GROUP_ID/datasets

 

which returns something like this:

{
"id": "ID",
"name": "Call Dashboard",
"addRowsAPIEnabled": false,
"configuredBy": "EMAILadress",
"isRefreshable": true,
"isEffectiveIdentityRequired": false,
"isEffectiveIdentityRolesRequired": false,
"isOnPremGatewayRequired": true
},

 

Which gives me a complete list of all the reports but doesnt include the last refresh date

 

Now if i use something like this:

Get https://api.powerbi.com/v1.0/myorg/groups/Group_ID/datasets/DATA_SET_ID/refreshes/?$top=1

 

It gives me:

{
"id": ID,
"refreshType": "Scheduled",
"startTime": "2018-04-18T04:00:31.857Z",
"endTime": "2018-04-18T04:08:49.203Z",
"status": "Completed"
}

 

So basically my question is how can i combine those to return a full list of all reports including the last refresh of each one.

Searched through the google as well as this site but couldn't find any direction 

1 ACCEPTED SOLUTION
v-micsh-msft
Employee
Employee

A possible workaorund that I could think out is:

Generate an App to use the Power BI Embedded API to get the Reports and the Report refresh details, then create a customer connector under Microsoft Flow, combine the results into an HTML table, after that, send an email with Microsoft Flow to notify the daily changes.

Adding some reference for you:

Register an Azure AD app to embed Power BI content

Custom connector in Microsoft Flow

Run Flow on a Schedule

 

Regards,

Michael

 

View solution in original post

2 REPLIES 2
Glovecm16_
Regular Visitor

Hi,

I hope this message finds you well.

I have a favor to ask – could you assist me in grasping this topic a bit better? I'm having difficulty comprehending how to retrieve all the reports along with their respective last refresh dates within the workspace.

Thank you!

v-micsh-msft
Employee
Employee

A possible workaorund that I could think out is:

Generate an App to use the Power BI Embedded API to get the Reports and the Report refresh details, then create a customer connector under Microsoft Flow, combine the results into an HTML table, after that, send an email with Microsoft Flow to notify the daily changes.

Adding some reference for you:

Register an Azure AD app to embed Power BI content

Custom connector in Microsoft Flow

Run Flow on a Schedule

 

Regards,

Michael

 

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.

Top Kudoed Authors