I was looking to a no-code solution that might help me to build a web page that would show basic weather info, however, here is the step that stopped me for now:
The app uses Weather API - OpenWeatherMap so I tried to set it up in the Data Configurator.
I have the base part set up, but whenever I try to test a request, I get this:
The result was not an array. Maybe the data you’re looking for is inside one of the response object keys?
And unfortunately I have no idea how to proceed and I could not find any documentation about this error.
I saw the other forum post on the topic but unfortunately it did not help me much.
Would appreciate any guidance. Thanks.
Hi Egor, welcome to the community!
What kind of information are you sending to the API and what are you looking to get back?
If you’re trying to get a collection of data (e.g. list of several locations and their weathers), the API response should indeed be an array (list of objects). Sometimes the list itself is nested in the response object, and you need to specify the path where to find the list (e.g. result.data or data.items).
If you’re just looking for the weather in a certain place, you can use Get record (GET) that accepts a single object as a response. I happened to have this API configured in one of my apps, this example uses the device latitude and longitude to get the weather in the user’s location:
Hi Mari, thanks, that was helpful.
In fact I was using /forecast endpoint and was expecting a collection of timed forecast items, but switching to /weather and using one record does the job for me as well, thanks.