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
CertificateUriObjectRequired. The link to the certificate that is being replaced.
 @odata.idLinkThe value shall be a certificate resource link.
CertificateTypeStringRequired. The format of the certificate. Only allows “PEM”.
CertificateStringStringRequired. 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.