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.
Need Help with Invoking API Call with Paramaters.
The API call is as follows. I am passing in the paramater (newsdate)
https://api.sportsdata.io/v3/nba/scores/json/NewsByDate/2020-MAR-08
When I invoke the following:
I get the following error
I believe this has to do with formatting the Parameter, but it has numbers and characters.
Assistance would be greatly appreciated.
Solved! Go to Solution.
I actually figured it out. I had to declare the (newsdate as text) =>
Source = Json.Document(Web.Contents(Text.From("https://api.sportsdata.io/v3/nba/scores/json/NewsByDate/"&(newsdate)&"
Thanks for your guidance.
You need to convert date to text type like below:
Text.From(newsdate)
Or use query parameter instead and try again, please refer to:
https://docs.microsoft.com/en-us/power-query/power-query-query-parameters
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you for the response.
It seems I still have a formatting issue. Teh URL has specific requirements when passing the date - YYYY-MMM-DD or 2020-MAR-07.
Thanks,
Wayne
I would suggest you to use fiddler to catch the actual http request and check if the URL in fiddler is same with that in power query.
Regards,
Jimmy Tao
I actually figured it out. I had to declare the (newsdate as text) =>
Source = Json.Document(Web.Contents(Text.From("https://api.sportsdata.io/v3/nba/scores/json/NewsByDate/"&(newsdate)&"
Thanks for your guidance.
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 |
---|---|
118 | |
105 | |
77 | |
73 | |
52 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |