Skip to content

[BUG]: UI - API Tokens - Last Used and Usage Stats not showing any data #2572

@IuliaGaitan

Description

@IuliaGaitan

🐞 Bug Summary

API Tokens Last Used and Usage Stats is not showing any data even though where used.


🧩 Affected Component

Select the area of the project impacted:

  • mcpgateway - API
  • mcpgateway - UI (admin panel)
  • mcpgateway.wrapper - stdio wrapper
  • Federation or Transports
  • CLI, Makefiles, or shell scripts
  • Container setup (Docker/Podman/Compose)
  • Other (explain below)

🔁 Steps to Reproduce

  1. Go to http://localhost:8000/admin/#tokens
  2. Check Last Used
  3. Click Usage Stats

🤔 Results

Last Used is showing always Never.
Usage Stats is not showing any data.

Image

🤔 Expected Behavior

Last Used should be updated each time the token is used.
Usage Stats should show the correct data.


📓 Logs / Error Output

Paste any relevant stack traces or logs here.
⚠️ Do not paste secrets, credentials, or tokens.


🧠 Environment Info

You can retrieve most of this from the /version endpoint.

Key Value
Version or commit v0.128.0
Runtime Python 3.12.3
Platform / OS Linux 6.6.87.2-microsoft-standard-WSL2 (x86_64)
Container none

🧩 Additional Context (optional)

Related with #2390

Metadata

Metadata

Assignees

Labels

SHOULDP2: Important but not vital; high-value items that are not crucial for the immediate releasebugSomething isn't workingpythonPython / backend development (FastAPI)

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions