The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I've read through and found no indication to what the real rate limiting is on GET requests. However, when using the admin endpoint for
Admin - Datasets GetDatasetToDataflowsLinksInGroupAsAdmin - REST API (Power BI Power BI REST APIs) |... I get a 429 error significantly faster than say Admin - Datasets GetDatasetsAsAdmin - REST API (Power BI Power BI REST APIs) | Microsoft Learn is there any reason why one endpoint would trigger faster than another?
Using Python via pbipy.
Code as below:
group = 0
while group < len(groups):
id = groups.loc[group,"id"]
if id not in processed_groups: # Only process the group if it hasn't been processed yet
try:
upstream = admin.datasets_upstream_dataflows(group = id)
for data in upstream:
unpacked_data = [value for key, value in data.items()]
upstream_data.append((id, *unpacked_data))
processed_groups.add(id) # Add the group to the set of processed groups
group += 1
time.sleep(2)
except Exception as e:
if '429' in str(e):
print("429 error, sleeping for 10 minutes")
time.sleep(600)
else:
upstream_data.append((id, str(e)))
processed_groups.add(id) # Add the group to the set of processed groups
group += 1
else:
group += 1 # If the group has already been processed, move on to the next one
Solved! Go to Solution.
Hi @GD-L ,
429 error is a common error that means 'Too Many Requests' sent so that the remote server has blocked these requests.
Since your API has encountered a 429 error, that means you have encountered a limitation from the server side, no matter how many time periods you encountered this 429 return error message, the root cause of the error you encountered is the same, my suggestion is that you can follow the suggestions in this forum to do the optimization:
API throttling limits? http response 429 - Microsoft Fabric Community
About why this API above receives errors faster, my understanding is that the above API is to query within the group and get the results, while the following one directly searches for all dataset information at the tenant level using admin permissions, the query scope is different, which leads to a difference in the speed of error reporting.
https://learn.microsoft.com/en-us/rest/api/power-bi/admin/datasets-get-datasets-as-admin
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @GD-L ,
429 error is a common error that means 'Too Many Requests' sent so that the remote server has blocked these requests.
Since your API has encountered a 429 error, that means you have encountered a limitation from the server side, no matter how many time periods you encountered this 429 return error message, the root cause of the error you encountered is the same, my suggestion is that you can follow the suggestions in this forum to do the optimization:
API throttling limits? http response 429 - Microsoft Fabric Community
About why this API above receives errors faster, my understanding is that the above API is to query within the group and get the results, while the following one directly searches for all dataset information at the tenant level using admin permissions, the query scope is different, which leads to a difference in the speed of error reporting.
https://learn.microsoft.com/en-us/rest/api/power-bi/admin/datasets-get-datasets-as-admin
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.