Write API endpoint for querying data #3

Open
opened 2025-08-25 13:40:59 +02:00 by oysteikt · 3 comments
Owner

Maybe the following endpoints?

  • /activity
  • /activity?start=<timestamp>&end=<timestamp>

Provides an accumulated number representing playtime for every day in the frame given.

  • /sessions
  • /sessions?start=<timestamp>&end=<timestamp>

Provides a list of sessions with username and start time falling in between the frame given

  • /stats
  • /stats?start=<timestamp>&end=<timestamp>

Stats could be things such as:

  • total playtime, maybe per player
  • average activity over a week, maybe per hour
  • more?

Do we need anything to fetch player avatars, or should that be done externally?

Maybe the following endpoints? - `/activity` - `/activity?start=<timestamp>&end=<timestamp>` Provides an accumulated number representing playtime for every day in the frame given. - `/sessions` - `/sessions?start=<timestamp>&end=<timestamp>` Provides a list of sessions with username and start time falling in between the frame given - `/stats` - `/stats?start=<timestamp>&end=<timestamp>` Stats could be things such as: - total playtime, maybe per player - average activity over a week, maybe per hour - more? Do we need anything to fetch player avatars, or should that be done externally?
Owner

To fetch the player avatars you can use the official API.

To fetch the player avatars you can use the official [API](https://mojang-api-docs.gapple.pw/no-auth/uuid-to-profile).
Author
Owner

It seems we need to edit the ingester to store player UUIDs then. Currently, it only stores player names

It seems we need to edit the ingester to store player UUIDs then. Currently, it only stores player names
Owner
https://mojang-api-docs.gapple.pw/no-auth/username-to-uuid-get
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Projects/minecraft-heatmap#3