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

 

Description

This function sets values for AutoSSL's metadata keys. These keys allow you to replace certificates that AutoSSL did not issue.

Examples


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/set_autossl_metadata?api.version=1&metadata_json=%7B%22clobber_externally_signed%22%3A1%7D
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/set_autossl_metadata?api.version=1&metadata_json=%7B%22clobber_externally_signed%22%3A1%7D
 Command Line
whmapi1 set_autossl_metadata metadata_json={\"clobber_externally_signed\":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"
    }
}
 Output (XML)
<result>
    <metadata>
        <version>1</version>
        <reason>OK</reason>
        <result>1</result>
        <command>set_autossl_metadata</command>
    </metadata>
</result>

Note:

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

Parameters

ParameterTypeDescriptionPossible valuesExample
metadata_jsonJSON

Required

A JSON-encoded hash of metadata keys and values which control AutoSSL's behavior.

This hash contains the clobber_externally_signed parameter.
{\"clobber_externally_signed\":1}

clobber_externally_signed

Boolean

This option will 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.

The function accepts this parameter in the metadata_json hash.

  • 1 — Replace the certificate.
  • 0 — Do not replace the certificate.
1

Returns

This function only returns metadata.