You can call this operation to apply for the certificate to access a blockchain in Ant Blockchain by automatically generating the certificate signing request (CSR).

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

ParameterTypeRequiredExampleDescription
AntChainIdStringYes1q8B5R9p

The ID of the blockchain that you want to access.

CommonNameStringYescommonName

The domain name of your website.

ConsortiumIdStringYesDV80nJXq

The ID of the consortium to which the blockchain that you want to access belongs.

CountryNameStringYescountryName

The two-letter code of the country where you reside.

LocalityNameStringYeslocalityName

The name of the city where you reside.

OrganizationNameStringYesorganizationName

The name of your organization.

OrganizationUnitNameStringYesorganizationUnitName

The name of your department.

PasswordStringYespassword

The password for accessing the SSL private key.

StateOrProvinceNameStringYesstateOrProvinceName

The name of the state or province where you reside.

ActionStringNoApplyAntChainCertificateWithKeyAutoCreation

The operation that you want to perform. Set the value to ApplyAntChainCertificateWithKeyAutoCreation.

RegionIdStringNocn-hangzhou

The ID of the region where Ant Blockchain is used.

Response parameters

ParameterTypeExampleDescription
RequestIdString3E1894AF-FEE7-4C6C-8C2A-2B3EE0105B07

The ID of the request.

Result

The result of the operation.

DownloadPath

The URLs used to download the certificate files and SDK.

CaCrtUrlStringhttp://***ca.crt

The URL used to download the ca.crt file.

ClientCrtUrlStringhttp://***client.crt

The URL used to download the client.crt file.

SdkUrlStringhttp://***

The URL used to download the SDK.

TrustCaUrlStringhttp://***trustCa

The URL used to download the trustCA file.

PrivateKeyString-----BEGIN ENCRYPTED PRIVATE KEY-----\nMII***A=\n-----END ENCRYPTED PRIVATE KEY-----\n

The private key that was automatically generated.

Examples

Sample requests


http(s)://[Endpoint]/?Action=ApplyAntChainCertificateWithKeyAutoCreation
&<Common request parameters>

Sample success responses

JSON format

{
	"successResponse":true,
	"requestId":"3E1894AF-FEE7-4C6C-8C2A-2B3EE0105B07",
	"data":{
		"Result":{
			"DownloadPath":{
				"SdkUrl":"http://***",
				"TrustCaUrl":"http://***trustCa",
				"CaCrtUrl":"http://***ca.crt",
				"ClientCrtUrl":"http://***client.crt"
			},
			"PrivateKey":"-----BEGIN ENCRYPTED PRIVATE KEY-----\nMII***A=\n-----END ENCRYPTED PRIVATE KEY-----\n"
		},
		"RequestId":"3E1894AF-FEE7-4C6C-8C2A-2B3EE0105B07"
	},
	"code":"200"
}

Error codes

For a list of error codes, visit the API Error Center.