POST /trustedCertificates
Use this method to upload and install a new trust certificate.
Authentication
Authentication with username and password is required.
Request URL
POST https://{management_server_IP}/trustedCertificates
Query parameters
None
Request body
Attributes | Required / Optional | Type | Description |
---|---|---|---|
certificate | Required | String | The server certificate in PEM format. The certificate to be uploaded must have been created from the certificate signing request using GET /certificateSigningRequest or downloaded from the Lenovo XClarity Administrator user interface. |
The following example uploads and installs a new trust certificate.
{
"certificate": "-----BEGIN CERTIFICATE-----\n
MIID8jCCAtqgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBmzFHMEUGA1UEAxM+Q0Eg\n
Zm9yIEE0QUZCQkM0LTc3MDItMzIwNC05QTQ1LUM2RjMxNUQ2NjIzNiwgMTUtMDEt\n
MjAgMTQ6MDY6MDAxJTAjBgNVBAoTHEdlbmVyYXRlZCBieSBMZW5vdm8gRmlybXdh\n
cmUxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJUWDEPMA0GA1UEBxMGQXVzdGluMB4X\n
DTcwMDEwMTAwMDAwMFoXDTQ4MTIzMTIzNTk1OVowgZsxRzBFBgNVBAMTPkNBIGZv\n
ciBBNEFGQkJDNC03NzAyLTMyMDQtOUE0NS1DNkYzMTVENjYyMzYsIDE1LTAxLTIw\n
IDE0OjA2OjAwMSUwIwYDVQQKExxHZW5lcmF0ZWQgYnkgTGVub3ZvIEZpcm13YXJl\n
MQswCQYDVQQGEwJVUzELMAkGA1UECBMCVFgxDzANBgNVBAcTBkF1c3RpbjCCASIw\n
DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOxO2180p9Zf93jYhOubiNeZK4Bl\n
Xj6p5AvMhBqr5drgs8coXKXgDcj1Z4UKxJgNh+HuacSmnpUQrk7rYFp7Mn8CqVQQ\n
fNa3sYy49bccdGlCuCnWpI1jvoLLbDn229UQw3hznLVOaGLYUPs61SHf1eu0unLb\n
X+E9Fs0eU7rEtiRaaXkDcmsAruV+P0nS0xg9vA1Op4O9rg7OpIhVX99VRbc4RFeb\n
hHYDCTtjW48sYRoxB/vxuEja0+QhBYcUu3B4l+uhZasxNmlfpQEDOgyNjjxTv1+T\n
+N9hXwSsx4BUraF/2aR9Hr3NPxelhNqFUsfKeKqgIZ+wnSswElRvoiClmJkCAwEA\n
AaM/MD0wDAYDVR0TBAUwAwEB/zAOBgNVHQ8BAf8EBAMCAbYwHQYDVR0lBBYwFAYI\n
KwYBBQUHAwIGCCsGAQUFBwMBMA0GCSqGSIb3DQEBBQUAA4IBAQANEmEsIX0kOj84\n
D9+KAcsqp86ozeWgWiKJzOHatZACLVEt5fNE8I+vvnHUucLNUNttQyFx2phw33sS\n
2nVH0nys0dr7bZnIlUhUxMLuuXXLU+2/HavVnVFzlv8tWiq3ARCgNHBQphbEhmpy\n
bdBmkySf1zz7ErslXy/CzHm2zUTrNitKdC1edIyt9Ph2/tJ8nEEMFN5hPy0t/nkZ\n
bHZmWfE54gDxOacCCDb4O+stxnihtD4AeDCJwNmbxhOtxLCAgsw7YeNw3rbvm4FP\n
sas6a2I/4edd/A7cfgWs2ADLp0PDBhuR6pJrdIMeADdD9JF1KolwdXnB7caKqTtH\n
eTUkKVnX\n
-----END CERTIFICATE-----\n"
}
Response codes
Code | Description | Comments |
---|---|---|
200 | OK | The request completed successfully. |
400 | Bad Request | A query parameter or request attribute is missing or not valid, or the operation is not supported. A descriptive error message is returned in the response body. |
409 | Conflict | There is a conflict with the current state of the resource. A descriptive error message is returned in the response body. |
500 | Internal Server Error | An internal error occurred. A descriptive error message is returned in the response body. |
Response body
Attributes | Type | Description | ||
---|---|---|---|---|
result | String | Results of the request. This can be one of the following values.
| ||
messages | Array of objects | Information about one or more messages | ||
id | String | Message identifier of a returned message | ||
text | String | Message text associated with the message identifier | ||
explanation | String | Additional information to clarify the reason for the message | ||
recovery | Array of objects | Recovery information | ||
text | String | User actions that can be taken to recover from the event | ||
URL | String | Link to the help system for more information, if available |
The following example is returned if the request is successful.
{
"result": "success",
"messages": [{
"explanation": "",
"id": "FQXHMSE0001I",
"recovery": {
"text": "Information only; no action is required.",
"URL": ""
},
"text": "The request completed successfully."
}]
}
Give documentation feedback