Array Parameter in GET request

I need to send a GET request for weather data. One of the parameters is a list. If I send a single value in that parameter, all is well. As soon as I add another value, I get an error message. (The full link works 100% in postman. I presume Bubble works a bit different)
Any advice? Thanks!

Link: https://api.open-meteo.com/v1/forecast?latitude=-26.71&longitude=27.11&timezone=Africa/Cairo&daily=temperature_2m_max,temperature_2m_min,precipitation_sum,et0_fao_evapotranspiration&start_date=2023-02-26&end_date=2023-02-26

curl: curl --location ‘https://api.open-meteo.com/v1/forecast?latitude=-26.71&longitude=27.11&timezone=Africa%2FCairo&daily=temperature_2m_max%2Ctemperature_2m_min%2Cprecipitation_sum%2Cet0_fao_evapotranspiration&start_date=2023-02-26&end_date=2023-02-26

Error with multiple value with the “daily” parameter:

The format of the URL needs to be like this:

https://api.open-meteo.com/v1/forecast?latitude=-26.71&longitude=27.11&timezone=Africa/Cairo&daily=temperature_2m_max&daily=temperature_2m_min&daily=precipitation_sum&daily=et0_fao_evapotranspiration&start_date=2023-02-26&end_date=2023-02-26

To do that dynamically in a GET request you’ll need to make the entire ‘daily’ parameter a single dynamic value and then construct the string correctly inside the dynamic value (both in the API connector and in the datasource on you pages).

1 Like

Clever man! Works like a bomb. Thanks!