Delen via


Datasets - Get Refresh History In Group

Returns the refresh history for the specified dataset from the specified workspace.

Permissions

This API call can be called by a service principal profile. For more information see: Service principal profiles in Power BI Embedded.

Required Scope

Dataset.ReadWrite.All or Dataset.Read.All

Limitations

OneDrive refresh history isn't returned.

GET https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/refreshes
GET https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/refreshes?$top={$top}

URI Parameters

Name In Required Type Description
datasetId
path True

string

The dataset ID

groupId
path True

string

uuid

The workspace ID

$top
query

integer

The requested number of entries in the refresh history. If not provided, the default is the last available 60 entries.

Responses

Name Type Description
200 OK

Refreshes

OK

Examples

Completed refresh example
Failed refresh example
In-progress refresh example

Completed refresh example

Sample request

GET https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/refreshes?$top=1

Sample response

{
  "value": [
    {
      "refreshType": "ViaApi",
      "startTime": "2017-06-13T09:25:43.153Z",
      "endTime": "2017-06-13T09:31:43.153Z",
      "status": "Completed",
      "requestId": "9399bb89-25d1-44f8-8576-136d7e9014b1",
      "refreshAttempts": [
        {
          "attemptId": 1,
          "startTime": "2017-06-13T09:25:43.153Z",
          "endTime": "2017-06-13T09:31:40.153Z",
          "type": "Data"
        },
        {
          "attemptId": 1,
          "startTime": "2017-06-13T09:31:40.156Z",
          "endTime": "2017-06-13T09:31:43.153Z",
          "type": "Query"
        }
      ]
    }
  ]
}

Failed refresh example

Sample request

GET https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/refreshes?$top=1

Sample response

{
  "value": [
    {
      "refreshType": "ViaApi",
      "startTime": "2017-06-13T09:25:43.153Z",
      "endTime": "2017-06-13T09:31:43.153Z",
      "serviceExceptionJson": "{\"errorCode\":\"ModelRefreshFailed_CredentialsNotSpecified\"}",
      "status": "Failed",
      "requestId": "11bf290a-346b-48b7-8973-c5df149337ff",
      "refreshAttempts": [
        {
          "attemptId": 1,
          "startTime": "2017-06-13T09:25:43.153Z",
          "endTime": "2017-06-13T09:31:43.153Z",
          "serviceExceptionJson": "{\"errorCode\":\"ModelRefreshFailed_CredentialsNotSpecified\"}",
          "type": "Data"
        }
      ]
    }
  ]
}

In-progress refresh example

Sample request

GET https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/refreshes?$top=1

Sample response

{
  "value": [
    {
      "refreshType": "ViaApi",
      "startTime": "2017-06-13T09:25:43.153Z",
      "status": "Unknown",
      "requestId": "9399bb89-25d1-44f8-8576-136d7e9014b1"
    }
  ]
}

Definitions

Name Description
Refresh

A Power BI refresh history entry

RefreshAttempt

Power BI automatically makes multiple attempts to refresh a dataset if it experiences a refresh failure. This object contains information about each refresh attempt.

RefreshAttemptType

The type of refresh attempt.

Refreshes

The OData response wrapper for a Power BI refresh history list

RefreshType

The type of refresh request

Refresh

A Power BI refresh history entry

Name Type Description
endTime

string

The end date and time of the refresh (may be empty if a refresh is in progress)

refreshAttempts

RefreshAttempt[]

The refresh attempt list.

refreshType

RefreshType

The type of refresh request

requestId

string

The identifier of the refresh request. Provide this identifier in all service requests.

serviceExceptionJson

string

Failure error code in JSON format (empty if no error)

startTime

string

The start date and time of the refresh

status

string

  • Unknown if the completion state is unknown or a refresh is in progress.
  • Completed for a successfully completed refresh.
  • Failed for an unsuccessful refresh (serviceExceptionJson will contain the error code).
  • Disabled if the refresh is disabled by a selective refresh.

RefreshAttempt

Power BI automatically makes multiple attempts to refresh a dataset if it experiences a refresh failure. This object contains information about each refresh attempt.

Name Type Description
attemptId

integer

The index of the refresh attempt.

endTime

string

The end date and time of the refresh attempt. The value is void if the refresh attempt is in progress.

serviceExceptionJson

string

Failure error code in JSON format. Void if there's no error.

startTime

string

The start date and time of the refresh attempt.

type

RefreshAttemptType

The type of refresh attempt.

RefreshAttemptType

The type of refresh attempt.

Name Type Description
Data

string

The refresh attempt to load data into the dataset.

Query

string

The attempt to refresh premium query caches and dashboard tiles.u

Refreshes

The OData response wrapper for a Power BI refresh history list

Name Type Description
odata.context

string

value

Refresh[]

The refresh history list

RefreshType

The type of refresh request

Name Type Description
OnDemand

string

The refresh was triggered interactively through the Power BI portal

OnDemandTraining

string

The refresh was triggered interactively through the Power BI portal with automatic aggregations training

Scheduled

string

The refresh was triggered by a dataset refresh schedule setting

ViaApi

string

The refresh was triggered by an API call

ViaEnhancedApi

string

The refresh was triggered by an enhanced refresh REST API call

ViaXmlaEndpoint

string

The refresh was triggered through Power BI public XMLA endpoint