Imports - Post Import In Group
Creates new content on the specified workspace from PBIX (Power BI Desktop), JSON, XLSX (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 an RDL file, in the DatasetDisplayName property, include .rdl to define the file type.
- 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. This is supported only for workspaces on premium capacity.
- To create a dataflow from a model.json, specify the parameter datasetDisplayName as described below.
Limitations
Post import is not supported for dataflows with service principal.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 |
---|---|---|---|---|
group
|
path | True |
|
The workspace id |
dataset
|
query | True |
|
The display name of the dataset should include file extension. Not supported when importing from OneDrive for Business. For importing or creating dataflows, this parameter should be hardcoded to model.json. |
name
|
query |
Determines what to do if a dataset with the same name already exists. Default value is 'Ignore'. |
||
skip
|
query |
|
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 |
|
The OneDrive for Business .xlsx file path to import, can be absolute or relative. .pbix files are not supported. |
fileUrl |
|
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
Import dataflow model. |
Post import example |
Post import skip report example |
Import dataflow model.json example
Sample Request
POST https://api.powerbi.com/v1.0/myorg/groups/cfafbeb1-8037-4d0c-896e-a46fb27ff229/imports?datasetDisplayName=model.json&nameConflict=Abort&skipReport=True
{
"value": "--f05e5244-f876-43b9-bc87-d71598f6b32a Content-Disposition: form-data name=model.json; filename=model.json Content-Type: application/json [Contents of Model JSON Encoded] --f05e5244-f876-43b9-bc87-d71598f6b32a--"
}
Sample Response
{
"id": "d02b8896-e247-4d83-ae5a-014028cb0665"
}
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
connection |
The import connection type for OneDrive for Business file |
Dataset |
A Power BI dataset |
Datasource |
Datasource usage |
Dependent |
A Power BI Dependent dataflow |
Encryption |
Encryption information for a dataset |
Encryption |
Dataset encryption status |
Endorsement |
Power BI endorsement details |
Import |
The import object |
Import |
Determines what to do if a dataset with the same name already exists. Default value is 'Ignore'. |
Import |
The information about the import |
Report |
A Power BI report |
Sensitivity |
Artifact sensitivity label info |
connectionType
The import connection type for OneDrive for Business file
Name | Type | Description |
---|---|---|
connect |
|
|
import |
|
Dataset
A Power BI dataset
Name | Type | Description |
---|---|---|
ContentProviderType |
|
The content provider type for the dataset |
CreateReportEmbedURL |
|
The dataset create report embed url |
CreatedDate |
|
DateTime of creation of this dataset |
Encryption |
The dataset encryption information (Only applicable when $expand is specified) |
|
IsEffectiveIdentityRequired |
|
Whether the dataset requires an effective identity. This indicates that you must send an effective identity using the GenerateToken API. |
IsEffectiveIdentityRolesRequired |
|
Whether RLS is defined inside the PBIX file. This indicates that you must specify a role. |
IsOnPremGatewayRequired |
|
Dataset requires an On-premises Data Gateway |
IsRefreshable |
|
Can this dataset be refreshed |
QnaEmbedURL |
|
The dataset qna embed url |
addRowsAPIEnabled |
|
Whether the dataset allows adding new rows |
configuredBy |
|
The dataset owner |
datasourceUsages |
Datasource usages |
|
description |
|
The dataset description |
endorsementDetails |
The dataset endorsement details |
|
id |
|
The dataset id |
name |
|
The dataset name |
sensitivityLabel |
The dataset sensitivity label |
|
upstreamDataflows |
Upstream Dataflows |
|
webUrl |
|
The dataset web url |
DatasourceUsage
Datasource usage
Name | Type | Description |
---|---|---|
datasourceInstanceId |
|
The datasource instance ID |
DependentDataflow
A Power BI Dependent dataflow
Name | Type | Description |
---|---|---|
groupId |
|
The target group id |
targetDataflowId |
|
The target dataflow id |
Encryption
Encryption information for a dataset
Name | Type | Description |
---|---|---|
EncryptionStatus |
Dataset encryption status |
EncryptionStatus
Dataset encryption status
Name | Type | Description |
---|---|---|
InSyncWithWorkspace |
|
Encryption is supported and is in sync with the encryption settings |
NotInSyncWithWorkspace |
|
Encryption is supported and not in sync with the encryption settings |
NotSupported |
|
Encryption is not supported for this dataset |
Unknown |
|
Unable to determine state due to dataset corruption |
EndorsementDetails
Power BI endorsement details
Name | Type | Description |
---|---|---|
certifiedBy |
|
The user that certified the artifact |
endorsement |
|
The endorsement status |
Import
The import object
Name | Type | Description |
---|---|---|
createdDateTime |
|
Import creation time |
datasets |
|
The datasets associated with this import |
id |
|
The import id |
importState |
|
The import upload state |
name |
|
The import name |
reports |
|
The reports associated with this import |
updatedDateTime |
|
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.
Only Abort and GenerateUniqueName are supported with dataflow model.json files.
Name | Type | Description |
---|---|---|
Abort |
|
If dataset or dataflow with the same name already exists, Import operation will be aborted. |
CreateOrOverwrite |
|
If dataset with the same name already exists, Import operation will replace the existing dataset with the new one. |
GenerateUniqueName |
|
If a dataflow with the same name already exists, Import operation will generate a new unique name for the dataflow. |
Ignore |
|
If dataset with the same name already exists, Import operation will create a new dataset with the same name. |
Overwrite |
|
If dataset with the same name already exists, Import operation will replace the existing dataset with the new one. |
ImportInfo
The information about the import
Name | Type | Description |
---|---|---|
connectionType |
The import connection type for OneDrive for Business file |
|
filePath |
|
The OneDrive for Business .xlsx file path to import, can be absolute or relative. .pbix files are not supported. |
fileUrl |
|
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 |
---|---|---|
createdBy |
|
The report owner |
createdDateTime |
|
The report created date time. |
datasetId |
|
The dataset id |
description |
|
The report description |
embedUrl |
|
The report embed url |
endorsementDetails |
The report endorsement details |
|
id |
|
The report id |
modifiedBy |
|
The user that modified this report |
modifiedDateTime |
|
The report modified date time. |
name |
|
The report name |
reportType |
enum:
|
The report type |
sensitivityLabel |
The report sensitivity label |
|
webUrl |
|
The report web url |
SensitivityLabel
Artifact sensitivity label info
Name | Type | Description |
---|---|---|
labelId |
|
The sensitivity label ID |