Updated on 2023-10-09 GMT+08:00

Querying diskUsage of a Node

Function

This API is used to query the diskUsage of a node.

URI

GET /v2/agent/apis/peers/disk-usage

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

[items]

Array of PeerDiskUsageRes objects

Success

Table 3 PeerDiskUsageRes

Parameter

Type

Description

peer_name

String

Peer name.

volume_total

Long

Total storage.

volume_used

Long

Storage usage.

volume_free

Long

Available storage.

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_message

String

Error description.

error_msg

String

Error description.

Example Requests

GET  https://192.168.0.90:30603/v2/agent/apis/peers/disk-usage

Example Responses

Status code: 200

Success

[ {
  "peer_name" : "peer-ee6d5dd863f7e24675f2f2db76f8dfdbaa9a07cf-0",
  "volume_total" : 105152176128,
  "volume_used" : 63434752,
  "volume_free" : 105088741376
} ]

Status code: 400

Bad Request

{
  "error_code" : "BCS.4000013",
  "error_msg" : "request body is too large"
}

Status Codes

Status Code

Description

200

Success

400

Bad Request

Error Codes

See Error Codes.