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:
Method | URI |
---|---|
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.
Field | Type | Required | Description |
---|---|---|---|
networkId |
Long | Required | Network ID
|
peerId |
Long | Required | Peer 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.
Field | Type | Required | Description |
---|---|---|---|
content |
Object | - | Peer details |
content.networkId |
Long | - | Network ID |
content.peerId |
String | - | Peer ID |
content.peerName |
String | - | Peer name |
content.statusDatabaseType |
String | - | Peer's state database type
|
content.mspId |
String | - | Peer MSP ID |
content.endpointAddr |
String | - | Peer URL address |
content.adminIdentityName |
String | - | Admin peer CA name |
content.peerResourceCpu |
Float | - | CPU capacity allocated to peer pod (unit: core) |
content.peerResourceMem |
Integer | - | Memory capacity allocated to peer pod (unit: MB) |
content.peerResourceStorage |
Integer | - | Storage capacity allocated to peer pod (unit: MiB) |
content.statusDatabaseResourceCpu |
Float | - | CPU capacity allocated to peer database (unit: core)
|
content.statusDatabaseResourceMem |
Integer | - | Memory capacity allocated to peer database (unit: MB)
|
content.statusDatabaseResourceStorage |
Integer | - | Storage capacity allocated to peer database (unit: MiB)
|
content.nodeAffinityLabel |
String | - | Label name of the Ncloud Kubernetes Service cluster nodepool where the peer node is deployed |
content.channelList |
Array | - | channelList details |
content.installChaincodeList |
Array | - | installChaincodeList details |
content.podStatus |
String | - | Lifecycle stages of peer pods
|
content.createDate |
LocalDateTime | - | Peer creation date and time (YYYY-MM-DDTHH:MM:SS+0000) |
channelList
The following describes content.channelList
.
Field | Type | Required | Description |
---|---|---|---|
networkId |
String | - | Network ID where the channel is created |
ordererId |
String | - | Orderer ID where the channel is created |
channelName |
String | - | Channel name |
operator |
String | - | Channel operator name |
installChaincodeList
The following describes content.installChaincodeList
.
Field | Type | Required | Description |
---|---|---|---|
networkId |
String | - | Network ID where the chaincode is installed |
peerId |
String | - | Peer ID where the chaincode is installed |
chaincodeName |
String | - | Chaincode name |
chaincodeVersion |
String | - | Chaincode version information |
creator |
Long | - | Chaincode creator information |
createDate |
LocalDateTime | - | 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"
}
}