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.
Hi, guys!
Can anyone help me identify where I'm going wrong in this API query?
I have this API query that searches for the system's projects. Records are being returned ok
let
Fonte =
Json.Document(
Web.Contents(
"https://empresa.cvcrm.com.br/",
[
RelativePath = "api/cvio/empreendimento", // O que altera sempre será o RelativePath -> Que é a consulta que deseja fazer, cuidar sempre com os vários tipos de consultas.
Headers =
[
accept = "application/json",
email = _email,
token = _token
]
]
)
),
#"Converted to Table" = Table.FromList(Fonte, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"idempreendimento", "nome", "cidade", "estado", "sigla", "logo", "foto_listagem", "foto"}, {"idempreendimento", "nome", "cidade", "estado", "sigla", "logo", "foto_listagem", "foto"}),
#"Changed Type" = Table.TransformColumnTypes(#"Expanded Column1",{{"idempreendimento", type text}, {"nome", type text}, {"cidade", type text}, {"estado", type text}, {"sigla", type text}, {"logo", type text}, {"foto_listagem", type text}, {"foto", type text}})
in
#"Changed Type"
Here are the parameters of this query
I created the code below to return all the details of the projects from the query above
let
Fonte =
Json.Document(
Web.Contents(
"https://empresa.cvcrm.com.br/", //Mantém o host da consulta
[
RelativePath = "api/cvio/empreendimento/{idEmpreendimento}" ,
Headers =
[
accept = "application/json",
email = _email,
token = _token
]
]
)
)
in
Fonte
Here are the necessary parameters
When invoking, information is displayed that the enterprise is not found
Can anyone tell me where I might be going wrong?
Thanks so much
Hi @kasife ,
According to your description, your question is that you can't find the corresponding data when querying the data using the REST API.
You can check the query process by referring to the following link:
How to Download JSON Data in Power BI from Web Sources (codingsight.com)
Best Regards,
Gallen Luo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 |
---|---|
101 | |
99 | |
76 | |
67 | |
61 |
User | Count |
---|---|
142 | |
106 | |
103 | |
85 | |
70 |