Page tree
Skip to end of metadata
Go to start of metadata

Description

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 function set_autossl_metadata. However, this function accepts key and value pairs for parameters instead of JSON.


Examples


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/set_autossl_metadata_key?api.version=1&key=clobber_externally_signed&value=1&key=notify_autossl_expiry&value=1&key=notify_autossl_expiry_coverage&value=1&key=notify_autossl_renewal&value=1&key=notify_autossl_renewal_coverage&value=1&key=notify_autossl_renewal_coverage_reduced&value=1&key=notify_autossl_renewal_uncovered_domains&value=1
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/set_autossl_metadata_key?api.version=1&key=clobber_externally_signed&value=1&key=notify_autossl_expiry&value=1&key=notify_autossl_expiry_coverage&value=1&key=notify_autossl_renewal&value=1&key=notify_autossl_renewal_coverage&value=1&key=notify_autossl_renewal_coverage_reduced&value=1&key=notify_autossl_renewal_uncovered_domains&value=1
 Command Line
whmapi1 set_autossl_metadata_key key=clobber_externally_signed value=1 key=notify_autossl_expiry value=1 key=notify_autossl_expiry_coverage value=1 key=notify_autossl_renewal value=1 key=notify_autossl_renewal_coverage value=1 key=notify_autossl_renewal_coverage_reduced value=1 key=notify_autossl_renewal_uncovered_domains value=1


Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 1 documentation or run the whmapi1 --help command. 
  • We introduced this functionality in cPanel & WHM version 11.52.0.8.

 Output (JSON)
{
    "metadata": {
        "version": 1,
        "reason": "OK",
        "result": "1",
        "command": "set_autossl_metadata_key"
    }
}
 Output (XML)
<result>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>set_autossl_metadata_key</command>
    </metadata>
</result>


Note:

Use WHM's API Shell interface (WHM >> Home >> Development >> API Shell) to directly test WHM API calls.

Parameters

Notes:

  • You must enter at least one key and value parameter pair.
  • You can enter multiple key and parameter pairs.
ParameterTypeDescriptionPossible valuesExample
keystring

Required

The AutoSSL metadata key that you wish to modify.

  • The value for clobber_externally_signed defaults to 0.
  • The value for notify_autossl_expiry defaults to 1.
  • The value for notify_autossl_expiry_coverage defaults to 1.
  • The value for notify_autossl_renewal defaults to 1.
  • The value for notify_autossl_renewal_coverage defaults to 1.
  • The value for notify_autossl_renewal_coverage_reduced defaults to 1.
  • The value for notify_autossl_renewal_uncovered_domains defaults to 1.
  • clobber_externally_signed — Whether to allow AutoSSL to replace certificates that the AutoSSL system did not issue. 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 AutoSSL certificate expiry.
  • notify_autossl_expiry_coverage — Whether to send a notification when AutoSSL cannot renew a certificate because domains that fail Domain Control Validation (DCV) exist on the current certificate.
  • notify_autossl_renewal — Whether to send a notification when AutoSSL renews a certificate.
  • notify_autossl_renewal_coverage — Whether to send a notification when AutoSSL cannot add any additional domains because domains that fail DCV exist on the current certificate.
  • 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_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_expiry

value

Boolean

Required

Whether to allow AutoSSL to replace certificates that it did not issue for the clobber_externally_signed parameter.

Whether to send a notification for the notify_autossl_expiry, notify_autossl_expiry_coverage, notify_autossl_renewal, notify_autossl_renewal_coverage, notify_autossl_renewal_coverage_reduced, and notify_autossl_renewal_uncovered_domains parameters.

  • 1 — Notify.
  • 0 — Do not notify.
1

Returns

This function only returns metadata.