Get Import by GUID

 

Updated: July 21, 2017


Request | Response

The Get Import by GUID operation returns a JSON body for an Import object with its properties including id, import source, Reports, and Datasets. Include the Import guid in the GET uri to return an Import object.

Required scope: Dataset.Read.All or Dataset.ReadWrite.All

GET https://api.powerbi.com/v1.0/myorg/imports/{import_guid}

Groups

Groups are a collection of unified Azure Active Directory groups that the user is a member of and is available in the Power BI service. These are referred to as app workspaces within the Power BI service. To learn how to create a group, see Create an app workspace.

GET https://api.powerbi.com/v1.0/myorg/groups/{group_id}/imports/{import_guid}

Uri parameter

NameDescriptionData Type
group_idGuid of the Group to use. You can get the group id from the Get Groups operation. Groups are referred to as app workspaces within the Power BI service.String
import_guidThe id of the import to retrieveString

Header

Content-Type: application/json
Authorization: Bearer eyJ0eX ... FWSXfwtQ

Status code

CodeDescription
200OK. Indicates success. The response body contains a dataset if the file is imported, and a report if the file is connected.

Content-Type

application/json

Body schema

Imports have the following properties:

  • Id
  • Name
  • createdDateTime
  • Import source (either file or URL path)
  • Array of Reports
    • A Report has the same properties as returned by GET Reports.
  • Array of Datasets
    • A Dataset has the same properties as returned by GET Datasets.
{
  "id": "string",
  "name": "string",
  "importState": "string",
  "reports": [
    {
      "id": "string",
      "name": "string",
      "webUrl": "string",
      "embedUrl": "string",
      "datasetId": "string"
    }
  ],
  "datasets": [
    {
      "id": "string",
      "name": "string",
      "configuredBy": "string",
      "defaultRetentionPolicy": "string",
      "addRowsAPIEnabled": true,
      "tables": [
        {
          "name": "string",
          "columns": [
            {
              "name": "string",
              "dataType": "string"
            }
          ],
          "rows": [
            {
              "id": "string"
            }
          ]
        }
      ],
      "webUrl": "string",
      "datasources": [
        {
          "name": "string",
          "connectionString": "string"
        }
      ],
      "defaultMode": "AsAzure"
    }
  ],
  "createdDateTime": "2017-07-21T20:11:24.872Z",
  "updatedDateTime": "2017-07-21T20:11:24.872Z"
}

Body Example

{  
  "id" : "405BBEEB--30264301ED95",  
  "createdDateTime" : "2015-03-13 15:51:30.937",  
  "updatedDateTime" : "2015-03-13 15:51:30.937",  
  "importState" : "Published", -Need to get Enum values  
  "error":  
    {  
        "code": "NotImplemented",  
        "message": "Requested feature is not implemented",  
        "target": "query",  
        "details": [  
            {  
            "code": "QueryParmNotSupported",  
            "target": "$search",  
            "message":  "Requested query option not supported",  
            }  
        ]  
    },  
    "reports" : [  
    {  
      "id":"1662698F-045D-4F2D-AFD1-556BEC8F4413",  
      "name":"forecast.xlsx"  
    }    
    ],          
  "datasets" : [  
      {  
          "id":"A68F51BD--5EFF229013C7",  
          "name":"forecast.xlsx"  
      }    
  ]  
}  

Show: