Forum Discussion
Grab all rows from API source with offset and limit in body
Hi all!
I am trying to set it up so I can grab all the rows of data from the Leads table in this query rather then doing multiple queries and then appending them. Unfortuntely I cannot find any source that specifies how to do this with the limit/offset in the body separated from the URL like I have to have it. There is over 8k rows and I can only pull 500 at once.
Here is the code I have right now:
let
body = "
{
""id"":""123"",
""method"":""getLeads"",
""params"":{
""where"":{
},
""limit"":""500"",
""offset"":""0""
}
}",
Data = Json.Document(Web.Contents("https://api.sharpspring.com/pubapi/v1.2/?accountID=###########&secretKey=###########", [Content=Text.ToBinary(body), Headers=[#"Content-Type"="application/json"]]))
in
Data
I have never struggled this bad to obtain the data I need for a project, any and all help would be greatly appreciated.
Thanks in advance!
5 Replies
- suchomelbHelper I
You must have that link ready to copy/paste at a moments notice because I've seen you post that as a response to this type of issue multiple times in other threads.
Unfortunately there is no detail in that link to actually how to apply the solution. I have no clue what to do with it or where to start.
Thank you though for trying to help. I'm just glad to get a response finally.
- lbendlinSuper User
As you can probably appreciate it is nearly impossible to help with API queries without access to said API (which you may not be willing to provide for understandable reasons)