Forum Discussion
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
- mahoneypat
Microsoft Employee
What error are you seeing? I would rename a couple things to avoid confusion. For example, [Queue][Queue] or having "offset" both in the url string and the parameter name. That probably isn't the issue, but is a little confusing. Also, you mentioned XML tables in the description but you are using Json.Document in the function.
Pat
- AnonymousNot applicable
HIi pat,
thankyou for showing concern.
I converted xml intio json. I was just trying new things. I am confused about the concept because im new to power query.
i just need to extract all data from an api which has 50 rows limit.
let me know what you need from me to make it clear for you.
best,
saad.
- AnonymousNot applicable
You provided the solution to the same api issue by list.number and error message. But i don't know where to use these functions. Need your guidabnce on that.
- v-jingzhang
Community Support
Hi Anonymous
Not sure but I hope these links will be helpful:
How to do Pagination on a REST API in Power Query (Part 1) - YouTube
powerbi - How to get paginated data from API in Power BI - Stack Overflow
Best Regards,
Community Support Team _ Jing