Do I have to create a field for each item returned from an API?

I am calling an API to get a bunch of data:

And I’d like to save all the data that comes back as “planets (list)”. So I’ve created a field in a data type to accommodate this list:

However, I cannot access the information in that data type.

Am I setting the data correctly? Do I need to have separate fields for each item?

Coming up on the need to do this type of transformation to a number of API calls. I have not yet implemented a solution thus I am subbing the thread.

When looking around it seemed that one solution to try is running an API workflow on a list, then pointing that list to the array of items returned in the API call. Then as it loops through it, it would add each item to the list.

The answer is no, but I’m not sure what you are trying to do exactly.

Once the payload is saved in the field, you will be able to access the data to this exactly like any other Bubble data type. So for example, if you load the item that contain de list of “planets” you will continue to 's speeds to get the list of speeds for all planets.
You could also set a RG for example with type to API Call planets (this is a list in your screenshot)
And in cell, have a text field to show: Current cell’s planet’s name for example.

1 Like