Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

8x8 Rest API pagination because of 50 rows limit per request

Hi Everyone. I hope you all are fine.
I am working on Rest API in XML.tables format. it does not give any information on rows count etc.
I need to extract all data from the API at once. 
PFB the screenshot of what I have done,
Created a function (FQueues = = (offset)=>
let
Source = Json.Document(Web.Contents("https://vcc-na8.8x8.com/api/stats/queues.json?offset="&Number.ToText(offset)))
in
Source)

Craeted a query based on that function but it shows error.

List.Generate(
()=>[offset=0, Queue = Fqueues(0)],
each not List.IsEmpty([Queue][Queue]),
each [offset = [offset]+10, Queue=Fqueues([offset])],
each [Queue]
)


I need someone who can help me out on this one.
Thanks in advance.

4 Replies