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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
laciodrom_80
Helper IV
Helper IV

Unsupported Media Type (415) with Post OData

Hi all,

I'm trying to call a post OData but unfortunally I have this error: Unsupported Media Type (415)

Instead, with get calls, no problems Smiley Frustrated

Here my call:

let

AccessTokenHeader = "Bearer xxx"
myUrl = https://odata-dev.azurewebsites.net/odata/... content = "{ ""GetTrackProcessesParameters"":
{ ""@odata.type"":""#MyEntities.GetTrackProcessesParameters"", ""DateFrom"": ""2019-01-01"", ""DateTo"": ""2019-01-03"", ""ProcessTypeCode"": ""CODE1"", ""ActivityTypeCodes"": """" } }", Source = Json.Document(Web.Contents(myUrl, [Headers=[Authorization=AccessTokenHeader, ContentType="application/json", CacheControl="no-cache"], Content=Text.ToBinary(content)])) in Source

Any suggestion?!?

 

Thanks in advance

Luca
2 REPLIES 2
v-yulgu-msft
Employee
Employee

Hi @laciodrom_80 ,

 

This similar thread pointed that such an error might be caused by the cached data from OData feeds in Power BI desktop. Please check if the provided solutions apply to your scenario.

 

Best regards,

Yuliana Gu

 

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yulgu-msft,

 

yes I saw this similar post but unfortunally the suggested solution didn't solve the problem. I'm not using GetData, but Query Editor because I first have to get a token to use then into the OData body request.

Anyway I have no issues doing a Get OData Smiley Frustrated

Luca

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.