Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi everyone,
There are several posts with the same issue I am having, but none of the proposed solutions are working for me.
I am doing something wrong with how I construct the body into a record - which is why I am getting the expression error: We cannot convert a value of type Record to type Number.
I have tried constructing my body directly into a record, and then using Json.FromValue(body), but that doesn't work either.
I have included my code snippets for trying Json.FromValue(body) as well as Text.ToBinary(body)
I am using the the snyk api and this specific endpoint:
Any help would be awesome!!
let
url = "https://api.snyk.io/api/v1/reporting/issues/latest?page=1&perPage=100&sortBy=issueTitle&order=asc&groupBy=issue",
body = "
{
""filters"":{
""orgs"": [""d6dsfdk-df4d-4dd4-add9-fcfoobar5dac7acb""]
}
}
",
Source = Json.Document(Web.Contents(url),[
Headers = [#"Content-Type"="application/json",#"Authorization"="token foobar-foobar-foobar-foobar-foobar"],
Content = Text.ToBinary(body)
])
in
Source
let
url = "https://api.snyk.io/api/v1/reporting/issues/latest?page=1&perPage=100&sortBy=issueTitle&order=asc&groupBy=issue",
body = [
filters = [
orgs = "ddfed-dfdsf-dfds-dfds-dfdsfd"
]
]
,
Source = Json.Document(Web.Contents(url),[
Headers = [#"Content-Type"="application/json",#"Authorization"="token foobar-foo-foo-foo-foobar"],
Content=Json.FromValue(body)
])
in
Source
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 9 | |
| 8 | |
| 7 | |
| 5 | |
| 5 |