Hello,
Is there a way to reuse a consumed API from another module or do I need to consume again the API in the module that is needed?
I don't know if consuming the same API in different modules is the best option.
Thanks in advance,
Edgardo
Hello @Edgardo Pérez,
You can consume an API in the module where you need it and while you cannot make the consumed method 'Public', however, you could: 1) use the consumed API method in a Server Action;2) make the Action Public; 3) reuse the Action in other modules/ applications by adding the action as a dependency.
For e.g.
Application A consumes the following method:
Create a server action to use the method and make it Public:
Now you can add the public server action as a dependency in other modules / applications using 'Manage Dependencies':
Regards,
AJ
Hi
You can create a module named xxx_IS, and create some public server actions in this module to consume the apis. And when other modules want to use the apis, then can use the server actions in that module.