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.
To get the Order Details, I need to use a POST.
Here is my current code:
let
url = "https://ecomdash.azure-api.net/api",
Path = "orders/getOrder",
Headers=[#"ecd-Subscription-Key"="999999", #"Ocp-Apim-Subscription-Key"="78eec1864fbc46cba0209cc7efaf8bd0", ContentType="application/json"],
Body = "{""OrderId"": 25243048}",
JsonResponse = Web.Contents(
url,
[RelativePath = Path,
Headers = Headers,
Content = Text.ToBinary(Body)]
),
Result = Json.Document(JsonResponse)
in
Result
I get this result,
DataSource.Error: Web.Contents failed to get contents from 'https://ecomdash.azure-api.net/api/orders/getOrder' (503): System Maintenance
Details:
DataSourceKind=Web
DataSourcePath=https://ecomdash.azure-api.net/api/orders/getOrder
Url=https://ecomdash.azure-api.net/api/orders/getOrder
Any help would be greatly appreciated.
The below screenshot displays the results from the interactive API as an example.
https://ecomdash.azure-api.net/api/orders/getOrder
POST https://ecomdash.azure-api.net/api/orders/getOrder HTTP/1.1 Host: ecomdash.azure-api.net ecd-subscription-key: 8888-88888-8888 Content-Type: application/json Ocp-Apim-Subscription-Key: •••••••••••••••••••••••••••••••• { "OrderId": 252430848 }
Are you sure the order number should be sent as a number rather than a text?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.