Admin Portal vs API creation of an entry; Need custom action for both

System Information
  • Strapi Version: 3.4.5
  • Operating System: Windows 10
  • Database: mongoDB
  • Node Version: v14.15.0

I am having some trouble understanding what functions are being called and the order.

My senario. I have a strapi endpoint that gets called, that needs to open a 3rd party ticket, get info from the 3rd party ticket, and send all the information to a messaging platform (Webex Teams). Information from the 3rd party ticket, and messaging platform gets sent back to the api consumer. This is working perfectly when the API is called. When creating an entry from the admin panel of strapi, none of the logic gets fired, and only the data is saved in the database.

Are the only methods called when the admin panel creates the entry the beforeCreate and afterCreate?

I have tried overriding the create in both the controller, and the service, but do not see any messages that I have logged as a test.

What might you suggest for this?

There are two types of actions (as you have figured out):

End Users => REST/GraphQL “typical” endpoints => the model controllers and services
Admin Users => The Content-Manager plugin has it’s own internal API which uses different logic but in the end calls the same strapi.query() that the end user services do.

Currently yes, the only way to get a unified set of actions regardless of where the request is coming from is via the beforeX/afterX lifecycles.

Alternatively you modify/create the custom end-user controller and then extend the content-manager plugin controller/service to perform a similar logic.

Where can I find information on extending the content-manager? Will it have access to the same