Datasets

Operations

Bind To Gateway

Binds the specified dataset from My workspace to the specified gateway, optionally with a given set of data source IDs. If you don’t supply a specific data source ID, the dataset will be bound to the first matching data source in the gateway.

Important

Add the API caller principal as a data source user on the gateway.

Required scope

Dataset.ReadWrite.All

Limitations

Only supports the on-premises data gateway

Bind To Gateway In Group

Binds the specified dataset from the specified workspace to the specified gateway, optionally with a given set of data source IDs. If you don’t supply a specific data source ID, the dataset will be bound to the first matching data source in the gateway.

Important

Add the API caller principal as a data source user on the gateway.

Required scope

Dataset.ReadWrite.All

Limitations

Only supports the on-premises data gateway

Delete Dataset

Deletes the specified dataset from My workspace.

Required scope

Dataset.ReadWrite.All

Delete Dataset In Group

Deletes the specified dataset from the specified workspace.

Required scope

Dataset.ReadWrite.All

Discover Gateways

Returns a list of gateways that the specified dataset from My workspace can be bound to.

This API call is only relevant to datasets that have at least one on-premises connection. For datasets with cloud-only connections, this API call returns an empty list.

Required scope

Dataset.Read.All

Discover Gateways In Group

Returns a list of gateways that the specified dataset from the specified workspace can be bound to.

This API call is only relevant to datasets that have at least one on-premises connection. For datasets with cloud-only connections, this API call returns an empty list.

Required scope

Dataset.Read.All

Execute Queries

Executes Data Analysis Expressions (DAX) queries against the provided dataset (Preview). The dataset must reside in My workspace or another new workspace experience workspace.

DAX query errors will result in:

  • A response error, such as DAX query failure.
  • A failure HTTP status code (400).

A query that requests more than one table, or more than 100,000 table rows, will result in:

  • Limited data being returned.
  • A response error, such as More than one result table in a query or More than 100k rows in a query result.
  • A successful HTTP status code (200).

Columns that are fully qualified in the query will be returned with a fully qualified name, for example, MyTable[MyColumn]. Columns that are renamed or created in the query will be returned within square bracket, for example, [MyNewColumn].

Permissions

The user must have Manage dataset access permissions.

Required scope

Dataset.ReadWrite.All or Dataset.Read.All

Limitations

  • Only datasets in a new workspace experience workspace, that is to say a V2 workspace, are supported.
  • Datasets that are hosted in Azure Analysis Services or that have a live connection to an on-premises Azure Analysis Services model aren't supported.
  • The tenant setting Allow XMLA endpoints and Analyze in Excel with on-premises datasets must be enabled.
  • One query per API call.
  • One table request per query.
  • Maximum of 100,000 table rows per query.
  • Service Principals are not supported for datasets with RLS per RLS limitations and user impersonation is not supported.
Get Dataset

Returns the specified dataset from My workspace.

Required scope

Dataset.ReadWrite.All or Dataset.Read.All

Get Dataset In Group

Returns the specified dataset from the specified workspace.

Required scope

Dataset.ReadWrite.All or Dataset.Read.All

Get Datasets

Returns a list of datasets from My workspace.

Required scope

Dataset.ReadWrite.All or Dataset.Read.All

Get Datasets In Group

Returns a list of datasets from the specified workspace.

Required scope

Dataset.ReadWrite.All or Dataset.Read.All

Get Dataset To Dataflows Links In Group

Returns a list of upstream dataflows for datasets from the specified workspace.

Required scope

Dataset.ReadWrite.All or Dataset.Read.All

Get Datasources

Returns a list of data sources for the specified dataset from My workspace.

Required scope

Dataset.ReadWrite.All or Dataset.Read.All

Get Datasources In Group

Returns a list of data sources for the specified dataset from the specified workspace.

Required scope

Dataset.ReadWrite.All or Dataset.Read.All

Get Direct Query Refresh Schedule

Returns the refresh schedule for a specified DirectQuery or LiveConnection dataset from My workspace.

Required scope

Dataset.ReadWrite.All or Dataset.Read.All

Get Direct Query Refresh Schedule In Group

Returns the refresh schedule for a specified DirectQuery or LiveConnection dataset from the specified workspace.

Required scope

Dataset.ReadWrite.All or Dataset.Read.All

Get Gateway Datasources

Returns a list of gateway data sources for the specified dataset from My workspace.

Important

This API is deprecated, use Get Datasources instead.

Required scope

Dataset.ReadWrite.All or Dataset.Read.All

Get Gateway Datasources In Group

Returns a list of gateway data sources for the specified dataset from the specified workspace.

Important

This API is deprecated, use Get Datasources In Group instead.

Required scope

Dataset.ReadWrite.All or Dataset.Read.All

Get Parameters

Returns a list of parameters for the specified dataset from My workspace.

Required scope

Dataset.ReadWrite.All

Limitations

Datasets with SQL, Oracle, Teradata, and SAP HANA DirectQuery connections aren't supported.

Get Parameters In Group

Returns a list of parameters for the specified dataset from the specified workspace.

Required scope

Dataset.ReadWrite.All

Limitations

Datasets with SQL, Oracle, Teradata, and SAP HANA DirectQuery connections aren't supported.

Get Refresh History

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

Required scope

Dataset.ReadWrite.All or Dataset.Read.All

Limitations

OneDrive refresh history isn't returned.

Get Refresh History In Group

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

Required scope

Dataset.ReadWrite.All or Dataset.Read.All

Limitations

OneDrive refresh history isn't returned.

Get Refresh Schedule

Returns the refresh schedule for the specified dataset from My workspace.

Required scope

Dataset.ReadWrite.All or Dataset.Read.All

Get Refresh Schedule In Group

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

Required scope

Dataset.ReadWrite.All or Dataset.Read.All

Post Dataset User

Grants the specified user the specified permissions to the specified dataset from My workspace.

When user permissions to a dataset have been recently updated, the new permissions might not be immediately available through API calls. To refresh user permissions, use the Refresh User Permissions API call.

Required scope

Dataset.ReadWrite.All

Limitations

  • Only datasets in a new workspace experience workspace, that is to say a V2 workspace, are supported.
  • This API only supports adding permissions to principals who don't have permissions to the dataset. It cannot be used to change existing dataset permissions.
  • Adding permissions to service principals (app principalType) is not supported
Post Dataset User In Group

Grants the specified user the specified permissions to the specified dataset.

When user permissions to a dataset have been recently updated, the new permissions might not be immediately available through API calls. To refresh user permissions, use the Refresh User Permissions API call.

Required scope

Dataset.ReadWrite.All

Limitations

  • Only datasets in a new workspace experience workspace, that is to say a V2 workspace, are supported.
  • This API only supports adding permissions to principals who don't have permissions to the dataset. It cannot be used to change existing dataset permissions.
  • Adding permissions to service principals (app principalType) is not supported
Refresh Dataset

Triggers a refresh for the specified dataset from My workspace.

Required scope

Dataset.ReadWrite.All

Limitations

  • For Shared capacities, a maximum of eight requests per day, which includes refreshes executed using a scheduled refresh.
  • For Premium capacities, the maximum requests per day is only limited by the available resources in the capacity. If available resources are overloaded, refreshes are throttled until the load is reduced. The refresh will fail if throttling exceeds 1 hour.
Refresh Dataset In Group

Triggers a refresh for the specified dataset from the specified workspace.

Required scope

Dataset.ReadWrite.All

Limitations

  • For Shared capacities, a maximum of eight requests per day, which includes refreshes executed using a scheduled refresh.
  • For Premium capacities, the maximum requests per day is only limited by the available resources in the capacity. If available resources are overloaded, refreshes are throttled until the load is reduced. The refresh will fail if throttling exceeds 1 hour.
Set All Dataset Connections

Updates all connections for the specified dataset from My workspace. This API only supports SQL DirectQuery datasets.

Important

This API call is deprecated and no longer supported. This API call isn't compatible with enhanced dataset metadata.

Instead use:

Required scope

Dataset.ReadWrite.All

Set All Dataset Connections In Group

Updates all connections for the specified dataset from the specified workspace. This API only supports SQL DirectQuery datasets.

Important

This API call is deprecated and no longer supported. This API call isn't compatible with enhanced dataset metadata.

Instead use:

Required scope

Dataset.ReadWrite.All

Limitations

Supports SQL DirectQuery datasets.

Take Over In Group

Transfers ownership over the specified dataset to the current authorized user.

Required scope

Dataset.ReadWrite.All

Update Datasources

Updates the data sources of the specified dataset from My workspace.

Note

We recommend using enhanced dataset metadata with this API call.

Important

  • The original data source and the new data source must have the exact same schema.
  • If you're using enhanced dataset metadata, refresh the dataset to get data from the new data sources.
  • If you're not using enhanced dataset metadata, wait 30 minutes for the update data sources operation to complete, and then refresh the dataset.

Permissions

The user must be the dataset owner.

Limitations

  • Datasets created using the public XMLA endpoint aren't supported. To make changes to those data sources, the admin must use the Azure Analysis Services client library for Tabular Object Model.
  • Only these data sources are supported: SQL Server, Azure SQL Server, Azure Analysis Services, Azure Synapse, OData, SharePoint, Teradata, and SAP HANA. For other data sources, use the Update Parameters API call.
  • Changing the data source type isn't supported.
  • Data sources that contain parameters in the connection string aren't supported.
  • Updating data sources that are part of merged or joined tables is only supported if you're using enhanced dataset metadata.
  • For an Advanced Query that references multiple data sources, only the first data source will be updated. To overcome this limitation, define the data source as a parameter and use the Update Parameters API call.

Required scope

Dataset.ReadWrite.All

Update Datasources In Group

Updates the data sources of the specified dataset from the specified workspace.

Note

