Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

API: Difference between revisions

From Harry's Wiki
Wolfy (talk | contribs)
Added the statlb HTTP endpoint.
Wolfy (talk | contribs)
Added seasonal parameter, made stat and max parameters optional.
 
Line 1: Line 1:


This page documents the official Harry's Network API, which allows developers to create mods and applications that interact with server data.
This page documents the official Harry's Network API, which allows developers to create mods and applications that interact with server data.
Line 67: Line 66:
==== GET /statlb ====
==== GET /statlb ====


Retrieves leaderboards for a specific stat.
Retrieves leaderboards for a specific stat or all stats.


'''Parameters:'''
'''Parameters:'''
{| class="wikitable"
{| class="wikitable"
! Parameter !! Type !! Description
! Parameter !! Type !! Required !! Description
|-
| apikey || string || Yes || Your API key
|-
|-
| apikey || string || Your API key
| stat || string || No || The [[Leaderboard Stat]] (if omitted, returns all stat leaderboards)
|-
|-
| stat || string || The [[Leaderboard Stat]]
| max || integer || No || The amount of leaderboard entries (1-100, default: 100)
|-
|-
| max || integer || The amount of leaderboard entries (1-100)
| seasonal || any || No || If set to any value, returns the seasonal version of the leaderboard(s)
|}
|}


'''Example Request:'''
'''Example Request (specific stat):'''
<pre>GET https://wss.harrys.gg:2053/statlb?apikey=YOUR_API_KEY&stat=deaths&max=50</pre>
<pre>GET https://wss.harrys.gg:2053/statlb?apikey=YOUR_API_KEY&stat=deaths&max=50</pre>


'''Response Data:'''
'''Example Request (all stats):'''
* All the leaderboard entries in json as an array of arrays
<pre>GET https://wss.harrys.gg:2053/statlb?apikey=YOUR_API_KEY&max=10</pre>
 
'''Example Request (seasonal):'''
<pre>GET https://wss.harrys.gg:2053/statlb?apikey=YOUR_API_KEY&stat=arrowsshot&seasonal=true</pre>
 
'''Response Data (with stat parameter):'''
<syntaxhighlight lang="json">
[
  {
    "uuid": "1139d3c0-a725-4ee2-b90b-63903b12f561",
    "value": 76602
  },
  {
    "uuid": "c1193bef-6ed4-46d5-82b9-fcc54de3f3c5",
    "value": 63384
  },
  {
    "uuid": "465f89be-b8e9-42d2-bbe6-3dda740780df",
    "value": 59279
  }
]
</syntaxhighlight>
 
'''Response Data (without stat parameter):'''
<syntaxhighlight lang="json">
{
  "arrowsshot": [
    {
      "uuid": "011976b2-ec87-4a7e-9b0c-8efa83ea1767",
      "value": 4287037
    },
    {
      "uuid": "a271adc1-18a8-4c81-9375-d4f5de7e093d",
      "value": 3319231
    },
    {
      "uuid": "8881baa9-0be0-4faf-aabb-fc4523216c77",
      "value": 2531518
    }
  ],
  "aucprice": [
    {
      "uuid": "cda6d135-46db-4ca5-8529-16e715e8f8e2",
      "value": 3630000003
    },
    {
      "uuid": "2fb05c6e-b99e-4714-a26d-10738f49bad3",
      "value": 3000000001
    },
    {
      "uuid": "a5c94aec-048f-44cd-a69a-cd1b7143e632",
      "value": 3000000000
    }
  ],
  "beastscore": [
    {
      "uuid": "ae18d41b-7815-4338-9bfe-40a9c4e70c8c",
      "value": 12884
    },
    {
      "uuid": "313ea94e-4657-4f2e-aa14-548fd54c1ffe",
      "value": 8790
    },
    {
      "uuid": "545a445a-9410-4736-9084-35a898c83fde",
      "value": 8750
    }
  ]
}
</syntaxhighlight>


'''Error Responses:'''
'''Error Responses:'''
Line 90: Line 160:
! Code !! Error !! Description
! Code !! Error !! Description
|-
|-
| 400 || Missing apikey, stat, or max || Required parameters not provided
| 400 || Missing apikey || Required parameter not provided
|-
|-
| 400 || Invalid max value || The max parameter is not in the valid range (1-100)
| 400 || Invalid max value || The max parameter is not in the valid range (1-100)
Line 98: Line 168:
| 504 || Gateway Timeout || Server did not respond in time
| 504 || Gateway Timeout || Server did not respond in time
|}
|}


== WebSocket API ==
== WebSocket API ==

Latest revision as of 21:08, 28 December 2025

This page documents the official Harry's Network API, which allows developers to create mods and applications that interact with server data.

Getting an API Key

To obtain an API key:

  1. You must have at least VIP rank on the server
  2. Log into the Minecraft server
  3. Type /api in chat
  4. Your API key will be provided to you

⚠️ Warning: Keep your API key private. Do not share it with others.

API Endpoints

HTTP API

Base URL

https://wss.harrys.gg:2053

GET /profile

Retrieves profile information for a player.

Parameters:

Parameter Type Description
apikey string Your API key
uuid string The player's Minecraft UUID (with dashes)

Example Request:

GET https://wss.harrys.gg:2053/profile?apikey=YOUR_API_KEY&uuid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Response Data:

  • Inventory items
  • Armor items
  • Coins
  • Megacoins
  • Coins grinded this prestige
  • Coins requirement for next prestige
  • Rank
  • Prestige number
  • Level
  • Guild
  • Equipped megastreak
  • Equipped killstreaks
  • Equipped perks
  • Equipped blessing

Error Responses:

Code Error Description
400 Missing apikey or uuid Required parameters not provided
400 Invalid UUID format UUID must be in standard format with dashes
403 Invalid API Key The provided API key is not valid
504 Gateway Timeout Server did not respond in time

GET /statlb

Retrieves leaderboards for a specific stat or all stats.

Parameters:

Parameter Type Required Description
apikey string Yes Your API key
stat string No The Leaderboard Stat (if omitted, returns all stat leaderboards)
max integer No The amount of leaderboard entries (1-100, default: 100)
seasonal any No If set to any value, returns the seasonal version of the leaderboard(s)

Example Request (specific stat):

GET https://wss.harrys.gg:2053/statlb?apikey=YOUR_API_KEY&stat=deaths&max=50

Example Request (all stats):

GET https://wss.harrys.gg:2053/statlb?apikey=YOUR_API_KEY&max=10

Example Request (seasonal):

GET https://wss.harrys.gg:2053/statlb?apikey=YOUR_API_KEY&stat=arrowsshot&seasonal=true

Response Data (with stat parameter):

[
  {
    "uuid": "1139d3c0-a725-4ee2-b90b-63903b12f561",
    "value": 76602
  },
  {
    "uuid": "c1193bef-6ed4-46d5-82b9-fcc54de3f3c5",
    "value": 63384
  },
  {
    "uuid": "465f89be-b8e9-42d2-bbe6-3dda740780df",
    "value": 59279
  }
]

Response Data (without stat parameter):

{
  "arrowsshot": [
    {
      "uuid": "011976b2-ec87-4a7e-9b0c-8efa83ea1767",
      "value": 4287037
    },
    {
      "uuid": "a271adc1-18a8-4c81-9375-d4f5de7e093d",
      "value": 3319231
    },
    {
      "uuid": "8881baa9-0be0-4faf-aabb-fc4523216c77",
      "value": 2531518
    }
  ],
  "aucprice": [
    {
      "uuid": "cda6d135-46db-4ca5-8529-16e715e8f8e2",
      "value": 3630000003
    },
    {
      "uuid": "2fb05c6e-b99e-4714-a26d-10738f49bad3",
      "value": 3000000001
    },
    {
      "uuid": "a5c94aec-048f-44cd-a69a-cd1b7143e632",
      "value": 3000000000
    }
  ],
  "beastscore": [
    {
      "uuid": "ae18d41b-7815-4338-9bfe-40a9c4e70c8c",
      "value": 12884
    },
    {
      "uuid": "313ea94e-4657-4f2e-aa14-548fd54c1ffe",
      "value": 8790
    },
    {
      "uuid": "545a445a-9410-4736-9084-35a898c83fde",
      "value": 8750
    }
  ]
}

Error Responses:

Code Error Description
400 Missing apikey Required parameter not provided
400 Invalid max value The max parameter is not in the valid range (1-100)
403 Invalid API Key The provided API key is not valid
504 Gateway Timeout Server did not respond in time

WebSocket API

Connection

wss://wss.harrys.gg:2053

Authentication Flow

  1. Connect to the WebSocket
  2. Server sends: {"type": "auth_request"}
  3. Client responds: {"type": "auth", "apikey": "YOUR_API_KEY"}
  4. On success, server sends: {"type": "auth_success"}

ℹ️ Note: You must authenticate within 1 second of connecting or the connection will be closed.

Live Data Stream

When you are online on the Minecraft server and connected to the WebSocket, you will automatically receive data every second containing:

  • Equipped perks
  • Equipped killstreaks
  • Equipped megastreak
  • Current monk buff (if active)
  • Riftwalker charges
  • Apocalypse count
  • Booster info (remaining time, multiplier)
  • Battlepass challenges and progression

Example Code

JavaScript WebSocket Example

const ws = new WebSocket('wss://wss.harrys.gg:2053');

ws.onmessage = (event) => {
    const data = JSON.parse(event.data);
    
    if (data.type === 'auth_request') {
        ws.send(JSON.stringify({ type: 'auth', apikey: 'YOUR_API_KEY' }));
    } else if (data.type === 'auth_success') {
        console.log('Connected!');
    } else if (data.type === 'info') {
        console.log('Info about myself:', data.content);
    }
};

See Also