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 | /api/v1/networks/{networkId}/peers/{peerId} (Korea Region) |
| GET | /api/sgn-v1/networks/{networkId}/peers/{peerId} (Singapore Region) |
Request headers
For information about the headers common to all Blockchain Service APIs, see Blockchain Service request headers.
Request path parameters
You can use the following path parameters with your request:
| 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: channelList |
content.installChaincodeList |
Array | - | installChaincodeList details: installChaincodeList |
content.podStatus |
String | - | Lifecycle stages of peer pods
|
content.createDate |
LocalDateTime | - | Peer creation date and time
|
channelList
The following describes 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 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
|
Response status codes
For information about the HTTP status codes common to all Blockchain Service APIs, see 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"
}
}