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.
Hi all.
I am currently working of getting data from a web application into PowerBI. After a bit of work setting up the right request body using content, i know seem to have a type problem.
I am fairly new to PowerQuery and PowerBI, having only used Python to interface with API's before.
My current M code i as follows(with redacted API key):
let
headers = [#"authtoken"="##Hardcoded API Token##"],
input_data = {"input_data:
{
""list_info"": {
""row_count"": 20,
""start_index"": 1,
""sort_field"": ""subject"",
""sort_order"": ""asc"",
""search_fields"": {
""subject"": ""CIS""
}
}
}"},
Source = Json.Document(Web.Contents("https://servicedesk.ntg.com/api/v3/requests", [Headers = headers, Content=Text.ToBinary(input_data)]))
in
Source
and it is showing the following error:
Expression.Error: We cannot Convert a value of type List to Text
Details:
Value=[List]
Type=[Type]
The expected responce body format looks like this:
Can anyone shed some light on a fix, or potential ideas for how to get better understanding of the error?
You need to put quotes before the first brace and after the last brace.
--Nate
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.