Imports - Post Import In Group

Creates new content on the specified workspace from .pbix, .json, Excel, Rdl, or file path in OneDrive for Business.

Required scope: Dataset.ReadWrite.All
To set the permissions scope, see Register an app.

Notes

  • To import a file, request Headers should include Content-Type: multipart/form-data with the file encoded as form data in the request body
  • To import from OneDrive for Business, request Headers should include Content-Type: application/json with ImportInfo in the request body.
  • To import large .pbix files between 1 GB and 10 GB see Create Temporary Upload Location In Group, supported only for workspaces on premium capacity.

POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/imports?datasetDisplayName={datasetDisplayName}
POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/imports?datasetDisplayName={datasetDisplayName}&nameConflict={nameConflict}&skipReport={skipReport}

URI Parameters

Name In Required Type Description
groupId
path True
  • string
uuid

The workspace id

datasetDisplayName
query True
  • string

The display name of the dataset should include file extension. Not supported when importing from OneDrive for Business.

nameConflict
query

Determines what to do if a dataset with the same name already exists. Default value is 'Ignore'.
Only Abort and Overwrite are supported with Rdl files.

skipReport
query
  • boolean

Determines whether to skip report import, if specified value must be 'true'. Only supported for PBIX files.

Request Body

Media Types: "application/json", "multipart/form-data"

Name Type Description
connectionType

The import connection type for OneDrive for Business file

filePath
  • string

The OneDrive for Business .xlsx file path to import, can be absolute or relative. .pbix files are not supported.

fileUrl
  • string

The shared access signature (SAS) url of the temporary blob storage, used to import large .pbix files between 1 GB and 10 GB

Responses

Name Type Description
200 OK

OK

202 Accepted

Accepted

Examples

Post import example
Post import skip report example

Post import example

Sample Request

POST https://api.powerbi.com/v1.0/myorg/groups/cfafbeb1-8037-4d0c-896e-a46fb27ff229/imports?datasetDisplayName=MyReport&nameConflict=Ignore
{
  "value": "--f05e5244-f876-43b9-bc87-d71598f6b32a Content-Disposition: form-data AA...ZZ --f05e5244-f876-43b9-bc87-d71598f6b32a--"
}

Sample Response

{
  "id": "d02b8896-e247-4d83-ae5a-014028cb0665"
}

Post import skip report example

Sample Request

POST https://api.powerbi.com/v1.0/myorg/groups/cfafbeb1-8037-4d0c-896e-a46fb27ff229/imports?datasetDisplayName=MyReport&nameConflict=Ignore&skipReport=True
{
  "value": "--f05e5244-f876-43b9-bc87-d71598f6b32a Content-Disposition: form-data AA...ZZ --f05e5244-f876-43b9-bc87-d71598f6b32a--"
}

Sample Response

{
  "id": "d02b8896-e247-4d83-ae5a-014028cb0665"
}

Definitions

connectionType

The import connection type for OneDrive for Business file

Dataset

A Power BI dataset

Encryption

Encryption information for a dataset

EncryptionStatus

Dataset encryption status

Import

The import object

ImportConflictHandlerMode

Determines what to do if a dataset with the same name already exists. Default value is 'Ignore'.
Only Abort and Overwrite are supported with Rdl files.

ImportInfo

The information about the import

Report

A Power BI report

connectionType

The import connection type for OneDrive for Business file

Name Type Description
connect
  • string
import
  • string

Dataset

A Power BI dataset

Name Type Description
Encryption

The dataset encryption information (Only applicable when $expand is specified)

IsEffectiveIdentityRequired
  • boolean

Dataset requires effective identity

IsEffectiveIdentityRolesRequired
  • boolean

Dataset requires roles

IsOnPremGatewayRequired
  • boolean

Dataset requires an On-premises Data Gateway

IsRefreshable
  • boolean

Can this dataset be refreshed

addRowsAPIEnabled
  • boolean

Whether dataset allows adding new rows

configuredBy
  • string

The dataset owner

id
  • string

The dataset id

name
  • string

The dataset name

webUrl
  • string

The dataset web url

Encryption

Encryption information for a dataset

Name Type Description
EncryptionStatus

Dataset encryption status

EncryptionStatus

Dataset encryption status

Name Type Description
InSyncWithWorkspace
  • string

Encryption is supported and is in sync with the encryption settings

NotInSyncWithWorkspace
  • string

Encryption is supported and not in sync with the encryption settings

NotSupported
  • string

Encryption is not supported for this dataset

Unknown
  • string

Unable to determine state due to dataset corruption

Import

The import object

Name Type Description
createdDateTime
  • string

Import creation time

datasets

The datasets associated with this import

id
  • string

The import id

importState
  • string

The import upload state

name
  • string

The import name

reports

The reports associated with this import

updatedDateTime
  • string

Import last update time

ImportConflictHandlerMode

Determines what to do if a dataset with the same name already exists. Default value is 'Ignore'.
Only Abort and Overwrite are supported with Rdl files.

Name Type Description
Abort
  • string

If dataset with the same name already exists, Import operation will be aborted.

CreateOrOverwrite
  • string

If dataset with the same name already exists, Import operation will replace the existing dataset with the new one.
Import operation will fail if there are more than one datasets with the same name.

Ignore
  • string

If dataset with the same name already exists, Import operation will create a new dataset with the same name.

Overwrite
  • string

If dataset with the same name already exists, Import operation will replace the existing dataset with the new one.
Import operation will fail if there is no conflict or if there are more than one datasets with the same name.

ImportInfo

The information about the import

Name Type Description
connectionType

The import connection type for OneDrive for Business file

filePath
  • string

The OneDrive for Business .xlsx file path to import, can be absolute or relative. .pbix files are not supported.

fileUrl
  • string

The shared access signature (SAS) url of the temporary blob storage, used to import large .pbix files between 1 GB and 10 GB

Report

A Power BI report

Name Type Description
datasetId
  • string

The dataset id

embedUrl
  • string

The report embed url

id
  • string

The report id

name
  • string

The report name

webUrl
  • string

The report web url