Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
EPME
Frequent Visitor

Odata feed url repeats parameter

I have a report linked to a OData feed where i pass the API key name as a parameter like this : 

 

 Source = OData.Feed("https://apiurl.com/" & "/api/v1", null, [ApiKeyName="apikeyname"])

 

This worked perfectly fine at first but suddenly it started giving an error on one particular table in the feed. 
I can access the table, but once i filter it or remove columns all columns status bar turns red and clicking on the filter dropdown I can see this error message at the bottom:

 

[DataSource.Error] OData: Request failed: The remote server returned an error: (414) URI Too Long. (URI Too Long)

 


Trying to reference this table from another table causes the query to fail with this more helpfull error message: 

 

DataSource.Error: OData: Request failed: The remote server returned an error: (414) URI Too Long. (URI Too Long)
Details:
    DataSourceKind=OData
    DataSourcePath=https://apiurl.com/api/v1/TableName
    Url=https://apiurl.com/api/v1/TableName?x-co-odataapikey="apikeyname"&x-co-odataapikey="apikeyname"&x-co-odataapikey="apikeyname"&x-co-odataapikey="apikeyname"&x-co-odataapikey="apikeyname"&x-co-odataapikey="apikeyname"&x-co-odataapikey="apikeyname"&x-co-odataapikey="apikeyname"&x-co-odataapikey="apikeyname"&x-co-odataapikey="apikeyname"&x-co-odataapikey="apikeyname"&x-co-odataapikey="apikeyname"&x-co-odataapikey="apikeyname"&x-co-odataapikey="apikeyname"&x-co-odataapikey="apikeyname"&x-co-odataapikey="apikeyname"&x-co-odataapikey="apikeyname"&x-co-odataapikey="apikeyname"&x-co-odataapikey="apikeyname"&x-co-odataapikey="apikeyname"&x-co-odataapikey="apikeyname"&x-co-odataapikey="apikeyname"&x-co-odataapikey="apikeyname"&x-co-odataapikey="apikeyname"&x-co-odataapikey="apikeyname"&x-co-odataapikey="apikeyname"&x-co-od...

 

So obviously there's something wrong with the URL PowerBI sends out, but I have no clue why it's repeating the parameter so many times. I have no experience using OData as a source  and I can't find anything online about what could cause this.  The other tables in the feed still work perfectly fine so I really don't know what to do. 

Any help would be appreciated. 

 

3 REPLIES 3
EPME
Frequent Visitor

For future reference, this was solved by deleting some unused columns in the table and filtering the remaining table on a IDcolumn instead of the IDName column. No clue as to why that fixed it or what was wrong with it in the first place. 

Syndicate_Admin
Administrator
Administrator

You are supposed to include the api key placeholder in the base URL.  Please read the documentation again.

 

Web.Contents - PowerQuery M | Microsoft Learn

I've read both the web service and odata documentation 20 times now and still can't see what I'm doing wrong. I can't find anything about putting it in the base url. It only says to pass it using the ApiKeyName parameter like I do. 

 

  • ApiKeyName: If the target site has a notion of an API key, this parameter can be used to specify the name (not the value) of the key parameter that must be used in the URL. The actual key value is provided in the credential

And the example looks exactly like how I do it. 

Web.Contents("https://contoso.com/api/customers/get", [ApiKeyName="api_key"])

 

I can access all other tables perfectly fine,  even the one giving me trouble only gives the error after I try to filter it. This just started this week, before that everything worked perfectly . 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors