JupyterLab extension to get info from hub api

I want to develop an extension for jupyterlab which gets users list from hub api and show it to the user to do something. I’m a bit confused about backend and frontend. I don’t know if I would be able to send http request from frontend to hub api and get the users list. Or do I have to do it in server side?

I would be happy if someone give me some explanation about extensions with server and client side. Most of the examples are only frontend extensions.

Thanks,