Search code examples
powerbiapiary.io

Unable to update a Power BI table schema through the API with or without ApiaryIO


I am using Power BI API. I've got a dataset with some tables and rows.

From Power BI API Console I don't have any issue when retrieving datasets or tables.

However the PUT verb on a table resource to update its schema always returns a 504 - Proxy request timed out

It's the first time I use Apiary IO so it might be its problem and not Power BI update, but that leads me to some questions:

  1. Is there any workaround to test Power BI with, for example, Fiddler? I can type the url and body but I will need an Authorization header with the OAuth2 token if I'm not mistaken. How can I get that? ApiaryIO seems to hide it.
  2. As per Update Schema Documentation the URL with the resource is https://api.powerbi.com/v1.0/myorg/datasets/{myDatasetId}/tables/{myTableName} and the verb is a PUT. What is then the meaning of the "name": "???" parameter that goes in the JSON body? Is it the table's name or something else? I am assuming it's the table name but it seems redundant as I am already accessing the resource {myTableName} as per the given URL.
  3. And my last related question is how to rename a specific table's column without modifying its data? This is what I'm trying to achieve by updating the schema but I don't understand how does Power BI know what column I am trying to rename.

Thank you!


Solution

  • Sorry that you're having trouble. You can get a token in two ways -the right way is to create an app in AAD (here's how). The wrong way ;) is to open the Power BI.com service, in a browser then open fiddler, then press F5 to reload. You should be able to see the Access Token in various requests. If you register an app, you can plug in your App's information in one of the samples we have https://powerbi.microsoft.com/developers, see client app or web app.

    The name you provide in the table is the friendly human readable name that appears in the UI when you're building a report. Without it the system is unusable by humans :).

    Let me get back to you on #3.