API Reference: Difference between revisions

From Skyblock
m (fix link highlighting)
m (fix formatting of list)
 
Line 9: Line 9:
=== Values ===
=== Values ===
* <code>{server id}</code>: A numerical ID representing the subserver you are querying.  
* <code>{server id}</code>: A numerical ID representing the subserver you are querying.  
*** <code>7</code> for Skywars.
** <code>7</code> for Skywars.
*** <code>6</code> for Skyblock Economy.
** <code>6</code> for Skyblock Economy.
*** <code>4</code> for Skyblock Survival.
** <code>4</code> for Skyblock Survival.


=== Request ===  
=== Request ===  

Latest revision as of 16:15, 19 January 2025

Skyblock has an extensive API designed for internal use. A rewrite is in progress, and expected to be released soon[citation needed]. Currently, all endpoints require no authorisation. While most endpoints have ratelimits, these figures are not known.

Get player list

This endpoint is originally used for the player lists on the forums index.

Values

  • {server id}: A numerical ID representing the subserver you are querying.
    • 7 for Skywars.
    • 6 for Skyblock Economy.
    • 4 for Skyblock Survival.

Request

Send a POST request to https://skyblock.net/index.php?server-status/{server id}/query

Request Body

_xfRequestUri=%2F&_xfNoRedirect=1&_xfResponseType=json

Required Headers
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Accept: application/json, text/javascript, */*; q=0.01

Response

{
  "serverStatus": {
    "online": true,
    "players_online": "4",
    "max_players": "250",
    "player_list": [
      "ZanyZandMrB",
      "SteelersDieHard",
      "Haberson",
      "IslandDiscounts"
    ]
  },
}

Examples