I see what you mean now!
Thanks Shekhar…
I added the controller inside the plugin and now it has endpoint like pluginId/ and it the call is working.
I still find it weird that I cannot use endpoints under /api/ existing strapi endpoints.
Do you know any way how to call these data or other custom endpoints from the admin ui ? and not get 401 response + loggedout
I need in my use case to also fetch some data in my plugin from the /api/data endpoints not only things under /pluginId/…