> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flexagon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# importContents

> Imports the provided contents to the target workspace. It supports of types: 1) embedded report, 2) shared semantic model and 3) reports pointing to a

Imports the provided contents to the target workspace. It supports of types: 1) embedded report, 2) shared semantic model and 3) reports pointing to a specific shared semantic model.

> [!NOTE]
>
> ***Both .pbix and PBIP structures are supported.***

# Target Properties

<table><colgroup><col /><col /><col /><col /></colgroup><tbody><tr><th>**Property Name**</th><th>**Property Code**</th><th>**Required**</th><th>**Description**</th></tr><tr><td>Azure Power BI Account</td><td>`FDPBI_ACCOUNT_CODE`</td><td>No</td><td>The account where we will import the files\
</td></tr><tr><td>Azure Power BI Workspace ID</td><td>`FDPBI_TGT_WORKSPACE_ID`</td><td>No\
</td><td>Workspace Id of the Power BI content</td></tr><tr><td>Azure Power BI Workspace Name</td><td>`FDPBI_TGT_WORKSPACE_NAME`</td><td>No</td><td>Workspace Name of the Power BI content. (Workspace Name is case-sensitive)</td></tr><tr><td>Import Status Timeout</td><td>`FDPBI_TGT_IMPORT_STATUS_TIMEOUT`</td><td>No</td><td>Timeout (in seconds) till when API will try to fetch the status of the import operation execution.Default: 1200 seconds</td></tr><tr><td>Use Default Script</td><td>`FDPBI_TGT_USE_DEFAULT_SCRIPT`</td><td>No</td><td>Check if you want to use the Default Script to export PBIP Files. (Keep it checked for Linux Endpoint)**@Since 9.0.0.3**</td></tr><tr><td>PowerShell Path</td><td>`FDPBI_TGT_PWSH_PATH`</td><td>No</td><td>PowerShell Path on the endpoint. (Only works with PowerShell 7 and above). Applicable when import PBIP files.**@Since 9.0.0.3**</td></tr></tbody></table>

> [!NOTE]
>
> For installing PowerShell on linux - [Install PowerShell on Linux - PowerShell | Microsoft Learn](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-linux?view=powershell-7.5)

# Project Properties

<table><colgroup><col /><col /><col /><col /></colgroup><tbody><tr><th>**Property Name**</th><th>**Property Code**</th><th>**Required**</th><th>**Description**</th></tr><tr><td>Power BI File Format</td><td>`FDPBI_FILE_FORMAT`</td><td>No</td><td>The File Format specifying the type of file to save. Drop down will show PBIX and PBIP. Default is PBIX. If the project is dealing with import of PBIP type files, please select accordingly.</td></tr></tbody></table>

# Inputs

<table><colgroup><col /><col /><col /><col /></colgroup><tbody><tr><th>**Input Name**</th><th>**Input Code**</th><th>**Required**</th><th>**Description**</th></tr><tr><td>Power BI Account</td><td>`FDPBI_INP_ACCOUNT_CODE`</td><td>No</td><td>The account from where we will import the files</td></tr><tr><td>Skip Report</td><td>`FDPBI_INP_SKIP_REPORT_LIST`</td><td>No</td><td>CSV list of the pbix file names, for which report creation will be skipped. Primarily applicable during shared semantic model import. Only applicable for .pbix files.</td></tr><tr><td>Name Conflict</td><td>`FDPBI_INP_NAME_CONFLICT`</td><td>No</td><td>Specifies what to do if the resource with the same name already exists.<ul><li>Abort</li><li>CreateOrOverwrite</li><li>Ignore</li></ul>By default, it will be CreateOrOverwrite</td></tr><tr><td>Display Name</td><td>`FDPBI_INP_DISPLAY_NAME`</td><td>No</td><td>The display name of the content after import. User must provide it either in filename1:displayname1##filename2:displayname2 format or similar json format</td></tr><tr><td>Path To Import From</td><td>`FDPBI_INP_SOURCE_DIR`</td><td>No</td><td>The directory from where the **.pbix/PBIP** files will be listed and imported to target workspace.By default, it will be FD\_ARTIFACTS\_DIR.</td></tr></tbody></table>

# Outputs

<table><colgroup><col /><col /></colgroup><tbody><tr><th>**Output Name**</th><th>**Description**</th></tr><tr><td>`FDPBI_IMPORT_STATUS`</td><td>Returns the JSON formatted output of the Import Status.</td></tr></tbody></table>

# Artifacts

This operation consumes artifacts from the artifacts repository.

# Endpoint Selection

This operation delegates the selection to the workflow developer to determine.

# Endpoint Execution

This operations delegates the execution to the workflow developer to decide.

# Special Considerations

One must manually adjust the sequence of report and semantic model files in the package, so that model gets deployed first and then the report. Otherwise, dependency error will occur such as *Cannot import directly a report using byPath connection. You must first resolve the semantic model id and pass it\[0m .*

## Troubleshooting

While importing, you can come across the error -

```
API Error: 'ModelOperationFailedDueToInvalidCapacityException' - Dataset Workload failed to import the dataset with[0m [31;1m[31;1mdataset id 00000000-0000-0000-0000-000000000000. ErrorCode found in Companion extendedDsid:
```

Please make sure you are importing it to a workspace with enough capacity and the capacity is not paused. Ref: [ModelOperationFailedDueToInvalidCapacityException ... - Microsoft Fabric Community](https://community.fabric.microsoft.com/t5/Issues/ModelOperationFailedDueToInvalidCapacityException-for-pbix-file/idi-p/3250347)
