Workspace and content IDs

In addition to the client ID of the registered application, the REST API operations require an ID associated with the given object or collection of objects referenced by the API operation. For example, to clone a report to a separate app workspace and then bind the report to a dataset in the new workpace, the IDs (GUID values) associated with the report, the source and target workspace, and the dataset must be obtained. These ID values can then can be passed into the variables of PowerShell script files and executed on demand or as part of a scheduled process, such as with dataset refresh operations.

The IDs for Power BI objects can be obtained by executing scripts which reference the appropriate REST API, such as Get Reports. Alternatively, the necessary IDs can be found by navigating to the specific object or collection of objects in the Power BI service and noting the URL.

For example, to retrieve both the group ID and the dataset ID, navigate to an app workspace and open the Settings menu for a dataset, as shown in the following screenshot:

Access to dataset Settings

In this example, opening the Settings menu for the AdWorks Enterprise dataset of the AdWorks Global Sales workspace results in the following URL in the address bar of the browser https://app.powerbi.com/groups/c738f14c-648d-47f5-91d2-ad8ef234f49c/settings/datasets/61e21466-a3eb-45e9-b8f3-c015d7165e57

Based on this URL, the following two IDs can be used in PowerShell scripts calling the REST APIs:

  • AdWorks Global Sales (app workspace): c738f14c-648d-47f5-91d2-ad8ef234f49c
  • AdWorks Enterprise (dataset): 61e21466-a3eb-45e9-b8f3-c015d7165e57

Just as the terms groups and datasets precede the IDs for these objects, respectively, the term reports precedes the ID for a specific report the URL when a report is selected in the Power BI service.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.106.135