Child pages
  • WHM API 1 Functions - set_autossl_metadata_key
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 a single key and value pair as a parameter instead of JSON and you can only enter one key and value pair per function call.


Examples


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/set_autossl_metadata_key?api.version=1&key=clobber_externally_signed&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
 Command Line
whmapi1 set_autossl_metadata_key key=clobber_externally_signed 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. 

 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

Note:

This function only accepts a single key and value pair. To set all values, use the WHM API 1 function set_autossl_metadata or make multiple calls to this function

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 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_renewal — Whether to send a notification when AutoSSL successfully renews a certificate.
  • 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_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 — Allow or Notify.
  • 0 — Do not allow or notify.
1

Returns

This function only returns metadata.