Get node statistics
GET
/api/v1/node/stats
const url = 'http://localhost:8080/api/v1/node/stats';const options = {method: 'GET', headers: {'X-Signature': '<X-Signature>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:8080/api/v1/node/stats \ --header 'X-Signature: <X-Signature>'Get statistics about this node’s storage and operations
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Node statistics retrieved successfully
Media typeapplication/json
object
success
boolean
stats
object
totalChunks
Total chunks stored
integer
totalSizeBytes
Total storage size in bytes
integer format: int64
totalSizeGb
Total storage size in GB
number format: float
uniqueUsers
Number of unique users
integer
averageChunkSizeBytes
Average chunk size in bytes
integer
uploadCount
Total upload operations
integer format: int64
downloadCount
Total download operations
integer format: int64
successRate
Success rate percentage
number format: float
Example
{ "success": true, "stats": { "totalChunks": 1234, "totalSizeBytes": 1073741824, "totalSizeGb": 1, "uniqueUsers": 42, "averageChunkSizeBytes": 870400, "uploadCount": 500, "downloadCount": 300, "successRate": 99.5 }}Internal Server Error
Media typeapplication/json
object
error
Error type
string
message
Human-readable error description
string
code
Optional error code
string
Example
{ "error": "Internal server error", "message": "An unexpected error occurred"}