Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hey everyone,
I need to query an API Restful through all the pages. I've tried all the methods from other posts in here. But I still couldn't manage to succeed.
Here's my query.
let
apiUrl = "https://api.spotter.exactsales.com.br/api/v2/listarlead?page=1DtCadastroInicio=2016-03-28T14:59:39.000Z",
options = [Headers =[#"mytoken"]],
result = Web.Contents(apiUrl , options),
#"JSON Importado" = Json.Document(result,1252),
#"Convertido em Tabela" = Table.FromList(#"JSON Importado", Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expandido Column1" = Table.ExpandRecordColumn(#"Convertido em Tabela", "Column1", {"id", "Empresa", "DtCadastro", "DtAtualizacao", "Contatos", "Mercado", "Origem", "SubOrigem", "PreVendedor", "Grupo", "Vendedor", "TelEmpresa", "LinkPublico", "LinkMkt", "LinkFeedBack", "Site", "ProdutoLead", "Endereco", "Cidade", "Estado", "Pais", "Obs", "Etapa", "Dores", "Produtos", "CamposPersonalizados", "Etapas"}, {"Column1.id", "Column1.Empresa", "Column1.DtCadastro", "Column1.DtAtualizacao", "Column1.Contatos", "Column1.Mercado", "Column1.Origem", "Column1.SubOrigem", "Column1.PreVendedor", "Column1.Grupo", "Column1.Vendedor", "Column1.TelEmpresa", "Column1.LinkPublico", "Column1.LinkMkt", "Column1.LinkFeedBack", "Column1.Site", "Column1.ProdutoLead", "Column1.Endereco", "Column1.Cidade", "Column1.Estado", "Column1.Pais", "Column1.Obs", "Column1.Etapa", "Column1.Dores", "Column1.Produtos", "Column1.CamposPersonalizados", "Column1.Etapas"})
in
#"Expandido Column1"
The API returns a result limited to 100 registers. So, the number of pages will keep growing. Although, to simplify, if I could just create a range for wich pages to navigate would be awesome.
Solved! Go to Solution.
Hi @eduardomaia,
Please have a look at below articles to see if they helpful to your scenario:
Loop through Multiple Web Pages using Power Query
Iterating over multiple pages of web data using Power Query
Regards,
Yuliana Gu
Hi @eduardomaia,
Please have a look at below articles to see if they helpful to your scenario:
Loop through Multiple Web Pages using Power Query
Iterating over multiple pages of web data using Power Query
Regards,
Yuliana Gu
Thanks a Lot! When I was searching for a solution I didn't found the post Loop through Multiple Web Pages using Power Query
Simple and eficient... it worked here.
Here is a recent link that could work:
Loop through Multiple Web Pages using Power Query - Adatis
Regards,
Jessica
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
99 | |
80 | |
70 | |
59 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |