Migrating API ACTION

  1. Your route for the action did not specify /api.
  2. If you want all routes starts with /api, you may specify #[Route('/api')] above the class, see the generated ApiController as example).
  3. Also read Clearing Symfony Cache.