We recommend using enhanced dataset metadata with this API call.

Important

  • The original data source and the new data source must have the exact same schema.
  • If you're using enhanced dataset metadata, refresh the dataset to get data from the new data sources.
  • If you're not using enhanced dataset metadata, wait 30 minutes for the update data sources operation to complete, and then refresh the dataset.

Permissions

The user must be the dataset owner.

Limitations

  • Datasets created using the public XMLA endpoint aren't supported. To make changes to those data sources, the admin must use the Azure Analysis Services client library for Tabular Object Model.
  • Only these data sources are supported: SQL Server, Azure SQL Server, Azure Analysis Services, Azure Synapse, OData, SharePoint, Teradata, and SAP HANA. For other data sources, use the Update Parameters In Group API call.
  • Changing the data source type isn't supported.
  • Data sources that contain parameters in the connection string aren't supported.
  • Updating data sources that are part of merged or joined tables is only supported if you're using enhanced dataset metadata.
  • For an Advanced Query that reference multiple data sources, only the first data source will be updated. To overcome this limitation, define the data source as a parameter and use the Update Parameters In Group API call.

Required scope

Dataset.ReadWrite.All

Update Direct Query Refresh Schedule

Updates the refresh schedule for a specified DirectQuery or LiveConnection dataset from My workspace.

A request should contain either a set of days and times or a valid frequency, but not both. If you choose a set of days without specifying any times, then Power BI will use a default single time per day. Setting the frequency will automatically overwrite the days and times setting.

Permissions

The user must be the dataset owner.

Required scope

Dataset.ReadWrite.All

Update Direct Query Refresh Schedule In Group

Updates the refresh schedule for a specified DirectQuery or LiveConnection dataset from the specified workspace.

A request should contain either a set of days and times or a valid frequency, but not both. If you choose a set of days without specifying any times, then Power BI will use a default single time per day. Setting the frequency will automatically overwrite the days and times setting.

Permissions

The user must be the dataset owner.

Required scope

Dataset.ReadWrite.All

Update Parameters

Updates the parameters values for the specified dataset from My workspace.

Note

We recommend using enhanced dataset metadata with this API call.

Important

  • If you're using enhanced dataset metadata, refresh the dataset to apply the new parameter values.
  • If you're not using enhanced dataset metadata, wait 30 minutes for the update data sources operation to complete, and then refresh the dataset.

Permissions

The user must be the dataset owner.

Required scope

Dataset.ReadWrite.All

Limitations

  • Datasets created using the public XMLA endpoint aren't supported. To make changes to those data sources, the admin must use the Azure Analysis Services client library for Tabular Object Model.
  • DirectQuery connections are only supported with enhanced dataset metadata.
  • Datasets with Azure Analysis Services live connections aren't supported.
  • Maximum of 100 parameters per request.
  • All specified parameters must exist in the dataset.
  • Parameters values should be of the expected type.
  • The parameter list cannot be empty or include duplicate parameters.
  • Parameters names are case-sensitive.
  • Parameter IsRequired must have a non-empty value.
  • The parameter types Any and Binary cannot be updated.
Update Parameters In Group

Updates the parameters values for the specified dataset from the specified workspace.

Note

We recommend using enhanced dataset metadata with this API call.

Important

  • If you're using enhanced dataset metadata, refresh the dataset to apply the new parameter values.
  • If you're not using enhanced dataset metadata, wait 30 minutes for the update data sources operation to complete, and then refresh the dataset.

Permissions

The user must be the dataset owner.

Required scope

Dataset.ReadWrite.All

Limitations

  • Datasets created using the public XMLA endpoint aren't supported. To make changes to those data sources, the admin must use the Azure Analysis Services client library for Tabular Object Model.
  • DirectQuery connections are only supported with enhanced dataset metadata.
  • Datasets with Azure Analysis Services live connections aren't supported.
  • Maximum of 100 parameters per request.
  • All specified parameters must exist in the dataset.
  • Parameters values should be of the expected type.
  • The parameter list cannot be empty or include duplicate parameters.
  • Parameters names are case-sensitive.
  • Parameter IsRequired must have a non-empty value.
  • The parameter types Any and Binary cannot be updated.
Update Refresh Schedule

Updates the refresh schedule for the specified dataset from My workspace.

A request that disables the refresh schedule should contain no other changes.

At least one day must be specified. If no times are specified, then Power BI will use a default single time per day.

Permissions

The user must be the dataset owner.

Required scope

Dataset.ReadWrite.All

Limitations

The limit on the number of time slots per day depends on whether a Premium or Shared capacity is used.

Update Refresh Schedule In Group

Updates the refresh schedule for the specified dataset from the specified workspace.

A request that disables the refresh schedule should contain no other changes.

At least one day must be specified. If no times are specified, then Power BI will use a default single time per day.

Permissions

The user must be the dataset owner.

Required scope

Dataset.ReadWrite.All

Limitations

The limit on the number of time slots per day depends on whether a Premium or Shared capacity is used.