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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Richard_Halsall
Helper IV
Helper IV

Paginated REST API Unknown Records

I am hoping somebody can help as I just keep hitting a dead end ... I must of tried 10 variations of the code but no success.

 

I have attached the m query which works fine when the number of items to retrieve is hardcoded i.e. limit:10

I do not know the total number of items as it is not passed by the API, but I believe I need to loop through these records and then join all of them thus avoiding the time out issues I am currently experiencing 

 

If anybody could provide guidance i would be grateful. Thanks

let
    Key = "abcde",
    Board = "9595687423",
    Source = Web.Contents(
 
[ RelativePath = "v2",
Headers=[
#"Method"="POST",
#"Content-Type"="application/json",
#"Authorization"="Bearer " & Key
],
Content=Text.ToBinary("{""query"": ""query { boards(ids: " & Board & ") { items (limit:10) { name, updated_at, group { title }, columns: column_values { title, text } } } }""}")
]
    ),
    Data = Table.FromList(Json.Document(Source)[data][boards]{0}[items], Record.FieldValues, {"Title", "UpdatedAt", "Group", "Columns"}),
    #"Monday" = Table.FromRecords(Table.TransformRows(Data, each 
        List.Accumulate([Columns], [
            Title = [Title],
            UpdateDate = [UpdatedAt],
            Group = [Group][title]
        ], (state, current) => Record.AddField(state, current[title], current[text]) ) 
    ))
in
    Monday
1 REPLY 1
rubayatyasmin
Community Champion
Community Champion

Hi, @Richard_Halsall 

 

Monday API accepts Page parameter so, you use this parameter to loop through pages. Also, you might want to post it in monday api forum. 

 

 

rubayatyasmin_0-1697001837548.png

 

Also I found some thread that might be helpful 

https://community.monday.com/t/pagination-with-graph-ql-api-queries/39079

 

https://community.monday.com/t/pagination-info-in-query-results/10278

 

https://community.snaplogic.com/t5/designing-and-running-pipelines/paginated-rest-get-calls-against-...

 

rubayatyasmin_0-1689517080227.png

 


Did I answer your question? Mark my post as a solution!super-user-logo

Proud to be a Super User!


Helpful resources

Announcements
FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.