Developers
Player API
Learn how to utilise our player API with Analyse.
You can utilise our player api to get information about players such as their total playtime, last join date alongside custom statistics. This is useful for things like player analytics, player rankings, and player search.
Unlike our Server API, this API requires an API Token which can be located within your server settings. When you generate a token, you'll need to save this as it will only be shown once for security reasons. You can always regenerate the token if you wish.
All player requests made to Analyse require the Authorization
header with Bearer <token>
as the value. Our current base url for all endpoints is https://app.analyse.net/api/v1/server/
.
Get Player
Get basic information about a player from their username or uuid.
- URL:
player/<username|uuid>
- Method:
GET
Example Response (player/Siri
):
{ "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 } ] }, "cached": true // This will only exist if the response has been cached.}
Statistic Leaderboard
View the top 10 players by a specific statistic.
- URL:
leaderboard/<placeholder>
- Method:
GET
Example Response (leaderboard/player_kills
):
{ "leaderboard": { "current_page": 1, "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 } ], "first_page_url": "https:\/\/app.analyse.net\/api\/v1\/server\/leaderboard\/player_kills?page=1", "from": 1, "last_page": 43, "last_page_url": "https:\/\/app.analyse.net\/api\/v1\/server\/leaderboard\/player_kills?page=43", "next_page_url": "https:\/\/app.analyse.net\/api\/v1\/server\/leaderboard\/player_kills?page=2", "path": "https:\/\/app.analyse.net\/api\/v1\/server\/leaderboard\/player_kills", "per_page": 10, "prev_page_url": null, "to": 10, "total": 423 }}