Forum Discussion

Bokazoit's avatar
Bokazoit
Continued Contributor
6 months ago
Solved

Bad request 400 when doing more than 4 API calls

I have this supplier of call data (Dstny) and have come to a sort of deadend on how to move further here, so hope someone in here know a reason or work around.

 

I have 4 API calls:

 

  1. Queues
  2. Groups
  3. Users
  4. Calls

It works like a charm, but here is the issue. Calls have data that I need to seperate into its own table, because it multiplies the call lines ( it tracks who responded the call and was redirected to etc. so a one to many table). 

 

Normally I would dublicate / reference the table - in this instance the call table, to create a table that gives me this one to many realationship. But it is here the trouble start. Whenever I dublicate that table or the user or group table it returns a error 400:

DataSource.Error: Web.Contents kunne ikke hente indhold fra 'https://statistics.connect.dstny.dk/api/report/v1-1/generate' (400): Bad Request
Detaljer:
    DataSourceKind=Web
    DataSourcePath=https://statistics.connect.dstny.dk/api/report/v1-1/generate
    Url=https://statistics.connect.dstny.dk/api/report/v1-1/generate

 

That request only appears when I duplicate / reference the table. I have contacted Dstny support and they say the limit is on Power BI, but from what I read there is a limit in PBI for 120 API calls per minut, so that is not it imho. They also say that another issue might be that PBI creates all the API in one single batch and they only allow for 6 calls within 20 seconds. But that does not sound correct since I create 4 API calls with a secret request and then the data request. That sums in my head to either 4 calls, so below limit, or 8 calls (secret + data), 2 above limit.

 

I have tried to add a delay, but it seems as PBI don't care. It asks for the connection and then create the delay.

 

Anyways, I don't know what to do. Does anyone have experienced something similar and a work around? Just for the record, I have many other data suppliers where it works.

2 Replies