All docs This doc
Skip to end of metadata
Go to start of metadata


Overview

The following operations allow you to work with tables. Click an operation name to see details on how to use it.

For a sample proxy service that illustrates how to work with tables, see Sample configuration

OperationDescription

listGroupTables

Retrieves a JSON list from a group.

listTables

Retrieves a JSON list of tables for the specified dataset.

updateGroupTableSchemaUpdates a table schema in a group.
updateTableSchemaUpdates a table schema.

Operation details

This section provides further details on the operations related to tables.

Retrieving a JSON list from a group

The listGroupTables operation retrieves a JSON list from a group.

listGroupTables
<powerbi.listGroupTables>
    <groupId>{$ctx:groupId}</groupId>
	<datasetId>{$ctx:datasetId}</datasetId>
</powerbi.listGroupTables>
Properties
  • groupId: GUID of the group to use
  • datasetId: GUID of the dataset to use.
   Sample request

Following is a sample REST/JSON request that can be handled by the listGroupTables operation.

Sample Request for listGroupTables
{
	"apiUrl" : "https://api.powerbi.com",
	"accessToken" : "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSIsImtpZCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSJ9.eyJhdWQiOiJodHRwczovL2FuYWx5c2lzLndpbmRvd3MubmV0L3Bvd2VyYmkvYXBpIiwiaXNzIjoiaHR0cHM6Ly9zdHMud2luZG93cy5uZXQvMGQ4NTE2MGMtNTg5OS00NGNhLWFjYzgtZGIxNTAxYjk5M2I2LyIsImlhdCI6MTQ0NTU5NDYzOCwibmJmIjoxNDQ1NTk0NjM4LCJleHAiOjE0NDU1OTg1MzgsInZlciI6IjEuMCIsInRpZCI6IjBkODUxNjBjLTU4OTktNDRjYS1hY2M4LWRiMTUwMWI5OTNiNiIsIm9pZCI6IjU3OWY1YzVmLTU1NjctNGY1NC04ZjJjLTgwM2I5NzExYTA0ZiIsInVwbiI6ImhzZWthbmF5YWtlQFZpcnR1c2EuY29tIiwicHVpZCI6IjEwMDMzRkZGOENBODY3ODciLCJzdWIiOiIzZEhYSXVSdUR4QjlabXN1Y0VKTm5jeElLLXJvdDcxUWh1aFQxZHVFX3JZIiwiZ2l2ZW5fbmFtZSI6IkhhcmluZGEiLCJmYW1pbHlfbmFtZSI6IkVrYW5heWFrZSIsIm5hbWUiOiJIYXJpbmRhIEVrYW5heWFrZSIsImFtciI6WyJ3aWEiXSwidW5pcXVlX25hbWUiOiJoc2VrYW5heWFrZUBWaXJ0dXNhLmNvbSIsIm9ucHJlbV9zaWQiOiJTLTEtNS0yMS0xOTM1NjU1Njk3LTIxMzk4NzE5OTUtNjgyMDAzMzMwLTE5Mjg4NSIsImFwcGlkIjoiMmY4M2JiYTgtOGU3Ni00ODM2LTk2NDktYmJjOWJlYTExZjMyIiwiYXBwaWRhY3IiOiIxIiwic2NwIjoiQ29udGVudC5DcmVhdGUgRGFzaGJvYXJkLlJlYWQuQWxsIERhdGEuQWx0ZXJfQW55IERhdGFzZXQuUmVhZC5BbGwgRGF0YXNldC5SZWFkV3JpdGUuQWxsIEdyb3VwLlJlYWQuQWxsIE1ldGFkYXRhLlZpZXdfQW55IiwiYWNyIjoiMSIsImlwYWRkciI6IjIwMy42Mi4xNzUuNCJ9.fv3ErVcHqb2KRiNsiQ2k2RImcxnCNKmzCMe2Na1_4MTEnDkpmBujqDMsAqzmDdV4fYUFwLKeXD7WSUCa2ftsYDz17j-7EI726b8HbuGemfhjirCRb0n-NQVNmUt2JiMfbF_8LmFO8hnf_Hqer6Coyf9YKWUhkm93kPBgZiZWGOIy2f6yevH2cHqe7wt1HWTmr73x2UhF1fHnkVtR1rflMaajYd4Z9BfWNxj87rwg44FxZkYTYeqOHXOdwyy42-H-wXMUfFwn7RA0zAyKToPrtoADr7qIjBw8dXc9NOyermuh9XfEZMqcIjIYibicRjYVYD0c9q2mSyS6sE9L4VWdTA",
	"groupId" : "fda86e48-d7c3-413a-a8b1-2ddafe46b511",
	"datasetId" : "18e69a69-62a4-4da9-aac6-513683f2719f"
}
Related Power BI documentation

