Create New Blockchain Platform Instance
post
/api/v1/blockchainPlatforms/instances
Create a new Blockchain Platform instance.
Request
Supported Media Types
- multipart/form-data
Form Parameters
-
lbrTLSRootCert(optional): string
A zip file containing TLS CA certificate file[tls-ca.pem], and optional TLS cert and key file[tls-cert.pem, tls-key.pem] for LBR client.
-
payload:
Details for the new service.
-
thirdPartyCACert(optional): string
A zip file containing third party CA certificates. The CA key and certificate files used when issuing enrollment certificates (ECerts) and transaction certificates (TCerts). The chainfile (if it exists) contains the certificate chain which should be trusted for this CA, where the first in the chain is always the root CA certificate. File list in zip file [ca-cert.pem,ca-key.pem,ca-chain.pem(optional)].
Response
Supported Media Types
- application/json
202 Response
Accepted
Headers
-
Location: string
Location Header with a URL to query the status of the request.
-
Retry-After: integer
Retry after N number of seconds.
400 Response
Bad Request
Root Schema : Error
Type:
object
Error Information.
Show Source
-
errors(optional):
array errors
list of errors
-
message:
string
A human-readable error string.
-
status:
string
A short error status that defines the error, meant for programmatic parsing.
-
warnings(optional):
array warnings
list of warnings
401 Response
Unauthorized
Root Schema : Error
Type:
object
Error Information.
Show Source
-
errors(optional):
array errors
list of errors
-
message:
string
A human-readable error string.
-
status:
string
A short error status that defines the error, meant for programmatic parsing.
-
warnings(optional):
array warnings
list of warnings
409 Response
Operation conflict
Root Schema : Error
Type:
object
Error Information.
Show Source
-
errors(optional):
array errors
list of errors
-
message:
string
A human-readable error string.
-
status:
string
A short error status that defines the error, meant for programmatic parsing.
-
warnings(optional):
array warnings
list of warnings
500 Response
Internal Server Error
Root Schema : Error
Type:
object
Error Information.
Show Source
-
errors(optional):
array errors
list of errors
-
message:
string
A human-readable error string.
-
status:
string
A short error status that defines the error, meant for programmatic parsing.
-
warnings(optional):
array warnings
list of warnings
Default Response
Unknown Error
Root Schema : Error
Type:
object
Error Information.
Show Source
-
errors(optional):
array errors
list of errors
-
message:
string
A human-readable error string.
-
status:
string
A short error status that defines the error, meant for programmatic parsing.
-
warnings(optional):
array warnings
list of warnings
Examples
This endpoint is used to create a new Blockchain Platform instance.
The following example shows how to query and create a new Blockchain instance by submitting a POST request on the REST resource using cURL:
curl -X POST \ http://<hostname>:<port>/api/v1/blockchainPlatforms/instances \ -H 'Authorization: Basic b2JwdXNlcjpXZWxjb21lMQ==' \ -H 'Content-Type: application/json'
Example of the Request Body
The following example shows the contents of the request body in JSON format:
"name": "obpinstance1",
"desc": "test instance",
"platformRole": "founder",
"configuration": "Developer",
"peer": 4,
"cluster": {
"platformHosts": [
"10.182.73.23",
"10.182.73.20"
],
"crcHosts": [
"10.182.73.23",
"10.182.73.20"
]
},
"additionalConfiguration": {
"instanceFQDN": "domain.host.com"
"startPort": 0,
"enableTLS": true,
"useHSM": true,
"hsmConfiguration": {
"library": "/etc/hyperledger/fabric/dpod/fabric/libs/64/libCryptoki2.so",
"label": "fabric",
"pin": "password",
"chrystokiConf": "/etc/hyperledger/fabric/dpod/fabric"
}
}
Example of the Response Body
The following example shows the contents of the response body:
202 Accepted