Available in VPC
Download the certificate and key of the blockchain network CA identity as a JSON format file.
Request
The following describes the request format for the endpoint. The request format is as follows:
| Method | URI |
|---|---|
| POST | /api/v1/networks/{networkId}/cas/{caId}/identity/{identityName}/certAndKey (Korea Region) |
| POST | /api/sgn-v1/networks/{networkId}/cas/{caId}/identity/{identityName}/certAndKey (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
|
caId |
String | Required | CA ID
|
identityName |
String | Required | CA identity name |
Request example
The following is a sample request.
curl --location --request POST 'https://blockchainservice.apigw.ntruss.com/api/v1/networks/{networkId}/cas/{caId}/identity/{identityName}/certAndKey' \
--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/octet-stream'
Response
The following describes the response format.
Response body
The following describes the response body.
| Field | Type | Required | Description |
|---|---|---|---|
name |
String | - | CA identity name |
cert |
String | - | CA identity certificate information
|
type |
String | - | CA identity type
|
key |
String | - | CA identity key value
|
tls_key |
String | - | CA identity's TLS key value
|
tls_cert |
String | - | CA identity's TLS certificate value
|
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.
If CA identity type is admin
The following is a sample response if the CA identity type is admin.
{
"name" : "******-ca",
"cert" : {cert},
"type" : "admin",
"key" : {key}
}
If CA identity type is peer, orderer, or client
The following is a sample response if the CA identity type is peer, orderer, or client.
{
"tls_key" : {tls_key},
"tls_cert" : {tls_cert},
"name" : "******-orderer",
"cert" : {cert},
"type" : "orderer",
"key" : {key}
}