Forum Discussion

Alex_Yatlen's avatar
Alex_Yatlen
New Member
6 years ago

Updating data from API faild from app.powerbi.com

Hello everyone

 

I really need your help in setting up an API request through the app.powerbi.com service.

 

The report contains 3 API connections to the same source, but with different login parameters (like a: [Headers = [Authorization = "Basic YWR23W5Ad2asdasd12332Mjlj"]).

 

On the desktop version, the report is updated correctly, and publishing it on app.powerbi.com gives an error when trying to update:

Message:

The 'Authorization' header is only supported when connecting anonymously. These headers can be used with all authentication types: Accept, Accept-Charset, Accept-Encoding, Accept-Language, Cache-Control, Content-Type, If-Modified-Since, Prefer, Range, Referer Table: GetData_Supply_SPB.

 

The data query in the edit query looks like this:

 

Source = Json.Document(Web.Contents("https://online.moysklad.ru/api/remap/1.1/entity/retaildemand?limit=100&offset="&Number.ToText(Number_offset)&"&filter=created<2020-01-01 00:01:00"", [Headers=[Authorization="Basic YWR23W5Ad2asdasd12332Mjlj"]"]]))

 

I created every my query with "Blank Query".

 

How to configure connections so that app.powerbi.com does not give an error when data updating?

Everything works fine on the desktop.

 

 

2 Replies

  • v-eachen-msft's avatar
    v-eachen-msft
    Community Support

    Hi Alex_Yatlen ,

     


    Message:

    The 'Authorization' header is only supported when connecting anonymously. These headers can be used with all authentication types: Accept, Accept-Charset, Accept-Encoding, Accept-Language, Cache-Control, Content-Type, If-Modified-Since, Prefer, Range, Referer Table: GetData_Supply_SPB.

     


    According to this message, do you set the mode to anonymous when setting credentials in the service?

     

    • Alex_Yatlen's avatar
      Alex_Yatlen
      New Member

      hi, v-eachen-msft 

       

      Yes, i switch mode to anonymous.

      I create test report with only one connection to API and app.powerbi.com give new error:

       

      You can't schedule refresh for this dataset because the following data sources currently don't support refresh:

      • Data source for Q_RetailDemand

      Discover Data Sources

      Query contains unsupported function. Function name: Web.Contents

       

       

      and 

       

       

      Parameters haven't been defined for this dataset yet. If you want to set parameters, use the Query Editor. Learn more

       

      Please help me correctly configure it request to api.