Show top users for a retool app

  • Goal: I want to display the top viewers of my retool app on the side menu
  • Context: My team and I have an app we use a lot for tracking metrics (basically just an app that renders SQL)

The UI can be super basic. Imagine just a list of top users, something like (John: 50 views, Alex: 35 views....)

I want to be able to show the team who has viewed/used the app the most in the last week. Is this something retool supports?

Hey Gustavo,

Retool has Audit Logs and if you're self hosted you are able to query those. See info here

Unfortunately I don't know of a way of doing this if you're using retool cloud.

However, you could build this yourself with a simple table in a retool database and a query that runs on page load.

1 Like

Hey @gustavo!

I believe (if you have the option) you can setup a Retool API token and then create an OpenAPI resource using Retool's schema and the newly created token.

One of the many endpoints that you can access with the proper scope is the /usage set which can be used to access pretty much exactly what you are asking for:

Cheers!

ETA: The /usage/user_details endpoint has even more granular data in the viewer_property array of its return info.

2 Likes

Thanks for flagging this @pyrrho! Good to know this is here!

2 Likes

Thanks for these great solutions to tracking app usage per user.

Just to add some pricing/plan info here -

  1. As @MiguelOrtiz mentions, if you're self hosting, you can query your own database that powers your Retool instance. This is true for all self hosting plans from Free up to Enterprise.
  2. Again as @MiguelOrtiz mentions, if you're on Retool Cloud, you could work around the limitations by creating your own logs. This is the best workaround if you're on Retool Cloud's Free, Team, or Business plans.
  3. If you're on Enterprise (Cloud or self hosted), you can take advantage of the full Retool API, as @pyrrho demonstrates

Note that these solutions only work for apps that require authenticating into Retool. We don't have any way to track user information on public apps.

1 Like