Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
I created a function to do paginated API calls, but the output is containing %20 instead of a space, which the endpoint is not accepting.
getProjectURIpaginatedX
(projectNo as text, objectType as text, attrList as text, topVal as number, skipVal as number)=>
let
GetWebContents =
Web.Contents(
"https://api-us.drofus.com/api/company/",
[
RelativePath= Text.Replace(
projectNo
& "/" & objectType
& "?$select=" & attrList
& "&$top=" & Number.ToText(topVal)
& "&$skip=" & Number.ToText(skipVal),
"%20", " ")
]
),
GetBody = Json.Document(GetWebContents)
in
GetBody
I tried inserting a Text.Replace on the RelativePath, but I still get a 400 HTTP error.
Thank you for any advice!
Solved! Go to Solution.
The 400 http error was not due to the %20 but due to a trailing comma and space in the AttrList column.
My apologies.
The 400 http error was not due to the %20 but due to a trailing comma and space in the AttrList column.
My apologies.
Here is the query that is calling the function:
The column AttrList was generated with grouping Lines.ToText.
= Table.Group(#"01addNdxGroup", {"ndxGroup"}, {{"attr", each Lines.ToText(List.Sort(List.Distinct([dRofus.ID])), ", "), type text}})