### Sample Request to Get Apps Source: https://learn.microsoft.com/en-us/rest/api/power-bi/admin/apps-get-apps-as-admin An example of a GET request to retrieve the top 10 apps in the organization. ```HTTP GET https://api.powerbi.com/v1.0/myorg/admin/apps?$top=10 ``` -------------------------------- ### Sample Request to Get Pipeline Stages Source: https://learn.microsoft.com/en-us/rest/api/power-bi/pipelines/get-pipeline-stages An example of a GET request to retrieve stages for a specific deployment pipeline, identified by its UUID. ```HTTP GET https://api.powerbi.com/v1.0/myorg/pipelines/a5ded933-57b7-41f4-b072-ed4c1f9d5824/stages ``` -------------------------------- ### Get Apps Source: https://learn.microsoft.com/en-us/rest/api/power-bi/apps Returns a list of installed apps. ```APIDOC ## GET Apps ### Description Returns a list of installed apps. ### Method GET ### Endpoint /apps ``` -------------------------------- ### Sample Request to Get Tiles Source: https://learn.microsoft.com/en-us/rest/api/power-bi/dashboards/get-tiles An example of a GET request to fetch tiles from a dashboard with a specific ID. ```HTTP GET https://api.powerbi.com/v1.0/myorg/dashboards/69ffaa6c-b36d-4d01-96f5-1ed67c64d4af/tiles ``` -------------------------------- ### Example Request for 'Test' Stage Artifacts Source: https://learn.microsoft.com/en-us/rest/api/power-bi/pipelines/get-pipeline-stage-artifacts This example demonstrates a GET request to retrieve artifacts from the 'Test' stage (stageOrder 1) of a specific deployment pipeline. Ensure you have the necessary permissions and scope. ```HTTP GET https://api.powerbi.com/v1.0/myorg/pipelines/a5ded933-57b7-41f4-b072-ed4c1f9d5824/stages/1/artifacts ``` -------------------------------- ### Sample Request to Get Workloads Source: https://learn.microsoft.com/en-us/rest/api/power-bi/capacities/get-workloads An example of a GET request to retrieve workloads for a capacity with a specific ID. ```HTTP GET https://api.powerbi.com/v1.0/myorg/capacities/0f084df7-c13d-451b-af5f-ed0c466403b2/Workloads ``` -------------------------------- ### Sample Get Datasource Request Source: https://learn.microsoft.com/en-us/rest/api/power-bi/gateways/get-datasource An example of a GET request to fetch a data source, including specific gateway and data source IDs. ```HTTP GET https://api.powerbi.com/v1.0/myorg/gateways/1f69e798-5852-4fdd-ab01-33bb14b6e934/datasources/252b9de8-d915-4788-aaeb-ec8c2395f970 ``` -------------------------------- ### Sample Request for Get Tile In Group Source: https://learn.microsoft.com/en-us/rest/api/power-bi/dashboards/get-tile-in-group An example of a GET request to retrieve a tile, showing placeholder IDs for the dashboard and tile. ```HTTP GET https://api.powerbi.com/v1.0/myorg/groups/{groupId}/dashboards/69ffaa6c-b36d-4d01-96f5-1ed67c64d4af/tiles/312fbfe9-2eda-44e0-9ed0-ab5dc571bb4b ``` -------------------------------- ### Sample Request: Get Pipeline with Stages Expanded Source: https://learn.microsoft.com/en-us/rest/api/power-bi/pipelines/get-pipeline Example HTTP request to retrieve a deployment pipeline including its stages. ```HTTP GET https://api.powerbi.com/v1.0/myorg/pipelines/a5ded933-57b7-41f4-b072-ed4c1f9d5824?$expand=stages ``` -------------------------------- ### Sample Get Report Request Source: https://learn.microsoft.com/en-us/rest/api/power-bi/apps/get-report An example of a GET request to retrieve a report, including a sample app ID. Replace `{reportId}` with the actual report ID. ```http GET https://api.powerbi.com/v1.0/myorg/apps/3d9b93c6-7b6d-4801-a491-1738910904fd/reports/{reportId} ``` -------------------------------- ### Sample Request for User Subscriptions Source: https://learn.microsoft.com/en-us/rest/api/power-bi/admin/users-get-user-subscriptions-as-admin An example of a GET request to the API, specifying a sample user ID to fetch their subscriptions. ```HTTP GET https://api.powerbi.com/v1.0/myorg/admin/users/f089354e-8366-4e18-aea3-4cb4a3a50b48/subscriptions ``` -------------------------------- ### Sample Request to Get Goal Value Check-in Source: https://learn.microsoft.com/en-us/rest/api/power-bi/goal-values(preview)/get-by-id Example of an HTTP GET request to retrieve a specific goal value check-in, including the 'notes' expansion. ```HTTP GET https://api.powerbi.com/v1.0/myorg/groups/bc390256-fa54-4bd8-96a1-2c80df0cf704/scorecards(299759d9-80d3-45a8-8f13-a0624ea7e388)/goals(de3e8b13-1ba6-4806-871f-2fb1658e0837)/goalValues(2021-12-14T00:00:00Z)?$expand=notes ``` -------------------------------- ### Sample Dashboard Request Source: https://learn.microsoft.com/en-us/rest/api/power-bi/apps/get-dashboard An example of a GET request to retrieve a dashboard, demonstrating the structure with a placeholder for the dashboard ID. ```HTTP GET https://api.powerbi.com/v1.0/myorg/apps/3d9b93c6-7b6d-4801-a491-1738910904fd/dashboards/{dashboardId} ``` -------------------------------- ### Sample Request for Imports Source: https://learn.microsoft.com/en-us/rest/api/power-bi/imports/get-imports-in-group An example of a GET request to the Power BI API to list imports for a workspace with a specific ID. ```HTTP GET https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/imports ``` -------------------------------- ### Get Audit Activity Events within a Time Window Source: https://learn.microsoft.com/en-us/rest/api/power-bi/admin/get-activity-events Retrieves audit activity events filtered by a specified start and end time. This example demonstrates the request URL and a sample successful response. ```http GET https://api.powerbi.com/v1.0/myorg/admin/activityevents?startDateTime='2019-08-13T07:55:00.000Z'&endDateTime='2019-08-13T08:55:00.000Z' ``` ```json { "activityEventEntities": [ { "Id": "41ce06d1-d81b-4ea0-bc6d-2ce3dd2f8e87", "CreationTime": "2019-08-13T07:55:15", "Operation": "ViewReport", "OrganizationId": "e43e3248-3d83-44aa-a94d-c836bd7f9b79", "UserKey": "779438769", "Activity": "ViewReport", "Workload": "PowerBI", "UserId": "john@contoso.com", "ClientIP": "127.0.0.1" }, { "Id": "c632aa64-70fc-4e80-88f3-9fc2cdcacce8", "CreationTime": "2019-08-13T07:55:10", "Operation": "ViewDashboard", "OrganizationId": "e43e3248-3d83-44aa-a94d-c836bd7f9b79", "UserKey": "321HK34324", "Activity": "ViewDashboard", "Workload": "PowerBI", "UserId": "john@contoso.com", "ClientIP": "131.107.160.240", "CapacityId": "zy5bad4z-x1a2-491a-9f0c-f012171ee02e", "CapacityName": "Shared On Premium - Reserved", "WorkspaceId": "bf10ae91-c4f6-494e-b538-e2454229a765" } ], "continuationUri": "https://api.powerbi.com/v1.0/myorg/admin/activityevents?continuationToken='%2BRID%3A244SAKlHY7YGAAAAAAAAAA%3D%3D%23RT%3A1%23TRC%3A5%23FPC%3AAQYAAAAAAAAAFwAAAAAAAAA%3D'", "continuationToken": "%2BRID%3A244SAKlHY7YGAAAAAAAAAA%3D%3D%23RT%3A1%23TRC%3A5%23FPC%3AAQYAAAAAAAAAFwAAAAAAAAA%3D" } ``` -------------------------------- ### Sample Response for Get App Source: https://learn.microsoft.com/en-us/rest/api/power-bi/apps/get-app This JSON object represents a successful response when retrieving an installed app. It includes details like the app's ID, name, description, publisher, and last update time. ```JSON { "id": "f089354e-8366-4e18-aea3-4cb4a3a50b48", "description": "The finance app", "name": "Finance", "publishedBy": "Bill", "lastUpdate": "2019-01-13T09:46:53.094+02:00" } ``` -------------------------------- ### Get a list of installed Power BI apps Source: https://learn.microsoft.com/en-us/rest/api/power-bi/apps/get-apps Use this HTTP GET request to retrieve all installed apps in your organization. Ensure you have the 'App.Read.All' scope authorized. ```HTTP GET https://api.powerbi.com/v1.0/myorg/apps ``` -------------------------------- ### Get Pages In Group Sample Request Source: https://learn.microsoft.com/en-us/rest/api/power-bi/reports/get-pages-in-group An example of a GET request to the 'Get Pages In Group' API endpoint, demonstrating the structure with placeholder IDs. ```HTTP GET https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/reports/879445d6-3a9e-4a74-b5ae-7c0ddabf0f11/pages ``` -------------------------------- ### Sample Response: Get Deployment Pipelines Source: https://learn.microsoft.com/en-us/rest/api/power-bi/admin/pipelines-get-pipelines-as-admin A sample JSON response for a successful request to get deployment pipelines, showing their IDs, display names, and descriptions. ```JSON { "value": [ { "id": "a5ded933-57b7-41f4-b072-ed4c1f9d5824", "displayName": "Marketing Deployment Pipeline", "description": "Power BI deployment pipeline to manage marketing reports" }, { "id": "183dcf10-47b8-48c4-84aa-f0bf9d5f8fcf", "displayName": "Financing Deployment Pipeline", "description": "Power BI deployment pipeline to manage financing reports" } ] } ``` -------------------------------- ### Sample Request with optional parameters and body Source: https://learn.microsoft.com/en-us/rest/api/power-bi/admin/workspace-info-post-workspace-info This example shows a complete sample request with specific optional parameters and a JSON body containing workspace IDs. ```HTTP POST https://api.powerbi.com/v1.0/myorg/admin/workspaces/getInfo?lineage=True&datasourceDetails=True&datasetSchema=True&datasetExpressions=True ``` -------------------------------- ### Sample Response: Pipeline with Stages Source: https://learn.microsoft.com/en-us/rest/api/power-bi/pipelines/get-pipeline Example JSON response for a deployment pipeline that includes its stages. ```JSON { "id": "a5ded933-57b7-41f4-b072-ed4c1f9d5824", "displayName": "My Deployment Pipeline", "description": "My deployment pipeline", "stages": [ { "order": 0, "workspaceId": "4de5bcc4-2c88-4efe-b827-4ee7b289b496", "workspaceName": "Workspace-Development" }, { "order": 1, "workspaceId": "44b499cf-1eeb-45e2-9ada-63b6ec9d516e" }, { "order": 2 } ] } ``` -------------------------------- ### Create Install Ticket Request Body Source: https://learn.microsoft.com/en-us/rest/api/power-bi/template-apps/create-install-ticket Sample JSON request body for creating an install ticket, including app ID, package key, owner tenant ID, and configuration parameters. ```JSON { "appId": "91ce06d1-d81b-4ea0-bc6d-2ce3dd2f8e87", "packageKey": "g632bb64...OfsoqT56xEM=", "ownerTenantId": "d43e3248-3d83-44aa-a94d-c836bd7f9b79", "config": { "configuration": { "param1": "value1", "param2": "value2" } } } ``` -------------------------------- ### Sample Request to Get Report Page Source: https://learn.microsoft.com/en-us/rest/api/power-bi/reports/get-page An example of a GET request to retrieve a report page by its ID and name. ```HTTP GET https://api.powerbi.com/v1.0/myorg/reports/879445d6-3a9e-4a74-b5ae-7c0ddabf0f11/pages/ReportSection ``` -------------------------------- ### Successful Install Ticket Response (200 OK) Source: https://learn.microsoft.com/en-us/rest/api/power-bi/template-apps/create-install-ticket Sample JSON response for a successful ticket creation, containing the ticket, ticket ID, and expiration date. ```JSON { "ticket": "H4sI....AAA=", "ticketId": "4b76f5ed-5a06-4150-8d1b-60f8e4c186f4", "expiration": "2020-07-29T17:58:19Z" } ``` -------------------------------- ### Sample Request for Getting Group Users Source: https://learn.microsoft.com/en-us/rest/api/power-bi/groups/get-group-users An example of an HTTP GET request to retrieve users for a specific workspace ID. ```HTTP GET https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/users ``` -------------------------------- ### Sample Response: Get Deployment Pipelines with Stages Expanded Source: https://learn.microsoft.com/en-us/rest/api/power-bi/admin/pipelines-get-pipelines-as-admin A sample JSON response showing deployment pipelines with their stages expanded. Each stage includes its order, workspace ID, and workspace name. ```JSON { "value": [ { "id": "a5ded933-57b7-41f4-b072-ed4c1f9d5824", "displayName": "Marketing Deployment Pipeline", "description": "Power BI deployment pipeline to manage marketing reports", "stages": [ { "order": "0", "workspaceId": "5dba60b0-d9a7-42a3-b12c-6d9d51e7739a", "workspaceName": "SQlAzure-Refresh" }, { "order": "1", "workspaceId": "8ce96c50-85a0-4db3-85c6-7ccc3ed46523", "workspaceName": "SQlAzure-Refresh[Test]" }, { "order": "2" } ] } ] } ``` -------------------------------- ### Sample Request: Get Deployment Pipelines with Users Expanded Source: https://learn.microsoft.com/en-us/rest/api/power-bi/admin/pipelines-get-pipelines-as-admin A sample HTTP request to retrieve deployment pipelines and expand their associated user information. The '$top=100' parameter limits the results. ```HTTP GET https://api.powerbi.com/v1.0/myorg/admin/pipelines?$expand=users&$top=100 ``` -------------------------------- ### Get App Source: https://learn.microsoft.com/en-us/rest/api/power-bi/apps Returns the specified installed app. ```APIDOC ## GET Apps/{appId} ### Description Returns the specified installed app. ### Method GET ### Endpoint /apps/{appId} ### Parameters #### Path Parameters - **appId** (string) - Required - The ID of the app to retrieve. ``` -------------------------------- ### Sample Request: Get Pipeline without Stages Source: https://learn.microsoft.com/en-us/rest/api/power-bi/pipelines/get-pipeline Example HTTP request to retrieve a deployment pipeline without expanding its stages. ```HTTP GET https://api.powerbi.com/v1.0/myorg/pipelines/a5ded933-57b7-41f4-b072-ed4c1f9d5824 ``` -------------------------------- ### GET Apps Source: https://learn.microsoft.com/en-us/rest/api/power-bi/apps/get-app Retrieves a specific installed app by its ID. This operation is useful for fetching details of an app that has already been installed or published. ```APIDOC ## GET /apps/{appId} ### Description Returns the specified installed app. ### Method GET ### Endpoint https://api.powerbi.com/v1.0/myorg/apps/{appId} ### Parameters #### Path Parameters - **appId** (string (uuid)) - Required - The app ID ### Responses #### Success Response (200 OK) - **App** (object) - OK ### Response Example ```json { "id": "f089354e-8366-4e18-aea3-4cb4a3a50b48", "description": "The finance app", "name": "Finance", "publishedBy": "Bill", "lastUpdate": "2019-01-13T09:46:53.094+02:00" } ``` ### Definitions #### App Object A Power BI installed app - **description** (string) - The app description - **id** (string (uuid)) - The app ID - **lastUpdate** (string (date-time)) - The date and time the app was last updated - **name** (string) - The app name - **publishedBy** (string) - The app publisher ``` -------------------------------- ### Sample Response for Get Apps Source: https://learn.microsoft.com/en-us/rest/api/power-bi/admin/apps-get-apps-as-admin A sample JSON response when successfully retrieving a list of apps. It includes details like app ID, description, name, publisher, and last update date. ```JSON { "value": [ { "id": "f089354e-8366-4e18-aea3-4cb4a3a50b48", "description": "The finance app", "name": "Finance", "publishedBy": "Bill", "lastUpdate": "2019-01-13T09:46:53.094+02:00" }, { "id": "3d9b93c6-7b6d-4801-a491-1738910904fd", "description": "The marketing app", "name": "Marketing", "publishedBy": "Ben", "lastUpdate": "2018-11-13T09:46:53.094+02:00" } ] } ``` -------------------------------- ### Sample Request to Get Scorecard Source: https://learn.microsoft.com/en-us/rest/api/power-bi/scorecards(preview)/get-by-id An example of a GET request to retrieve a specific scorecard, including placeholder IDs for the group and scorecard. ```HTTP GET https://api.powerbi.com/v1.0/myorg/groups/bc390256-fa54-4bd8-96a1-2c80df0cf704/scorecards(f74738b3-c62d-4487-838c-918d314556ee) ``` -------------------------------- ### Sample Request for Get Service Principal Profile Source: https://learn.microsoft.com/en-us/rest/api/power-bi/profiles/get-profile An example of a GET request to retrieve a service principal profile with a specific UUID. ```HTTP GET https://api.powerbi.com/v1.0/myorg/profiles/b2ded813-54b7-43f4-b072-ed4c1f9d5824 ``` -------------------------------- ### Sample Request to Create a Push Dataset Source: https://learn.microsoft.com/en-us/rest/api/power-bi/push-datasets/datasets-post-dataset-in-group This sample demonstrates how to construct the request body for creating a push dataset named 'SalesMarketing' with a 'Product' table. It specifies column details and data types. ```JSON { "name": "SalesMarketing", "defaultMode": "Push", "tables": [ { "name": "Product", "columns": [ { "name": "ProductID", "dataType": "Int64" }, { "name": "Name", "dataType": "string" }, { "name": "Category", "dataType": "string" }, { "name": "IsCompete", "dataType": "bool" }, { "name": "ManufacturedOn", "dataType": "DateTime" }, { "name": "Sales", "dataType": "Int64", "formatString": "Currency" } ] } ] } ``` -------------------------------- ### Sample Request to Get Datasources Source: https://learn.microsoft.com/en-us/rest/api/power-bi/gateways/get-datasources An example of a GET request to the Power BI API to list data sources for a specific gateway. ```HTTP GET https://api.powerbi.com/v1.0/myorg/gateways/1f69e798-5852-4fdd-ab01-33bb14b6e934/datasources ``` -------------------------------- ### Sample Request: Get Deployment Pipelines with Stages Expanded Source: https://learn.microsoft.com/en-us/rest/api/power-bi/admin/pipelines-get-pipelines-as-admin A sample HTTP request to retrieve deployment pipelines and expand their associated stages. The '$top=100' parameter limits the results. ```HTTP GET https://api.powerbi.com/v1.0/myorg/admin/pipelines?$expand=stages&$top=100 ``` -------------------------------- ### Sample Request for Get Dashboard In Group Source: https://learn.microsoft.com/en-us/rest/api/power-bi/dashboards/get-dashboard-in-group An example of a GET request to retrieve a dashboard, using specific UUIDs for the group and dashboard. ```HTTP GET https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/dashboards/69ffaa6c-b36d-4d01-96f5-1ed67c64d4af ``` -------------------------------- ### Sample Request for Get Datasources as Admin Source: https://learn.microsoft.com/en-us/rest/api/power-bi/admin/datasets-get-datasources-as-admin An example of a GET request to the Admin - Datasets GetDatasourcesAsAdmin API, specifying a dataset ID. ```HTTP GET https://api.powerbi.com/v1.0/myorg/admin/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/datasources ``` -------------------------------- ### Sample Response: Get Capacities with Expand on Tenant Key Source: https://learn.microsoft.com/en-us/rest/api/power-bi/admin/get-capacities-as-admin A sample JSON response for a successful retrieval of capacities when expanding 'tenantKey', including detailed encryption key information. ```JSON { "value": [ { "id": "0f084df7-c13d-451b-af5f-ed0c466403b2", "displayName": "MyCapacity", "admins": [ "john@contoso.com" ], "sku": "A1", "state": "Active", "region": "West Central US", "capacityUserAccessRight": "Admin", "tenantKeyId": "82d9a37a-2b45-4221-b012-cb109b8e30c7", "tenantKey": { "id": "82d9a37a-2b45-4221-b012-cb109b8e30c7", "name": "Contoso Sales", "keyVaultKeyIdentifier": "https://contoso-vault2.vault.azure.net/keys/ContosoKeyVault/b2ab4ba1c7b341eea5ecaaa2wb54c4d2", "isDefault": true, "createdAt": "2019-04-30T21:35:15.867-07:00", "updatedAt": "2019-04-30T21:35:15.867-07:00" } } ] } ``` -------------------------------- ### Get Excel Workbook Endpoint Source: https://learn.microsoft.com/en-us/rest/api/power-bi-report/excel-workbooks/get-excel-workbook Use this GET request to retrieve a specific ExcelWorkbook CatalogItem by its ID. The ID can be a GUID or a path. ```HTTP GET /ExcelWorkbooks({Id}) ``` -------------------------------- ### Sample Request for Goal Values with Notes Source: https://learn.microsoft.com/en-us/rest/api/power-bi/goal-values(preview)/get An example of a GET request to retrieve goal values, specifically expanding the 'notes' parameter to include associated notes. ```HTTP GET https://api.powerbi.com/v1.0/myorg/groups/bc390256-fa54-4bd8-96a1-2c80df0cf704/scorecards(299759d9-80d3-45a8-8f13-a0624ea7e388)/goals(de3e8b13-1ba6-4806-871f-2fb1658e0837)/goalValues?$expand=notes ``` -------------------------------- ### Sample Request to Get Reports Source: https://learn.microsoft.com/en-us/rest/api/power-bi/reports/get-reports-in-group An example of a GET request to the Power BI API to fetch reports from a specific workspace identified by its ID. ```HTTP GET https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/reports ``` -------------------------------- ### Get Pipeline Operation Sample Request Source: https://learn.microsoft.com/en-us/rest/api/power-bi/pipelines/get-pipeline-operation An example of a GET request to a specific pipeline operation, including placeholder IDs for pipeline and operation. ```HTTP GET https://api.powerbi.com/v1.0/myorg/pipelines/a5ded933-57b7-41f4-b072-ed4c1f9d5824/operations/1065e6a3-a020-4c0c-ada7-92b5fe99eec5 ``` -------------------------------- ### Sample POST Request for Setting Dataset Connections Source: https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/set-all-dataset-connections-in-group This is a sample HTTP POST request demonstrating how to set all connections for a dataset within a specific workspace. Replace the placeholder IDs with your actual dataset and group IDs. ```HTTP POST https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/Default.SetAllConnections ``` -------------------------------- ### POST /v1.0/myorg/CreateTemplateAppInstallTicket Source: https://learn.microsoft.com/en-us/rest/api/power-bi/template-apps/create-install-ticket Creates an installation ticket for a Power BI template app. This API is used to initiate the automated installation flow of a specified template app. The caller must use service principal for authentication and own the template app. ```APIDOC ## POST /v1.0/myorg/CreateTemplateAppInstallTicket ### Description Generates an installation ticket for the automated install flow of the specified template app. The caller must use service principal for authentication and own the template app. ### Method POST ### Endpoint https://api.powerbi.com/v1.0/myorg/CreateTemplateAppInstallTicket ### Permissions The caller must use service principal for authentication. For more information, see Embed Power BI content with service principal and Considerations and limitations. ### Limitations * The tenant making this API call _must_ own the specified template app. * The template app must either be published to Microsoft AppSource, or, both the ticket creator and the end-user installing with the ticket must have explicit access to the app. * All query parameters in the install ticket _must_ be configured. ### Parameters #### Request Body - **installDetails** (TemplateAppInstallDetails[]) - Required - List of install details ### Request Example ```json { "appId": "91ce06d1-d81b-4ea0-bc6d-2ce3dd2f8e87", "packageKey": "g632bb64...OfsoqT56xEM=", "ownerTenantId": "d43e3248-3d83-44aa-a94d-c836bd7f9b79", "config": { "configuration": { "param1": "value1", "param2": "value2" } } } ``` ### Responses #### Success Response (200 OK) - **ticket** (string) - Install ticket - **ticketId** (string (uuid)) - The unique ID of an install ticket. Audit logs can be used to correlate operations that use this ticket with the generate ticket operation. - **expiration** (string (date-time)) - The expiration date and time (UTC) of the ticket #### Response Example (200 OK) ```json { "ticket": "H4sI....AAA=", "ticketId": "4b76f5ed-5a06-4150-8d1b-60f8e4c186f4", "expiration": "2020-07-29T17:58:19Z" } ``` #### Error Response (401 Unauthorized) ```json { "error": { "code": "ServiceAppApplicationOwnershipValidationFailed", "pbi.error": { "code": "ServiceAppApplicationOwnershipValidationFailed", "parameters": {}, "details": [], "exceptionCulprit": 1 } } } ``` #### Error Response (400 Bad Request) ```json { "error": { "code": "ServiceAppInstallTicketInvalidConfiguration", "pbi.error": { "code": "ServiceAppInstallTicketInvalidConfiguration", "parameters": {}, "details": [], "exceptionCulprit": 1 } } } ``` ### Definitions #### TemplateAppInstallDetails Object The install details for a Power BI template app - **appId** (string (uuid)) - Required - The unique ID of the Power BI template app - **config** (TemplateAppConfigurationRequest) - Required - The automated install configuration - **ownerTenantId** (string (uuid)) - Required - The tenant ID of the Power BI template app owner - **packageKey** (string) - Required - The secure key for the Power BI template app version #### TemplateAppConfigurationRequest Object An automated install configuration for a Power BI template app (dictionary of name-value pairs) - **configuration** (object) - Required #### InstallTicket Object An automated install ticket for a Power BI template app - **expiration** (string (date-time)) - The expiration date and time (UTC) of the ticket - **ticket** (string) - Install ticket - **ticketId** (string (uuid)) - The unique ID of an install ticket. Audit logs can be used to correlate operations that use this ticket with the generate ticket operation. ``` -------------------------------- ### Sample Request to Get Dataset Parameters Source: https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/get-parameters-in-group An example of an HTTP GET request to retrieve parameters for a dataset, specifying the group and dataset IDs. ```HTTP GET https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/parameters ``` -------------------------------- ### Sample Request and Response - Guest User Access Source: https://learn.microsoft.com/en-us/rest/api/power-bi/admin/users-get-user-artifact-access-as-admin Demonstrates retrieving artifact access for a guest user, including the specific URL format for guest user principal names and the expected JSON response. ```HTTP GET https://api.powerbi.com/v1.0/myorg/admin/users/testUser_microsoft.com%23EXT%23@contoso.com/artifactAccess ``` ```JSON { "artifactAccessEntities": [ { "artifactId": "41ce06d1-d81b-4ea0-bc6d-2ce3dd2f8e87", "displayName": "test report", "artifactType": "Report", "accessRight": "ReadWrite" } ], "continuationUri": "https://api.powerbi.com/v1.0/myorg/admin/users/testUser_microsoft.com%23EXT%23%40contoso.com/artifactAccess?continuationToken='LDEsMTAwMDAwLDA%3D'", "continuationToken": "LDEsMTAwMDAwLDA%3D" } ``` -------------------------------- ### Sample Request to Get Dashboards Source: https://learn.microsoft.com/en-us/rest/api/power-bi/dashboards/get-dashboards-in-group An example of a GET request to the Power BI API to fetch dashboards from a specific workspace, identified by its UUID. ```HTTP GET https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/dashboards ``` -------------------------------- ### Sample Request to Get Scorecards Source: https://learn.microsoft.com/en-us/rest/api/power-bi/scorecards(preview)/get An example of an HTTP GET request to retrieve scorecards from a workspace, specifying the group ID and limiting the results to 30. ```HTTP GET https://api.powerbi.com/v1.0/myorg/groups/bc390256-fa54-4bd8-96a1-2c80df0cf704/scorecards?$top=30 ``` -------------------------------- ### Sample request and response for getting groups Source: https://learn.microsoft.com/en-us/rest/api/power-bi/groups/get-groups Demonstrates a sample HTTP GET request to retrieve groups and its corresponding JSON response, showing the structure of group objects. ```HTTP GET https://api.powerbi.com/v1.0/myorg/groups ``` ```JSON { "value": [ { "id": "f089354e-8366-4e18-aea3-4cb4a3a50b48", "isReadOnly": false, "isOnDedicatedCapacity": false, "name": "sample group" }, { "id": "3d9b93c6-7b6d-4801-a491-1738910904fd", "isReadOnly": false, "isOnDedicatedCapacity": true, "capacityId": "0f084df7-c13d-451b-af5f-ed0c466403b2", "defaultDatasetStorageFormat": "Small", "name": "marketing group" }, { "id": "a2f89923-421a-464e-bf4c-25eab39bb09f", "isReadOnly": false, "isOnDedicatedCapacity": true, "capacityId": "0f084df7-c13d-451b-af5f-ed0c466403b2", "defaultDatasetStorageFormat": "Large", "name": "contoso", "dataflowStorageId": "d692ae06-708c-485e-9987-06ff0fbdbb1f" } ] } ``` -------------------------------- ### Sample Request to Get Refresh Schedule Source: https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/get-refresh-schedule An example of a GET request to the Power BI REST API to fetch the refresh schedule for a specific dataset. ```HTTP GET https://api.powerbi.com/v1.0/myorg/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/refreshSchedule ``` -------------------------------- ### Sample Request to Get Reports Source: https://learn.microsoft.com/en-us/rest/api/power-bi/apps/get-reports An example of an HTTP GET request to retrieve reports from a Power BI app, including a placeholder for the app ID. ```HTTP GET https://api.powerbi.com/v1.0/myorg/apps/3d9b93c6-7b6d-4801-a491-1738910904fd/reports ``` -------------------------------- ### Sample Response for Creating Goal Value Source: https://learn.microsoft.com/en-us/rest/api/power-bi/goal-values(preview)/post Example of a successful 200 OK response when creating a goal value check-in, showing the created goal value object. ```JSON { "@odata.context": "http://someserver.analysis.windows.net/v1.0/myorg/groups/bc390256-fa54-4bd8-96a1-2c80df0cf704/$metadata#scorecards(07943a5a-3c1f-424f-8c1c-144fcfe4431b)/goals(85232f60-18f8-4b57-8c34-042ca6a68f5b)/goalValues/$entity", "timestamp": "2021-12-14T00:00:00Z", "goalId": "85232f60-18f8-4b57-8c34-042ca6a68f5b", "scorecardId": "07943a5a-3c1f-424f-8c1c-144fcfe4431b", "createdTime": "2021-12-14T21:29:30.3322292Z", "lastModifiedTime": "2021-12-14T21:29:30.3322292Z", "value": 100, "target": 100, "status": 1 } ``` -------------------------------- ### Days and Times Schedule Example - Sample Request Source: https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/get-direct-query-refresh-schedule Sample HTTP GET request to retrieve a dataset's refresh schedule configured with specific days and times. ```HTTP GET https://api.powerbi.com/v1.0/myorg/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229/directQueryRefreshSchedule ``` -------------------------------- ### Get Report Comments API Endpoint Source: https://learn.microsoft.com/en-us/rest/api/power-bi-report/reports/get-report-comments Use this GET request to retrieve comments for a specific report identified by its ID. The ID can be a GUID or a path. ```HTTP GET /Reports({Id})/Comments ``` -------------------------------- ### Post Import Skip Report Example Source: https://learn.microsoft.com/en-us/rest/api/power-bi/imports/post-import-in-group This example demonstrates importing a dataset while skipping the report generation. It also includes options to override report and model labels. ```HTTP POST https://api.powerbi.com/v1.0/myorg/groups/cfafbeb1-8037-4d0c-896e-a46fb27ff229/imports?datasetDisplayName=MyReport&nameConflict=Ignore&skipReport=True&overrideReportLabel=True&overrideModelLabel=True ``` -------------------------------- ### Completed import example Source: https://learn.microsoft.com/en-us/rest/api/power-bi/imports/get-import This sample shows the response for a successfully completed import. It includes details about the import state, creation/update times, name, and associated datasets and reports. ```HTTP GET https://api.powerbi.com/v1.0/myorg/imports/82d9a37a-2b45-4221-b012-cb109b8e30c7 ``` ```JSON { "id": "82d9a37a-2b45-4221-b012-cb109b8e30c7", "importState": "Succeeded", "createdDateTime": "2018-05-08T14:56:18.477Z", "updatedDateTime": "2018-05-08T14:56:18.477Z", "name": "SalesMarketing", "connectionType": "import", "source": "Upload", "datasets": [ { "id": "cfafbeb1-8037-4d0c-896e-a46fb27ff229", "name": "SalesMarketing", "webUrl": "https://app.powerbi.com/datasets/cfafbeb1-8037-4d0c-896e-a46fb27ff229" } ], "reports": [ { "id": "5b218778-e7a5-4d73-8187-f10824047715", "name": "SalesMarketing", "webUrl": "https://app.powerbi.com/reports/5b218778-e7a5-4d73-8187-f10824047715", "embedUrl": "https://app.powerbi.com/reportEmbed?reportId=5b218778-e7a5-4d73-8187-f10824047715" } ] } ``` -------------------------------- ### Sample Request to Get Report Pages Source: https://learn.microsoft.com/en-us/rest/api/power-bi/reports/get-pages An example of a GET request to the Power BI REST API for retrieving pages of a report, including a placeholder for the report ID. ```HTTP GET https://api.powerbi.com/v1.0/myorg/reports/879445d6-3a9e-4a74-b5ae-7c0ddabf0f11/pages ``` -------------------------------- ### Sample Request to Get Goals Source: https://learn.microsoft.com/en-us/rest/api/power-bi/goals(preview)/get This is a concrete example of a GET request to retrieve goals, including placeholder IDs for the group and scorecard. This can be used for testing the API endpoint. ```HTTP GET https://api.powerbi.com/v1.0/myorg/groups/bc390256-fa54-4bd8-96a1-2c80df0cf704/scorecards(bc390256-fa54-4bd8-96a1-2c80df0cf704)/goals ``` -------------------------------- ### Sample Request and Response for Widely Shared Artifacts Source: https://learn.microsoft.com/en-us/rest/api/power-bi/admin/widely-shared-artifacts-links-shared-to-whole-organization This example demonstrates a successful GET request to list artifacts shared via links and a sample JSON response. The response includes details about each artifact, including its ID, display name, type, access rights, and sharer information. ```HTTP GET https://api.powerbi.com/v1.0/myorg/admin/widelySharedArtifacts/linksSharedToWholeOrganization ``` ```JSON { "artifactAccessEntities": [ { "artifactId": "41ce06d1-d81b-4ea0-bc6d-2ce3dd2f8e87", "displayName": "test report", "artifactType": "Report", "accessRight": "ReadWrite", "shareType": "Link", "sharer": { "displayName": "John Nick", "emailAddress": "john@contoso.com", "identifier": "john@contoso.com", "graphId": "3fadb6e4-130c-4a8f-aeac-416e38b66756", "principalType": "User" } } ], "continuationUri": "https://api.powerbi.com/v1.0/myorg/admin/widelySharedArtifacts/linksSharedToWholeOrganization?continuationToken='LDEsMTAwMDAwLDA%3D'", "continuationToken": "LDEsMTAwMDAwLDA%3D" } ``` -------------------------------- ### Get Available Feature By Name Request Source: https://learn.microsoft.com/en-us/rest/api/power-bi/available-features/get-available-feature-by-name This is an example of an HTTP GET request to retrieve a specific available feature by its name. The feature name is passed as a URI parameter. ```HTTP GET https://api.powerbi.com/v1.0/myorg/availableFeatures(featureName='{featureName}') ``` -------------------------------- ### Sample Request for Assigning Workspace to Capacity Source: https://learn.microsoft.com/en-us/rest/api/power-bi/capacities/groups-assign-to-capacity Demonstrates a sample HTTP POST request to assign a workspace to a capacity. Ensure you replace placeholder IDs with actual values. ```HTTP POST https://api.powerbi.com/v1.0/myorg/groups/f089354e-8366-4e18-aea3-4cb4a3a50b48/AssignToCapacity ```