Get Information

Get server specific information

curl "https://garry.host/api/client/servers/<id>" \
  -H "Authorization: Bearer api" \
  -H "Content-Type: application/json" \
  -H "Accept: Application/vnd.pterodactyl.v1+json" \
  -X GET 

HTTP Request

GET https://garry.host/api/client/servers/<ID>

Parameter

Description

ID

The ID of the server that you are requesting.

URL Parameters

The above command returns JSON structured like this:

{
   "object":"server",
   "attributes":{
      "server_owner":true,
      "identifier":"d3aac109",
      "uuid":"d3aac109-e5a0-4331-b03e-3454f7e136dc",
      "name":"Survival",
      "description":"",
      "limits":{
         "memory":1024,
         "swap":0,
         "disk":5000,
         "io":500,
         "cpu":200
      },
      "feature_limits":{
         "databases":5,
         "allocations":5
      }
   }
}

This endpoint retrieves information for the specified server.

Get server resource utilization

URL Parameters

curl "https://garry.host/api/client/servers/<id>/utilization" \
  -H "Authorization: Bearer api" \
  -H "Content-Type: application/json" \
  -H "Accept: Application/vnd.pterodactyl.v1+json" \
  -X GET

HTTP Request

GET https://garry.host/api/client/servers/<ID>/utilization

Parameter

Description

ID

The ID of the server that you are requesting.

The above command returns JSON structured like this:

{
   "object":"stats",
   "attributes":{
      "state":"on",
      "memory":{
         "current":375,
         "limit":1024
      },
      "cpu":{
         "current":1.522,
         "cores":[
            0.033,
            0.048,
            0.04,
            0,
            0.031,
            0,
            0.021,
            0.024,
            0.249,
            0.042,
            0.007,
            0,
            0.293,
            0.003,
            0.6,
            0.131
         ],
         "limit":200
      },
      "disk":{
         "current":119,
         "limit":5000
      }
   }
}

This endpoint displays resource utilization of the specified server. If the server is offline, current data is displayed as 0 and the state is displayed as off.

Dernière mise à jour