Skip to main content

Retrieving server resources

Endpoint

GET /api/client/servers/{server}/resources

This endpoint provides access to server resources for a specific server.

Headers

  • Accept: application/json
  • Content-Type: application/json
  • Authorization: Bearer your_api_key

Parameters

ParameterTypeDescription
serverstringThe unique identifier of the server.

Attributes

AttributeTypeDescription
current_statestringThe current state of the server (running, stopped, etc.).
resourcesobjectContains details about server resource usage.
memory_bytesintegerMemory usage in bytes.
cpu_absolutefloatCPU usage as a percentage.
disk_bytesintegerDisk usage in bytes.
network_tx_bytesintegerTotal bytes transmitted over the network.
network_rx_bytesintegerTotal bytes received over the network.

Example Request

curl -X GET "https://beta.fragify.net/api/client/servers/{server}/resources" \
-H "Authorization: Bearer your_api_key" \
-H "Content-Type: application/json"

Success Response

{
"object": "server_resource",
"attributes": {
"current_state": "running",
"resources": {
"memory_bytes": 1024000000,
"cpu_absolute": 50.5,
"disk_bytes": 512000000,
"network_tx_bytes": 1000000,
"network_rx_bytes": 2000000
}
}
}