Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hello,
I want to call an API that feeds me information following cells in a table using a relative path.
Here is my API call :
let
apiURL = "https://api.insee.fr/entreprises/sirene/V3/siret/",
options = [Headers=[Authorization="Bearer XXXXXXXX", ConsumerKey="XXXXXXXXXX", ConsumerSecret="XXXXXX", Accept="application/json"], RelativePath = #"ENTREPRISES"[SIRET]],
resultat = Json.Document(Web.Contents(apiURL,options))
in
resultat
I wish to have a final URL as well : https://api.insee.fr/entreprises/sirene/V3/siret/{"ENTREPRISES"[SIRET]}
My concern is that when I want to launch the call I have the following error message:
Expression.Error : Sorry ... We were unable to convert a value of type List to type Text.
Détails :
Value=[List]
Type=[Type]
How can I solve this problem please ?
Thanks in advance
Alexis
Solved! Go to Solution.
Hi @AlexisPREVOT ,
In your RelativePath value, #"ENTREPRISES"[SIRET] returns a whole list not a specific text value so it occurs the convert error.
If you want to quote a specific text value from the list to use it as RelativePath, you can write like this:
#"ENTREPRISES"[SIRET]{0} // 0 means that it extracts the first value in this list and so on
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @AlexisPREVOT ,
In your RelativePath value, #"ENTREPRISES"[SIRET] returns a whole list not a specific text value so it occurs the convert error.
If you want to quote a specific text value from the list to use it as RelativePath, you can write like this:
#"ENTREPRISES"[SIRET]{0} // 0 means that it extracts the first value in this list and so on
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 5 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 9 | |
| 8 | |
| 7 | |
| 5 | |
| 5 |