FabricTools v0.33.0 Public Preview

Get-FabricDatasetRefreshHistory

Retrieves the refresh history of a Power BI dataset.

Syntax

Parameter set: DatasetInMyWorkspace (Default)
Get-FabricDatasetRefreshHistory -DatasetId <guid> [-Top <int>] [<CommonParameters>]
Parameter set: DatasetInWorkspace
Get-FabricDatasetRefreshHistory -DatasetId <guid> -WorkspaceId <guid> [-Top <int>]
 [<CommonParameters>]
Parameter set: Workspace
Get-FabricDatasetRefreshHistory -WorkspaceId <guid> [-Top <int>] [<CommonParameters>]

Description

Calls the Power BI REST API to retrieve refresh history for a dataset or all datasets in a workspace. When GroupId is supplied the request targets the dataset inside a specific workspace (groups/{groupId}/datasets/{datasetId}/refreshes); otherwise it targets the dataset in My Workspace (datasets/{datasetId}/refreshes).

Examples

Example 1

Retrieves the refresh history for a dataset in My Workspace.

Get-FabricDatasetRefreshHistory -DatasetId "12345678-90ab-cdef-1234-567890abcdef"

Example 2

Retrieves the last 10 refresh history entries for a dataset in a specific workspace.

Get-FabricDatasetRefreshHistory `
    -DatasetId "12345678-90ab-cdef-1234-567890abcdef" `
    -WorkspaceId "abcdef12-3456-7890-abcd-ef1234567890" `
    -Top 10

Example 3

Retrieves the latest refresh for every dataset in a workspace.

Get-FabricDatasetRefreshHistory -WorkspaceId "abcdef12-3456-7890-abcd-ef1234567890" -Top 1

Parameters

NameTypeReq.Pos.PipelineDescription
-DatasetId guid ✓Required Named –

The unique identifier of the dataset whose refresh history to retrieve. Omit this parameter with WorkspaceId to retrieve refresh history for every dataset in the workspace.

-WorkspaceIdalias: GroupId guid ✓Required Named –

The unique identifier of the workspace that contains the dataset(s). When omitted, the My Workspace endpoint is used and DatasetId is required.

-Top int Named –

(Optional) The number of refresh history entries to return. Must be at least 1. When omitted, the Power BI API default of up to 60 entries is returned.

Default: 0

This cmdlet also supports the common parameters, such as -Verbose and -ErrorAction. See about_CommonParameters.

Notes

  • Requires a valid Power BI / Fabric token (call Connect-FabricAccount first).
  • Calls Confirm-TokenState to ensure token validity before making the API request.
  • OneDrive refresh history is not returned by the Power BI API.
  • The API retains at most 60 entries; entries older than 3 days are pruned once more than 20 exist.

Author: Kamil Nowinski