PlayHive API Updates

Technical updates for the PlayHive REST API

PlayHive API Updates

SkyWars: Classic and Kits API endpoints

APIs for SkyWars: Classic and Kits are now available.

For both, statistics are only available for all-time:

/game/all/sky-classic/{player}

/game/all/sky-kits/{player}

Please note XP is shared between SkyWars: Lucky Ores, Classic and Kits.

The addition of the Kits endpoint does not indicate any plans for the return of this mode to the server.

Level Unlocks now available on the Game Meta API

For supported games, level unlocks are now available using the game meta endpoint. For an example, check out the BedWars Game Meta endpoint.

The endpoint has been updated to include two arrays:

levelUnlocks contains an ordered array, level to unlock array, containing both game-specific and global unlocks for each level. For game-specific unlocks, this looks like:

{
  "name": "Creeper",
  "icon": "https://cdn.playhive.com/icons/locker/sky/flag/creeper.png",
  "type": "Player Flag",
  "global": false
}

Please note icon MAY be null. Global is false for all game-specific unlocks.

For global unlocks, global is true, and an additional field globalCosmetic provides the entire meta for the global unlock, such as:

{
  "name": "Boom boom boom",
  "icon": "https://cdn.playhive.com/avatars/sky-boom-boom-boom.png",
  "type": "Avatar",
  "global": true,
  "globalCosmetic": {
    "url": "https://cdn.playhive.com/avatars/sky-boom-boom-boom.png",
    "name": "Boom boom boom",
    "type": "avatar"
  }
}

Please note icon MAY be null.

The other new array, levelUnlockTypes, contains the game-specific types you will encounter in the levelUnlocks array. It provides the default unlock, or null if there is no default. It also provides the category icon.

As this update only provides new data, this is not behind a version/feature flag. Hub title meta is always the expanded meta, but unresolved as the display is not specific to a player.

SkyWars Classic API

SkyWars Classic shares XP (level progression) with SkyWars, but has separate statistics for games played, victories, kills, et cetera. These will be available on the API in the near future.

Parkour Worlds API endpoint

Parkour Worlds data is available under the all-time PARKOUR endpoint:

v0/game/all/parkour/username

The 'parkours' array exists for players that have played at least one course in any world. The structure is world name -> course name -> data.

Worlds will only exist if the player has played at least one course in that world. Once a player has played one course, all courses will be initialized: the 'best_run_time' can be null if a player has never played or finished the individual course. The arrays can be empty.

Note that 'best_checkpoint_times' is updated outside of the context of a run: that is, the times can be from different runs. 'best_run_time' is the best overall run, so not equal to the combined values of 'best_checkpoint_times'.

All (run) times are stored in server ticks. Hive runs at 20TPS, so one tick is 50MS.

Star counts are provided at course, world and global level.

Stale maps data, all-time leaderboard parity, additional SG statistics, equipped hat

We fixed an issue where the maps endpoints was returning stale (outdated) information.

The returned amount of entries for all-time leaderboards is now 100, to match in-game.

Added 'teleporters_used', 'launchpads_used' and 'flares_used' to Survival Games. These fields will fill correctly for single-user requests, but will return 0 when part of a leaderboard lookup, until that player has played at least one game since this change.

The hat a player has equipped is now listed as equipped_hat on the 'main' endpoint.

Dynamic hub titles additions and fixes

Meta-reference hub titles now correctly resolve when hub titles are returned as a map.

For multi-key stat-track hub titles, where the operation is divide, the style is now declared. For now, this is one of: percent or dot. Additionally, hub titles with the percent style now resolve correctly like this, as they do in-game.

Meta-Reference hub titles, seasonal leaderboards

Meta-reference hub titles (hub titles that use a player-specific, but immutable piece of data) are now resolved correctly by the API. As these titles are static per-player, they show up as normal titles on the API (and are always fully resolved).

As we work towards a unified codebase, the code expanding dynamic hub titles differs between the API and in-game. Because of this, at times there might be a difference in display values: we do consider these bugs, and will fix them as they are discovered.

Leaderboards for seasons are now available. They are very similar to monthly ones, both whole leaderboard and specific entry endpoints are available. As seasons run longer than monthly leaderboards, you can request more data than monthly ones: up to 1000 in (at most) 100 increments.

In the future, as more seasons are released, we will add an endpoint to get the season information for games: for now, only 'bed' season '1' exists.

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to PlayHive API Updates.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.