app/vmselect: expose available tenants via `/select/tenant_ids` for vmui tenant selector

Author: makasimCreated Sep 29, 2026Updated Oct 1, 2026
Labelsenhancementhelp wantedvmselectvmsinglemultitenancy

Is your feature request related to a problem? Please describe

Currently, vmui relies on the /admin/tenants API to determine whether it should render the tenant selector at the top of the UI.

If vmui can access this endpoint and it returns tenant data, the selector is displayed. However, in typical multitenant deployments, vmauth is placed in front of the VictoriaMetrics cluster and restricts each user to their own tenant. The /admin/* endpoints are intended for admin users with access to all tenants and are usually not exposed through vmauth.

As a result, regular users may not see which tenant they are currently working with in vmui. It can create some confusion as in https://github.com/VictoriaMetrics/VictoriaMetrics/issues/11634.

Describe the solution you'd like

VictoriaLogs already exposes tenant information via /select/tenant_ids. It would be useful to align VictoriaMetrics with this behavior and make the tenant information available through a non-admin API.

The proposed behavior:

  • vmsingle should support /select/tenant_ids and always return an empty JSON result.
  • cluster
    • If the request is authenticated and restricted to a single tenant, the API should return that tenant only.
    • If the request has no tenant information, or the request is made through a multitenant /select path, the API should return all available tenants.

This would allow vmui to determine the current tenant without relying on admin-only APIs and make tenant visibile all the time.

Source: VictoriaMetrics/VictoriaMetrics