Updating an SSL/TLS certificate¶
Note
The attributes cert and key cannot be changed via the API. It is only possible to change the list of subdomains and the intermediate certificate. If you need to change the verification or the key, use the Add-SSL-Certificate request to upload a new certificate.
Note
The body must include the attributes id and modified to identify the corresponding entry.
Note
The ID of the entry in the path of the request must match the value of the attribute id in the body.
Note
The attributes for cert and key in the API response are always empty for security reasons.
Sends a PUT request to the endpoint /domain/{domainId}/certificates/{id}.
Description¶
The Update-SSL-Certificate request allows the user to update an SSL/TLS certificate for a domain of the organisation.
Requirements¶
Values of the request: 8800Domain-ID {domainId}, SSL-ID {id}
Objects: SslCertVO, SslIntermediateVOlIntermediateVO
Request¶
To update an SSL/TLS certificate for a domain, the Domain-ID {domainId} and the SSL-ID {id} need to be added to the path of the HTTP request.
For a detailed specification of which information is required to update an SSL/TLS certificate, the object SslCertVO and SslIntermediateVO with the following attributes need to be defined in the body:
SslCertVO¶
| Attributes | Description | Values |
|---|---|---|
subdomains |
An array of all subdomains included in the certificate. | |
intermediates |
One or more objects SslIntermediateVO. |
|
id |
The ID of the certificate. | |
modified |
The last modification date in ISO 8601 format. | string($date-time) |
SslIntermediateVO¶
| Attributes | Description | Values |
|---|---|---|
cert |
The attribute cert contains the certificate. |
|
issuer |
The name of the certificate issuer. | |
id |
The ID of the intermediate certificate. | |
modified |
The last modification date in ISO 8601 format. | string($date-time) |
The following attributes are optional:
SslCertVO¶
| Attributes | Description | Values |
|---|---|---|
subject |
The subject of the certificate. | |
algorithm |
The algorithm used for encryption of the certificate. | |
validFrom |
The date as ISO 8601 when the certificate starts to be valid. | |
validTo |
The date as ISO 8601 until the certificate is valid. | |
cert |
The attribute cert contains the certificate. |
|
fingerprint |
The fingerprint of the certificate. | |
serialNumber |
The serial number of the certificate. | |
subjectAlternatives |
An array of all subdomains for which the certificate is valid. | |
key |
The encrypted private key. | |
wildcard |
The validity of the certificate for multiple subdomains of a domain. The certificate must have a *.domain.tld subject for true to be returned. |
|
extendedValidation |
True if the browser treats the certificate as Extended Validation. Myra uses the OIDs of Google Chrome™ to determine the Extended Validation level. |
|
ipList |
An array of all IPs. | |
sniAllowed |
Defines if the Server Name Indication is allowed. |
|
password |
The password to decrypt an encrypted certificate. An encrypted certificate should be in PKCS12 format. In this case, the attribute cert contains a base64-encoded value of the binary encrypted certificate (because binary content cannot be placed in a JSON field). The password field is ignored if the content of the attribute cert is not in PKCS12 format. |
|
managed |
Defines whether the certificate is managed by Myra. If the certificate is managed by Myra, it cannot be edited via the API and can only be read. The value of the attribute cannot be set when creating or updating a certificate via the API. |
|
sslConfigurationName |
The configuration name from SSLConfiguration table. | |
comment |
An individual comment for the entry. | string |
SslIntermediateVO¶
| Attributes | Description | Values |
|---|---|---|
subject |
The subject of the intermediate certificate. | |
algorithm |
The algorithm used for encryption of the intermediate certificate. | |
validFrom |
The date as ISO 8601 when the intermediate certificate starts to be valid. | |
validTo |
The date as ISO 8601 until the intermediate certificate is valid. | |
fingerprint |
The fingerprint of the intermediate certificate. | |
serialNumber |
The serial number of the intermediate certificate. | |
comment |
An individual comment for the entry. | string |
The system returns the objects SslCertVO and SslIntermediateVO with the changed information.
Example¶
Example request body:
{
"objectType": "string",
"subject": "string",
"algorithm": "string",
"validFrom": "string",
"validTo": "string",
"cert": "string",
"fingerprint": "string",
"serialNumber": "string",
"comment": "string",
"subjectAlternatives": [
"string"
],
"intermediates": [
{
"objectType": "string",
"subject": "string",
"algorithm": "string",
"validFrom": "string",
"validTo": "string",
"cert": "string",
"fingerprint": "string",
"serialNumber": "string",
"comment": "string",
"issuer": "string"
}
],
"key": "string",
"wildcard": true,
"extendedValidation": true,
"ipList": "string",
"subdomains": "string",
"certToRefresh": 0,
"certRefreshForced": true,
"sniAllowed": true,
"password": "string",
"managed": true,
"multidomain": true,
"sslConfigurationName": "string",
"requestId": 0
}
Responses¶
The following responses are available:
| STATUS CODE | DESCRIPTION |
|---|---|
| 200 | The request has succeeded. |
| 400 | The request was unsuccessful. The request was invalid or information is missing. |
| 401 | The request has not succeeded because the user authentication was incorrect. |
| 403 | The request has not succeeded because the user does not have the right permissions. |