Skip to main content

POST – Replace Certificate

Use the POST method to replace a certificate.

Request URL

GET https://<BMC_IPADDR>/redfish/v1/CertificateService/Actions/CertificateService.ReplaceCertificate

Request body

FieldTypeDescription

CertificateUri

ObjectRequired. The link to the certificate that is being replaced.

CertificateType

StringRequired. The format of the certificate. Only allow “PEM”.

CertificateString

StringRequired. The string for the certificate. Line breaks should be replaced to “\n” in this parameter.

Response body

Status code

HTTP Status CodeError Message ID
400BadRequest, ActionParamMissing , ActionParamTypeError , ActionParamFormatError
500InternalError

Example

The POST body is filled as below:

{
"CertificateUri": {
"@odata.id": "/redfish/v1/Managers/1/NetworkProtocol/HTTPS/Certificates/1"
},
"CertificateType": "PEM",
"CertificateString": "-----BEGIN CERTIFICATE-----\n.MIIEhTCCA2... HoKwFzKGxRyrsQ \n-----END CERTIFICATE-----"
}

The following example JSON response is returned.

None.