https://msdn.microsoft.com/en-us/library/mt203556.aspx

Retrieving a JSON list of tables for the specified dataset

The listTables operation retrieves a JSON list of tables for the specified dataset.

listTables
<powerbi.listTables>
	<datasetId>{$ctx:datasetId}</datasetId>
</powerbi.listTables>
Properties
  • datasetId: GUID of the dataset to use.
   Sample request

Following is a sample REST/JSON request that can be handled by the listTables operation.

Sample Request for listTables
{
	"apiUrl" : "https://api.powerbi.com",
	"accessToken" : "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSIsImtpZCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSJ9.eyJhdWQiOiJodHRwczovL2FuYWx5c2lzLndpbmRvd3MubmV0L3Bvd2VyYmkvYXBpIiwiaXNzIjoiaHR0cHM6Ly9zdHMud2luZG93cy5uZXQvMGQ4NTE2MGMtNTg5OS00NGNhLWFjYzgtZGIxNTAxYjk5M2I2LyIsImlhdCI6MTQ0NTU5NDYzOCwibmJmIjoxNDQ1NTk0NjM4LCJleHAiOjE0NDU1OTg1MzgsInZlciI6IjEuMCIsInRpZCI6IjBkODUxNjBjLTU4OTktNDRjYS1hY2M4LWRiMTUwMWI5OTNiNiIsIm9pZCI6IjU3OWY1YzVmLTU1NjctNGY1NC04ZjJjLTgwM2I5NzExYTA0ZiIsInVwbiI6ImhzZWthbmF5YWtlQFZpcnR1c2EuY29tIiwicHVpZCI6IjEwMDMzRkZGOENBODY3ODciLCJzdWIiOiIzZEhYSXVSdUR4QjlabXN1Y0VKTm5jeElLLXJvdDcxUWh1aFQxZHVFX3JZIiwiZ2l2ZW5fbmFtZSI6IkhhcmluZGEiLCJmYW1pbHlfbmFtZSI6IkVrYW5heWFrZSIsIm5hbWUiOiJIYXJpbmRhIEVrYW5heWFrZSIsImFtciI6WyJ3aWEiXSwidW5pcXVlX25hbWUiOiJoc2VrYW5heWFrZUBWaXJ0dXNhLmNvbSIsIm9ucHJlbV9zaWQiOiJTLTEtNS0yMS0xOTM1NjU1Njk3LTIxMzk4NzE5OTUtNjgyMDAzMzMwLTE5Mjg4NSIsImFwcGlkIjoiMmY4M2JiYTgtOGU3Ni00ODM2LTk2NDktYmJjOWJlYTExZjMyIiwiYXBwaWRhY3IiOiIxIiwic2NwIjoiQ29udGVudC5DcmVhdGUgRGFzaGJvYXJkLlJlYWQuQWxsIERhdGEuQWx0ZXJfQW55IERhdGFzZXQuUmVhZC5BbGwgRGF0YXNldC5SZWFkV3JpdGUuQWxsIEdyb3VwLlJlYWQuQWxsIE1ldGFkYXRhLlZpZXdfQW55IiwiYWNyIjoiMSIsImlwYWRkciI6IjIwMy42Mi4xNzUuNCJ9.fv3ErVcHqb2KRiNsiQ2k2RImcxnCNKmzCMe2Na1_4MTEnDkpmBujqDMsAqzmDdV4fYUFwLKeXD7WSUCa2ftsYDz17j-7EI726b8HbuGemfhjirCRb0n-NQVNmUt2JiMfbF_8LmFO8hnf_Hqer6Coyf9YKWUhkm93kPBgZiZWGOIy2f6yevH2cHqe7wt1HWTmr73x2UhF1fHnkVtR1rflMaajYd4Z9BfWNxj87rwg44FxZkYTYeqOHXOdwyy42-H-wXMUfFwn7RA0zAyKToPrtoADr7qIjBw8dXc9NOyermuh9XfEZMqcIjIYibicRjYVYD0c9q2mSyS6sE9L4VWdTA",
	"datasetId" : "18e69a69-62a4-4da9-aac6-513683f2719f"
}
Related Power BI documentation

https://msdn.microsoft.com/en-us/library/mt203556.aspx

Updating a table schema in a group

The updateGroupTableSchema operation updates a table schema in a group.

updateGroupTableSchema
<powerbi.updateGroupTableSchema>
    <groupId>{$ctx:groupId}</groupId>
    <datasetId>{$ctx:datasetId}</datasetId>
    <tableName>{$ctx:tableName}</tableName>
	<columns>{$ctx:columns}</columns>
</powerbi.updateGroupTableSchema>
Properties
  • groupId: GUID of the group to use.
  • datasetId: GUID of the dataset to use.
  • tableName: Name of table in the dataset.
  • columns: Array of JSON objects which contains column name and column type.
   Sample request

Following is a sample REST/JSON request that can be handled by the updateGroupT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Q29udGVudC5DcmVhdGUgRGFzaGJvYXJkLlJlYWQuQWxsIERhdGEuQWx0ZXJfQW55IERhdGFzZXQuUmVhZC5BbGwgRGF0YXNldC5SZWFkV3JpdGUuQWxsIEdyb3VwLlJlYWQuQWxsIE1ldGFkYXRhLlZpZXdfQW55IiwiYWNyIjoiMSIsImlwYWRkciI6IjIwMy42Mi4xNzUuNCJ9.fv3ErVcHqb2KRiNsiQ2k2RImcxnCNKmzCMe2Na1_4MTEnDkpmBujqDMsAqzmDdV4fYUFwLKeXD7WSUCa2ftsYDz17j-7EI726b8HbuGemfhjirCRb0n-NQVNmUt2JiMfbF_8LmFO8hnf_Hqer6Coyf9YKWUhkm93kPBgZiZWGOIy2f6yevH2cHqe7wt1HWTmr73x2UhF1fHnkVtR1rflMaajYd4Z9BfWNxj87rwg44FxZkYTYeqOHXOdwyy42-H-wXMUfFwn7RA0zAyKToPrtoADr7qIjBw8dXc9NOyermuh9XfEZMqcIjIYibicRjYVYD0c9q2mSyS6sE9L4VWdTA",
	"groupId" : "fda86e48-d7c3-413a-a8b1-2ddafe46b511",
	"datasetId" : "983983dc-5604-47a0-933f-585ea48e8575",
	"tableName" : "Product",
	"columns" :[
    {
      "name": "ProductID",
      "dataType": "Int64"
    },
    {
      "name": "Name",
      "dataType": "string"
    },
    {
      "name": "Category",
      "dataType": "string"
    },
    {
      "name": "IsCompete",
      "dataType": "bool"
    },
    {
      "name": "ManufacturedOn",
      "dataType": "DateTime"
    },
    {
      "name": "NewColumn",
      "dataType": "string"
    },
    {
      "name": "NewColumn2",
      "dataType": "string"
    }
  ]
}
Related Power BI documentation

https://msdn.microsoft.com/en-us/library/mt203560.aspx

Updating a table schema

The updateTableSchema operation updates a table schema.

updateTableSchema
<powerbi.updateTableSchema>
    <datasetId>{$ctx:datasetId}</datasetId>
    <tableName>{$ctx:tableName}</tableName>
	<columns>{$ctx:columns}</columns>
</powerbi.updateTableSchema>
Properties
  • datasetId: GUID of the dataset to use.
  • tableName: Name of the table in the dataset.
  • columns: Array of JSON objects which contains column name and column type.
   Sample request

Following is a sample REST/JSON request that can be handled by the updateTableSchema operation.

Sample Request for updateTableSchema
{
	"apiUrl" : "https://api.powerbi.com",
	"accessToken" : "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSIsImtpZCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE1iYTlnb0VLWSJ9.eyJhdWQiOiJodHRwczovL2FuYWx5c2lzLndpbmRvd3MubmV0L3Bvd2VyYmkvYXBpIiwiaXNzIjoiaHR0cHM6Ly9zdHMud2luZG93cy5uZXQvMGQ4NTE2MGMtNTg5OS00NGNhLWFjYzgtZGIxNTAxYjk5M2I2LyIsImlhdCI6MTQ0NTU5NDYzOCwibmJmIjoxNDQ1NTk0NjM4LCJleHAiOjE0NDU1OTg1MzgsInZlciI6IjEuMCIsInRpZCI6IjBkODUxNjBjLTU4OTktNDRjYS1hY2M4LWRiMTUwMWI5OTNiNiIsIm9pZCI6IjU3OWY1YzVmLTU1NjctNGY1NC04ZjJjLTgwM2I5NzExYTA0ZiIsInVwbiI6ImhzZWthbmF5YWtlQFZpcnR1c2EuY29tIiwicHVpZCI6IjEwMDMzRkZGOENBODY3ODciLCJzdWIiOiIzZEhYSXVSdUR4QjlabXN1Y0VKTm5jeElLLXJvdDcxUWh1aFQxZHVFX3JZIiwiZ2l2ZW5fbmFtZSI6IkhhcmluZGEiLCJmYW1pbHlfbmFtZSI6IkVrYW5heWFrZSIsIm5hbWUiOiJIYXJpbmRhIEVrYW5heWFrZSIsImFtciI6WyJ3aWEiXSwidW5pcXVlX25hbWUiOiJoc2VrYW5heWFrZUBWaXJ0dXNhLmNvbSIsIm9ucHJlbV9zaWQiOiJTLTEtNS0yMS0xOTM1NjU1Njk3LTIxMzk4NzE5OTUtNjgyMDAzMzMwLTE5Mjg4NSIsImFwcGlkIjoiMmY4M2JiYTgtOGU3Ni00ODM2LTk2NDktYmJjOWJlYTExZjMyIiwiYXBwaWRhY3IiOiIxIiwic2NwIjoiQ29udGVudC5DcmVhdGUgRGFzaGJvYXJkLlJlYWQuQWxsIERhdGEuQWx0ZXJfQW55IERhdGFzZXQuUmVhZC5BbGwgRGF0YXNldC5SZWFkV3JpdGUuQWxsIEdyb3VwLlJlYWQuQWxsIE1ldGFkYXRhLlZpZXdfQW55IiwiYWNyIjoiMSIsImlwYWRkciI6IjIwMy42Mi4xNzUuNCJ9.fv3ErVcHqb2KRiNsiQ2k2RImcxnCNKmzCMe2Na1_4MTEnDkpmBujqDMsAqzmDdV4fYUFwLKeXD7WSUCa2ftsYDz17j-7EI726b8HbuGemfhjirCRb0n-NQVNmUt2JiMfbF_8LmFO8hnf_Hqer6Coyf9YKWUhkm93kPBgZiZWGOIy2f6yevH2cHqe7wt1HWTmr73x2UhF1fHnkVtR1rflMaajYd4Z9BfWNxj87rwg44FxZkYTYeqOHXOdwyy42-H-wXMUfFwn7RA0zAyKToPrtoADr7qIjBw8dXc9NOyermuh9XfEZMqcIjIYibicRjYVYD0c9q2mSyS6sE9L4VWdTA",
	"datasetId" : "18e69a69-62a4-4da9-aac6-513683f2719f",
	"tableName" : "Product",
	"columns" :[
    {
      "name": "ProductID",
      "dataType": "Int64"
    },
    {
      "name": "Name",
      "dataType": "string"
    },
    {
      "name": "Category",
      "dataType": "string"
    },
    {
      "name": "IsCompete",
      "dataType": "bool"
    },
    {
      "name": "ManufacturedOn",
      "dataType": "DateTime"
    },
    {
      "name": "NewColumn",
      "dataType": "string"
    },
    {
      "name": "NewColumn3",
      "dataType": "string"
    }
  ]
}
Related Power BI documentation

https://msdn.microsoft.com/en-us/library/mt203560.aspx

Sample configuration

Following is a sample proxy service that illustrates how to connect to Power BI with the init operation and use the listGroupTables operation. The sample request for this proxy can be found in the listGroupTables sample request.

Sample Proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse" name="powerbi_listGroupTables" transports="https,http" statistics="disable"
   trace="disable" startOnLoad="true">
   <target>
      <inSequence>
         <property name="apiUrl" expression="json-eval($.apiUrl)" />
         <property name="accessToken" expression="json-eval($.accessToken)" />
         <property name="groupId" expression="json-eval($.groupId)" />
         <property name="datasetId" expression="json-eval($.datasetId)" />
         <powerbi.init>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
            <accessToken>{$ctx:accessToken}</accessToken>
         </powerbi.init>
         <powerbi.listGroupTables>
            <groupId>{$ctx:groupId}</groupId>
            <datasetId>{$ctx:datasetId}</datasetId>
         </powerbi.listGroupTables>
         <respond />
      </inSequence>
      <outSequence>
         <send />
      </outSequence>
   </target>
   <description />
</proxy>  
  • No labels