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
Fredy
New Member

DataSource.Error: Web.Contents failed to get contents from{URL} (404): Not Found, working in Postman

Hi every one,

I'm receiving 404 error code when i try to request the url to get some data from a partner.

 

The error:

 

DataSource.Error: Web.Contents failed to get contents from 'https://identity.za.mixtelematics.com/events/assets/from/20230522101010/to/20230524000000' (404): Not Found
Details:
DataSourceKind=Web
DataSourcePath=https://identity.za.mixtelematics.com/events/assets/from/20230522101010/to/20230524000000
Url=https://identity.za.mixtelematics.com/events/assets/from/20230522101010/to/20230524000000

 

 

The code:

let
baseUrl = baseURL,
relativePath = "/events/assets/from/20230522101010/to/20230524000000",
authToken = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",      // Generated Token
headers = [
Authorization = "Bearer " & authToken,
#"Content-Type" = "application/json"
],


url = baseUrl & relativePath,


bodyJson = "{ ""EntityIds"": [
1364697368073863168, 1377075261210570752, 1377075986498007040, 1377076326538620928, 1359320615020978176, 1359320613981949952, 1359320616934739968, 1359320616019222528
],
""EventTypeIDs"": [ -9097769333405069134, -1712533633274024830, 6698868737266655739, -480217926216925926, -2551671922416006333, 2903108875463146536
]
}",

 


response = Web.Contents(url, [Headers = headers, Content = Text.ToBinary(bodyJson)]),

 


jsonResponse = Json.Document(response)
in
jsonResponse

 

 

Postman ScreenShoots:

Request_Autorization.pngRequest_Body.pngRequest_Header.png

 

 

Please, Help

What am I doing wrong?

0 REPLIES 0

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.