expose rest records of a static table outsystems

I want to expose a rest api with a method that gives the records of the static table. What i have now the method is going to return a list with the atributes of the records but then i dont know what the records are if i want to create something using the id of the static table.

Hi Flávio,

Did you try to query the static entity to get the list of records from it and use it as output of the action?


Cheers,

AP

Hi Flávio,

I do not understand what you're exactly trying to achieve.

The Label attribute of a Static Entity contains the name of the static entity record. 

So if you want to fetch that value, you can use the Get operation of that static entity and use it like this:

GetLocale(Entities.Locale.English).Locale.Label

Regards,

Nordin

Hi Flávio,

Am not sure what you want in output. If you are trying to get the records of a static entity and want to expose them in a REST API. Then you need to simply create a RestAPI method and in that just drag drop the static entity. So you will get the list of all records from this aggregate. Then assign the list in output parameter of method. Datatype of output parameter will be List of type static entity.

Thanks.