How do I save data from REST method to an aggregate?

What are the steps to save the JSON data from a Consumed REST API and save it to an aggregate.

Hi Tony,

You cannot save the result of a JSON Data to an aggregate.

You can get the result in an OutSystems structure which can have repeating elements called Lists.

An aggragate also returns a a list of data retrieved from the database.

To save data in a database you can use the <entity>Create or <entity>CreateOrUpdate actions that OutSystems automatically provides for your entities.

If the JSON structure contains a list, you can use a foreach and save each individual list item to an entity.

To learn more about OutSystems concepts related to your question I suggest you read the following: