Importing the Root Certificate
Function
Imports the corresponding root certificates of third-party software repositories and image repositories before using containerized applications.
- If this API is called repeatedly, the root certificate will be updated.
- It is recommended that the validity period of the root certificate be greater than the value of certificate alarm detection period (the default value is 7).
- If the root certificate is imported repeatedly, the previously imported certificate is backed up.
Syntax
Operation type: POST
URL: https://{ip}:{port}/certmanager/v1/certificates/import
Request message body:
{
"certName": certname,
"cert": cert
}
Request Parameters
Parameter |
Type |
Description |
Value |
|---|---|---|---|
certName |
String |
Usage of the imported certificate |
The value can be:
|
cert |
String |
PEM root certificate in Base64 encoding format |
|
Usage Example
Request:
POST https://10.10.10.10:30035/certmanager/v1/certificates/import
Request message body:
{
"certName": "software",
"cert": "xxxxxxxxxxxxxxxxxxx..."
}
Response:
{
"status": "00000000",
"msg": "import certificate success"
}
Response status code: 200
Output Description
Parameter |
Type |
Description |
|---|---|---|
status |
String |
Error code |
msg |
String |
Description |
Parent topic: Configuration APIs