Hey all,

It's been less than a week since we launched our brand new dashboard, and we have now released a new player api to retrieve statistics. This new API is a simple and easy way to get information about players and leaderboards from your server.

Our api will allow you to view custom statistics that you registered in-game via the api, both for individual players and viewing the leaderboard for a specific statistic.

You'll need your API Token to use the api. You can generate one by going to your server settings.

Get Player

For example, if I wanted to view the statistics for a player called Siri, I would make a request to the following endpoint:

GET https://app.analyse.net/api/v1/server/player/<username/uuid>

This would return:

{
  "player": {
    "name": "Siri",
    "uuid": "ed6daf33575b460ba2f3e208a1004c10",
    "created_at": "2022-07-07T11:52:03.000000Z",
    "updated_at": "2022-07-07T11:52:03.000000Z",
    "first_joined_at": "2022-06-26T10:26:03.000000Z",
    "last_logged_in_at": "2022-07-04T05:25:03.000000Z",
    "total_session_time": 11940,
    "statistics": [
      {
        "nickname": "Player Kills",
        "placeholder": "player_kills",
        "value": 182
      },
      {
        "nickname": "Gems",
        "placeholder": "gems_balance",
        "value": 63
      },
      {
        "nickname": "Island Level",
        "placeholder": "is_level",
        "value": 289
      }
    ]
  }
}

Here you can see when the player first joined your Minecraft server (not when Analyse was installed), in addition to the first time they was added to Analyse (via created_at). You'll also be able to see the total time that they have played for and any custom statistics you have registered.

Statistic Leaderboard

What good are statistics if you can't show them to your players? Well, we have a new api to help you with that. You can view the top 10 players by a specific statistic by making a request to the following endpoint:

GET https://app.analyse.net/api/v1/server/leaderboard/<placeholder>

This would return (slightly redacted):

{
  "leaderboard": {
    "data": [
      {
        "name": "oAng3L",
        "uuid": "3e4f490dbe7a41758fb0b36efcf09c80",
        "value": 499
      },
      {
        "name": "Spirum",
        "uuid": "0a566c95361642d6bf09b0c211b0aed2",
        "value": 498
      },
      {
        "name": "Prvxce",
        "uuid": "a8c23d839f3f4bbda6142ce79d823675",
        "value": 497
      },
      {
        "name": "Poglike",
        "uuid": "064ae34830e94e39a45daf020504c7bf",
        "value": 496
      },
      {
        "name": "MikiaSan",
        "uuid": "5efd2548be0f47799636475a176c6a42",
        "value": 495
      },
      {
        "name": "Skufflo",
        "uuid": "a2c8c5b7480c469eb00c70191405c56f",
        "value": 494
      },
      {
        "name": "Axeluri",
        "uuid": "31fbf45108934270ac56795a2e609fb7",
        "value": 493
      },
      {
        "name": "Ashtdns",
        "uuid": "d8bcb14ca7564f46b9cd9f0cc40cbd80",
        "value": 491
      },
      {
        "name": "Frogaroos",
        "uuid": "2b69da83fba94aea83b259d0081b6537",
        "value": 487
      },
      {
        "name": "Toxtricity",
        "uuid": "1ccc773a1e38467998ab1bfb2ab778bc",
        "value": 487
      }
    ]
  }
}

This is perfect for showing player leaderboards within your Discord bot or even on your website. This api is paginated so you can view additional pages by appending ?page=<page_number> to the end of the request.

Check out our Player API docs page for more information on this.

Analyse: The Minecraft Server Analytics Platform

Monitor your Minecraft servers growth with our Minecraft Analytics solution, completely free for Tebex creators.

Start Growing Now
App screenshot