Get CA pod usage

Prev Next

Available in VPC

Get resource (CPU, memory, storage) usage for CA pods in a blockchain network

Request

The following describes the request format for the endpoint. The request format is as follows:

Method URI
GET /networks/{networkId}/cas/{caId}/usage

Request headers

For headers common to all Blockchain Service APIs, see Common Blockchain Service headers.

Request path parameters

The following describes the parameters.

Field Type Required Description
networkId Long Required Network ID
caId String Required CA ID

Request query parameters

The following describes the parameters.

Field Type Required Description
startTime Integer Required Usage query start time (Unix timestamp)
  • <E.g.> If it's July 30, 2024, 09:00:00, startTime=1722297600000
endTime Integer Required Usage query end time (Unix timestamp)
  • <E.g.> If it's July 30, 2024, 15:00:00, startTime=1722319200000

Request example

The following is a sample request.

curl --location --request GET 'https://blockchainservice.apigw.ntruss.com/api/v1/networks/{networkId}/cas/{caId}/usage?startTime=1722297600000&endTime=1722319200000' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--header 'Content-Type: application/json'

Response

The following describes the response format.

Response body

The following describes the response body.

Field Type Required Description
content Object - CA pod details
content.networkId Long - Network ID
content.nodeId String - CA node ID
content.containerNo Long - Ncloud Kubernetes Service container number
  • Not applicable for CAs
content.cpuUsage Map - CPU usage per hour of event occurrence (unit: vCPU)
  • <E.g.> "cpuUsage": {"1722306600000": 7.33438E-4}
content.memUsage Map - Memory usage per hour of event occurrence (unit: MiB)
  • <E.g.> "memUsage": {"1722306600000": 7.33438E-12}
content.diskUsage Map - Storage usage per hour of event occurrence (unit: %)
  • <E.g.> "diskUsage": {"1722306600000": 0}

Response status codes

For response status codes common to all Blockchain Service APIs, see Common Blockchain Service response status codes.

Response example

The following is a sample example.

{
    "content": {
        "networkId": 1630,
        "nodeId": "25728700",
        "containerNo": 0,
        "cpuUsage": {
            "1722306600000": 7.33438E-4,
            "1722308400000": 8.020852E-4,
            "1722313800000": 7.315537E-4,
            "1722304800000": 7.357918E-4,
            "1722315600000": 7.5871986E-4,
            "1722317400000": 7.9677143E-4,
            "1722303000000": 7.9579744E-4,
            "1722299400000": 6.617413E-4,
            "1722301200000": 6.9105363E-4,
            "1722312000000": 8.694744E-4,
            "1722297600000": 7.760141E-4,
            "1722319200000": 5.692615E-4,
            "1722310200000": 6.884763E-4
        },
        "memUsage": {
            "1722306600000": 12,
            "1722308400000": 12,
            "1722313800000": 12,
            "1722304800000": 12,
            "1722315600000": 12,
            "1722317400000": 12,
            "1722303000000": 12,
            "1722299400000": 12,
            "1722301200000": 12,
            "1722312000000": 12,
            "1722297600000": 12,
            "1722319200000": 12,
            "1722310200000": 12
        },
        "diskUsage": {
            "1722306600000": 0,
            "1722308400000": 0,
            "1722313800000": 0,
            "1722304800000": 0,
            "1722315600000": 0,
            "1722317400000": 0,
            "1722303000000": 0,
            "1722299400000": 0,
            "1722301200000": 0,
            "1722312000000": 0,
            "1722297600000": 0,
            "1722319200000": 0,
            "1722310200000": 0
        }
    }
}