Post by chrisz920 on Jan 16, 2024 14:57:25 GMT
Hi,
I am trying to replace a certificate but get the error:
"json": {
"error": {
"@message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_2.Message",
"Message": "The action CertificateService.ReplaceCertificate requires the parameter CertificateUri to be present in the request body.",
"MessageArgs": [
"CertificateService.ReplaceCertificate",
"CertificateUri"
],
"MessageId": "Base.1.15.ActionParameterMissing",
"MessageSeverity": "Critical",
"Resolution": "Supply the action with the required parameter in the request body when the request is resubmitted."
}
],
"code": "Base.1.15.GeneralError",
"message": "A general error has occurred. See Resolution for information on how to resolve the error."
}
},
"link": "</redfish/v1/JsonSchemas/#CertificateService.v1_0_4.ReplaceCertificate.json>; rel=describedby",
"msg": "Status code was 400 and not [200]: HTTP Error 400: Bad Request",
any idea how to fix this anyone?
i am using ansible and this is my code:
- name: uploaden certificaat
tags: cert uploaden
ansible.builtin.uri:
url: device.local/redfish/v1/CertificateService/Actions/CertificateService.ReplaceCertificate
method: POST
headers:
X-Auth-Token: "{{ LoginResult.x_auth_token }}"
body_format: json
body:
CertificateUri:
odata.id: "/redfish/v1/Managers/BMC/NetworkProtocol/HTTPS/Certificates/1"
CertificateString: "-----BEGIN CERTIFICATE-----n-----END PRIVATE KEY-----"
CertificateType: "PEM"
validate_certs: false
thx
I am trying to replace a certificate but get the error:
"json": {
"error": {
"@message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_2.Message",
"Message": "The action CertificateService.ReplaceCertificate requires the parameter CertificateUri to be present in the request body.",
"MessageArgs": [
"CertificateService.ReplaceCertificate",
"CertificateUri"
],
"MessageId": "Base.1.15.ActionParameterMissing",
"MessageSeverity": "Critical",
"Resolution": "Supply the action with the required parameter in the request body when the request is resubmitted."
}
],
"code": "Base.1.15.GeneralError",
"message": "A general error has occurred. See Resolution for information on how to resolve the error."
}
},
"link": "</redfish/v1/JsonSchemas/#CertificateService.v1_0_4.ReplaceCertificate.json>; rel=describedby",
"msg": "Status code was 400 and not [200]: HTTP Error 400: Bad Request",
any idea how to fix this anyone?
i am using ansible and this is my code:
- name: uploaden certificaat
tags: cert uploaden
ansible.builtin.uri:
url: device.local/redfish/v1/CertificateService/Actions/CertificateService.ReplaceCertificate
method: POST
headers:
X-Auth-Token: "{{ LoginResult.x_auth_token }}"
body_format: json
body:
CertificateUri:
odata.id: "/redfish/v1/Managers/BMC/NetworkProtocol/HTTPS/Certificates/1"
CertificateString: "-----BEGIN CERTIFICATE-----n-----END PRIVATE KEY-----"
CertificateType: "PEM"
validate_certs: false
thx