Import SSL certificate
1. API Description
This API is used to import the SSL certificate.
Request mode: POST [ip]/api/certificate/import
Administrator Rights | Logged-in |
---|---|
Yes | Yes |
2. Input Parameters
Name | Required | Type | Description |
---|---|---|---|
certificate | Yes | String | Root certificate |
private-key | Yes | String | Root certificate private key |
3. Output Parameters
Name | Type | Description |
---|---|---|
status | Int | Status code |
code | String | Status description |
4. Example
Importing the SSL certificate.
Input Example
{
"certificate": "-----BEGIN CERTIFICATE-----\nMIIC1DCCAbwCCQDBG1CCTFOyfDANBgkqhkiG9w0BAQsFADBXMQswCQYDVQQGEwJD\nTjESMBAGA1UECAwJR3VhbmdEb25nMREwDwYDVQQHDAhTaGVuWmhlbjEhMB8GA1UE\nCgwYQm9saW4gVGVjaG5vbG9neSBSb290IENBMCAXDTIyMTEyMjAyMDYyNVoYDzMw\nMjIwMzI1MDIwNjI1WjCBgjELMAkGA1UEBhMCQ04xEjAQBgNVBAgMCUd1YW5nRG9u\nZzERMA8GA1UEBwwIU2hlblpoZW4xFTATBgNVBAoMDGJvbGluLWF2LmNvbTEVMBMG\nA1UEAwwMYm9saW4tYXYuY29tMR4wHAYJKoZIhvcNAQkBFg9hdkBib2xpbi1hdi5j\nb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALoeOv9z+IDzvCGfPWcU7bLP\nSkuPsHLN9VxQWJA692ke7rTK5qrLcUhrbLIAHhTLW5ET1S+NtmbIe2VGWkoSBJdj\nkNM61C3pFZe8q1EdbKnAt+Pa1PdYRCBnIQJAZgXrSh3L+YcfhexBKUeydkjuSLA9\nKvnoufkV9TS+yZ1NbtPXAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAEsWsAbM8fFb\nvDtdkkE3pmjeZq1xUVBdNHgryVFzOl9UiC7eV48SGhLyLZ5AQF6htIJ0Z70pn+2G\nMoGZCu7CRmP/tvFHxUmFE4GRxHJYyxXlej3t2ju+5qiI0o3iGAaeobk6+OR5l9D0\nL+UvLrhb0wbE53oZwMgGuH0cN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ATE KEY-----\n"
}
Output Example
{
"status": 0,
"code": "Success"
}
5. Error Code
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Status | Definition | Description |
---|---|---|
7 | MW_STATUS_INVALID_ARG | Missing required parameters |
15 | MW_STATUS_WRITE_FAILED | IO write failed |
40 | MW_STATUS_VERIFY_FAILED | Verification failed |