Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Saadii_360
Helper I
Helper I

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 4
Saadii_360
Helper I
Helper I

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.

mahoneypat
Employee
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

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


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.


Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors