WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
Request
This function sets values for AutoSSL's metadata keys. This allows you to replace certificates that AutoSSL did not issue and toggle other AutoSSL notifications.
Note:
We recommend that you use the WHM API 1 set_autossl_metadata_key function instead.
Information:
- You can enter more than one key and value pair in the
metadata_jsonJSON hash. - Any keys that you do not explicitly define will adopt the system's default value.
JSON-encoded object of metadata keys and values that control AutoSSL's behavior.
Whether to allow AutoSSL to replace certificates that none of this system’s AutoSSL modules issued. When you enable this option, AutoSSL will install certificates that replace users’ Certificate Authority (CA) issued certificates if they are invalid or expire within three days.
1- Replace certificates not issued by the AutoSSL system.0- Only replace certificates issued by the AutoSSL system.
Whether to send a notification when an AutoSSL certificate expires. This occurs when AutoSSL cannot request a new certificate.
1- Send a notification.0- Do not send a notification.
Notes:
This can happen if all of a website’s domains fail Domain Control Validation (DCV), or if the AutoSSL provider has not issued a certificate in response to a request.
Whether to send a notification if at least one currently-secured domain will lose coverage when the certificate renews.
1- Send a notification.0- Do not send a notification.
Whether to send a notification if at least one of a user's currently-secured domains will lose coverage when the certificate renews.
1- Send a notification.0- Do not send a notification.
Whether to send a notification when a user's AutoSSL certificate expires. This occurs when AutoSSL cannot request a new certificate for a user.
1- Send a notification.0- Do not send a notification.
Whether to send a notification when AutoSSL successfully renews a certificate.
1- Send a notification.0- Do not send a notification.
Whether to send a notification if a currently-secured domain fails DCV and the certificate has not reached its renewal period.
1- Send a notification.0- Do not send a notification.
Whether to send a notification when AutoSSL has renewed a certificate and the new certificate lacks at least one domain that the previous certificate secured.
1- Send a notification.0- Do not send a notification.
Whether to send a notification when AutoSSL has renewed a certificate for a user and the new certificate lacks at least one domain that the previous certificate secured.
1- Send a notification.0- Do not send a notification.
Whether to send a notification if a currently-secured domain fails DCV and the certificate has not reached its renewal period.
1- Send a notification.0- Do not send a notification.
Whether to send a notification when AutoSSL has renewed a certificate and the new certificate lacks one or more of the website’s domains.
1- Send a notification.0- Do not send a notification.
Whether to send a notification when AutoSSL has renewed a certificate for a user and the new certificate lacks one or more of the website’s domains.
1- Send a notification.0- Do not send a notification.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/set_autossl_metadata
- A server running WHM.
https://whm-server.tld:2087/json-api/set_autossl_metadata
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/set_autossl_metadata?metadata_json={%22clobber_externally_signed%22%3A1%2C%22notify_autossl_expiry%22%3A1%2C%22notify_autossl_expiry_coverage%22%3A1%2C%22notify_autossl_expiry_coverage_user%22%3A1%2C%22notify_autossl_expiry_user%22%3A1%2C%22notify_autossl_renewal%22%3A1%2C%22notify_autossl_renewal_coverage%22%3A1%2C%22notify_autossl_renewal_coverage_reduced%22%3A1%2C%22notify_autossl_renewal_coverage_reduced_user%22%3A1%2C%22notify_autossl_renewal_coverage_user%22%3A1%2C%22notify_autossl_renewal_uncovered_domains%22%3A1%2C%22notify_autossl_renewal_uncovered_domains_user%22%3A1%2C%22notify_autossl_renewal_user%22%3A1}'{ "metadata": { "command": "set_autossl_metadata", "reason": "OK", "result": 1, "version": 1 } }
Request
This function sets values for AutoSSL's metadata keys. This allows you to replace certificates that AutoSSL did not issue and toggle other AutoSSL notifications.
Note:
- This function performs the same actions as the WHM API 1
set_autossl_metadatafunction. However, this function accepts a single key and value pair as a parameter instead of JSON. Additionally, you can only enter one key and value pair per function call. - This function only accepts a single key and value pair. To set all values, use the WHM API 1
set_autossl_metadatafunction or make multiple calls to this function.
The AutoSSL metadata key that you wish to modify.
clobber_externally_signed— Whether to allow AutoSSL to replace certificates that none of this system’s AutoSSL modules issued. When you enable this option, AutoSSL will install certificates that replace users’ Certificate Authority (CA) issued certificates if they are invalid or expire within three days.notify_autossl_expiry— Whether to send a notification when an AutoSSL certificate expires. This occurs when AutoSSL cannot request a new certificate.notify_autossl_expiry_coverage— Whether to send a notification if at least one currently-secured domain will lose coverage when the certificate renews.notify_autossl_expiry_coverage_user— Whether to send a notification if at least one currently-secured domain for a user will lose coverage when the certificate renews.notify_autossl_renewal— Whether to send a notification when AutoSSL successfully renews a certificate.notify_autossl_renewal_user— Whether to send a notification when AutoSSL successfully renews a certificate for a user.notify_autossl_renewal_coverage— Whether to send a notification when a currently-secured domain fails DCV and the certificate has not reached its renewal period.notify_autossl_renewal_coverage_user— Whether to send a notification when a user's currently-secured domain fails DCV and the certificate has not reached its renewal period.notify_autossl_renewal_coverage_reduced— Whether to send a notification when AutoSSL has renewed a certificate, but the new certificate lacks at least one domain that the previous certificate secured.notify_autossl_renewal_coverage_reduced_user— Whether to send a notification when AutoSSL has renewed a certificate for a user, but the new certificate lacks at least one domain that the previous certificate secured.notify_autossl_renewal_uncovered_domains— Whether to send a notification when AutoSSL has renewed a certificate, but the new certificate lacks one or more of the website’s domains.notify_autossl_renewal_uncovered_domains_user— Whether to send a notification when AutoSSL has renewed a certificate, but the new certificate lacks one or more of the website’s domains.
Whether to allow AutoSSL to replace certificates that it did not issue for the clobber_externally_signed parameter.
or
Whether to send a notification for the notify_autossl_expiry, notify_autossl_expiry_coverage, notify_autossl_expiry_coverage_user, notify_autossl_renewal, notify_autossl_renewal_user, notify_autossl_renewal_coverage, notify_autossl_renewal_coverage, notify_autossl_renewal_coverage_reduced, notify_autossl_renewal_coverage_reduced_user, notify_autossl_renewal_uncovered_domains, and notify_autossl_renewal_uncovered_domains_user parameters.
1— Allow or notify.0— Do not allow or notify.
Note:
For reference, the system preconfigures AutoSSL metadata keys to the following values:
- The value for
clobber_externally_signeddefaults to0. - The value for
notify_autossl_expirydefaults to1. - The value for
notify_autossl_expiry_coveragedefaults to1. - The value for
notify_autossl_expiry_coverage_userdefaults to1. - The value for
notify_autossl_renewaldefaults to1. - The value for
notify_autossl_renewal_userdefaults to1. - The value for
notify_autossl_renewal_coveragedefaults to1. - The value for
notify_autossl_renewal_coverage_userdefaults to1. - The value for
notify_autossl_renewal_coverage_reduceddefaults to1. - The value for
notify_autossl_renewal_coverage_reduced_userdefaults to1. - The value for
notify_autossl_renewal_uncovered_domainsdefaults to1. - The value for
notify_autossl_renewal_uncovered_domains_userdefaults to1.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/set_autossl_metadata_key
- A server running WHM.
https://whm-server.tld:2087/json-api/set_autossl_metadata_key
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/set_autossl_metadata_key?key=notify_autossl_expiry&value=1'{ "metadata": { "command": "set_autossl_metadata_key", "reason": "OK", "result": 1, "version": 1 } }
The AutoSSL provider's name. For example:
cPanelLetsEncrypt
Additional parameters which you wish to pass to the AutoSSL provider.
Note:
These additional parameters begin with the x_ prefix. For example, the Let's Encrypt provider accepts the x_terms_of_service_accepted parameter, to which you would pass the URL of the terms of service that you accept.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/set_autossl_provider
- A server running WHM.
https://whm-server.tld:2087/json-api/set_autossl_provider
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/set_autossl_provider?provider=cPanel&x_*=%28varies%29'{ "metadata": { "command": "set_autossl_provider", "reason": "OK", "result": 1, "version": 1 } }