Download CA identity

Prev Next

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 /networks/{networkId}/cas/{caId}/identity/{identityName}/certAndKey

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
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
  • Base64-encoded
type String - CA identity type
  • admin | peer | orderer | client
    • admin: network admin
    • peer: Store and maintain network status, run chaincode
    • orderer: Collect network transaction information and create blocks
    • client: network user
key String - CA identity key value
  • Base64-encoded
tls_key String - CA identity's TLS key value
  • Base64-encoded
  • It is displayed if the CA identity type is peer, orderer, or client
tls_cert String - CA identity's TLS certificate value
  • Base64-encoded
  • It is displayed if the CA identity type is peer, orderer, or client

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.

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}
}