Get peer information
    • PDF

    Get peer information

    • PDF

    Article summary

    Available in VPC

    Get the peer details of a blockchain network.

    Request

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

    MethodURI
    GET/networks/{networkId}/peers/{peerId}

    Request headers

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

    Request path parameters

    The following describes the parameters.

    FieldTypeRequiredDescription
    networkIdLongRequiredNetwork ID
    peerIdLongRequiredPeer ID

    Request example

    The following is a sample request.

    curl --location --request GET 'https://blockchainservice.apigw.ntruss.com/api/v1/networks/{networkId}/peers/{peerId}' \
    --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.

    FieldTypeRequiredDescription
    contentObject-Peer details
    content.networkIdLong-Network ID
    content.peerIdString-Peer ID
    content.peerNameString-Peer name
    content.statusDatabaseTypeString-Peer's state database type
    • LEVEL_DB | COUCH_DB
      • LEVEL_DB: lightweight DB with fast performance and simple data structures
      • COUCH_DB: document-based DB that provides data in JSON document format and complex query and search capabilities
    content.mspIdString-Peer MSP ID
    content.endpointAddrString-Peer URL address
    content.adminIdentityNameString-Admin peer CA name
    content.peerResourceCpuFloat-CPU capacity allocated to peer pod (unit: core)
    content.peerResourceMemInteger-Memory capacity allocated to peer pod (unit: MB)
    content.peerResourceStorageInteger-Storage capacity allocated to peer pod (unit: MiB)
    content.statusDatabaseResourceCpuFloat-CPU capacity allocated to peer database (unit: core)
    • 0 (default)
    content.statusDatabaseResourceMemInteger-Memory capacity allocated to peer database (unit: MB)
    • 0 (default)
    content.statusDatabaseResourceStorageInteger-Storage capacity allocated to peer database (unit: MiB)
    • 0 (default)
    content.nodeAffinityLabelString-Label name of the Ncloud Kubernetes Service cluster nodepool where the peer node is deployed
    content.channelListArray-channelList details
    content.installChaincodeListArray-installChaincodeList details
    content.podStatusString-Lifecycle stages of peer pods
    • Running | Pending | Failed | Unknown
      • Running: running
      • Pending: pending
      • Failed: operation failure
      • Unknown: unable to check status
    content.createDateLocalDateTime-Peer creation date and time (YYYY-MM-DDTHH:MM:SS+0000)

    channelList

    The following describes content.channelList.

    FieldTypeRequiredDescription
    networkIdString-Network ID where the channel is created
    ordererIdString-Orderer ID where the channel is created
    channelNameString-Channel name
    operatorString-Channel operator name

    installChaincodeList

    The following describes content.installChaincodeList.

    FieldTypeRequiredDescription
    networkIdString-Network ID where the chaincode is installed
    peerIdString-Peer ID where the chaincode is installed
    chaincodeNameString-Chaincode name
    chaincodeVersionString-Chaincode version information
    creatorLong-Chaincode creator information
    createDateLocalDateTime-Chaincode installation date and time (YYYY-MM-DDTHH:MM:SS+0000)

    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,
            "peerId": "25738634",
            "peerName": "test-peer2",
            "statusDatabaseType": "LEVEL_DB",
            "mspId": "test-msp",
            "endpointAddr": "test-peer2-******-***-peer.bc-gryy4rew.kr.blockchain.naverncp.com",
            "adminIdentityName": "******-peer",
            "peerResourceCpu": 1.1,
            "peerResourceMem": 2800,
            "peerResourceStorage": 200,
            "statusDatabaseResourceCpu": 0.0,
            "statusDatabaseResourceMem": 0,
            "statusDatabaseResourceStorage": 0,
            "nodeAffinityLabel": "",
            "channelList": [
                {
                    "networkId": 1630,
                    "ordererId": "25728701",
                    "channelName": "test-channel",
                    "operator": "test-msp"
                }
            ],
            "installChaincodeList": [],
            "podStatus": "Running",
            "createDate": "2024-07-30T00:29:32+0000"
        }
    }
    

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.