API Reference: Difference between revisions

From Skyblock
(Add server list endpoint & examples of api)
m (fix link highlighting)
Line 14: Line 14:


=== Request ===  
=== Request ===  
Send a POST request to <code>https://skyblock.net/index.php?server-status/{server id}/query</code>
Send a POST request to <code><nowiki>https://skyblock.net/index.php?server-status/{server id}/query</nowiki></code>


; Request Body
; Request Body

Revision as of 22:20, 18 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