March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Olá Pessoal
sou novo em conexões com API em json. queria saber se tem como eu alterar a quantidade de paginas do exemplo abaixo
Preciso alterar "totalRegistrosPagina" de "20" para "100" ou "all pages", como faço?
Hi @v-jingzhang
This is the API documents https://documenter.getpostman.com/view/2228538/Szf6Yoqz?version=latest#45f44e9b-5067-4158-b155-ae70e...
I think Its can be usefull
best regards
dear friend, thanks for trying help me, but, doesnt work.
Lets try again. I will translate the picuture of the topic
listResults: List
totalRecords: 292
totalrecordspage: 20
currentpage: 1
totalpages: 15
listmessage: list
flagErro: FALSE
Well, the question is... when I convert to a table, Poquer Query only show the current page with 20 records, how can I convert all records from all pages in a single table?
Hi @aepMSC
It seems currently the request gets the 20 records on the page 1. Do you have any document about how to use this API? For example, you may refer to this open Qld wildlife data API. It lists the variables which can be included in the URL. If we use a variable that not exists in the list, the API will not deal with it.
I don't know which variables the API you are connecting to would accept. You could refer to its document or get in touch with its author/owner to find out which variables it can accept to modify the number of records returned.
Hope this helps.
Jing
Hi @aepMSC
It depends on whether the API accepts a query parameter to specify the number of pages requested. You can first refer to the API's document to find out how to use it and what parameters it can accept. If it can accept a parameter like pages, you can try modifying the Souce code like below. Usually API documents will have examples about how to modify the URLs.
Source = Json.Document(Web.Contents("https://apiurl?pages=100"))
or
Source = Json.Document(Web.Contents("https://apiurl",[Query=[pages=100]]))
Reference:
Getting Started with API's in Power Query • My Online Training Hub
Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.
Friend, thanks for reply me, but, wich place you advise to insert this Query?
let
Fonte = Json.Document(Web.Contents("url", [Headers=[#"Content-Type"="application/json", Authorization="Basic 0000"]]))
in
Fonte
Hi @aepMSC
You could try this:
let
Fonte = Json.Document(Web.Contents("url", [Headers=[#"Content-Type"="application/json", Authorization="Basic 0000"], Query=[pages="100"]]))
in
Fonte
Modify the parameter name accordingly.
Regards,
Jing
If this post helps, please Accept it as the solution to help other members find it.