Request best SSL certificate

This function retrieves the best-available certificate for the domain. The function also retrieves the certificate's associated private key and CA bundle, if available.

Important:

When you disable the Calendars and Contacts, Receive Mail, Web Disk, Webmail, and Web Server roles, the system disables this function.

SecurityBasicAuth
Request
query Parameters
domain
required
string <domain>

The domain name.

Example: domain=example.com
Responses
200

HTTP Request was successful.

Response Schema: application/json
apiversion
integer

The version of the API.

func
string

The name of the method called.

module
string

The name of the module called.

object
get/SSL/fetch_best_for_domain
Request samples
uapi --output=jsonpretty \
  --user=username \
  SSL \
  fetch_best_for_domain \
  domain='example.com'
Response samples
application/json
{
  • "apiversion": 3,
  • "func": "fetch_best_for_domain",
  • "module": "SSL",
  • "result": {
    • "data": {
      • "cab": "-----BEGIN CERTIFICATE-----\nMIID/DCCAuSgZwBBAvIFANEXIaYwDQYJKoZIhvcNAQELBQAwFjEUMBIGA1UEAwwL\nZXhhbXBsZS5jb20wHhcNMjAwNDA2MTY0NDU2WhcNMjEwNDA2MTY0NDU2WjAWMRQw\nEgYDVQQDDAtleGFtcGxlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC\nggEBALuCGWz/aFOr5TPBehISu3LkcGvnNFg9eY8rVXbNFfpBzyzdWrx5IiMtBcDx\nAZXMOU7GSZyFhSB6cjNfCaESXC/gBTa0sZ/b4b4etNUlNHUFAatb9WckQ6AtWbVA\npxu8aw/5AjAKgMbkaNrUY3vzLzin11CyGOFkbAKwVqT13Z3Yyz/xuz7x2+yMwPBh\n9mEP0tXjvCz7NzETFSTysn9Sf+VjUle0upnpl8Q7GK52CDpvwdqE/O6MrTx/XrXm\nYUfeSkZd+nqFm4oxmrf01hOL2IlEit1RupILwVm2/8CK2sAdazTqh4LapA962b9V\nSKm31YbsGT3kQg5EERbjIgiN6M8CAwEAAaOCAU8wggFLMB0GA1UdDgQWBBRhFUQb\nh7YE6tgcpiHke60td96d4zAJBgNVHRMEAjAAMEIGA1UdIwQ7MDmAFGEVRBuHtgTq\n2BymIeR7rS133p3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h3jFPxGGIBJTTmKIScSbg==\n-----END CERTIFICATE-----",
      • "crt_origin": "username",
      • "domain": "example.com",
      • "ip": "192.168.0.1",
      • "key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEpAIBBCKAAQNAu4IZbP0oU6vlM8F6EhK9cuRrs+c1WD24jytPds0V+kH+LN1a\nvHkiIy0FwPABlcw5TrZJnIWFIHpyM18JoRJcM+AFNrSxn9vhvh601SU0dQUBq1v1\nZyRDoC1ZtUCnG7xrD/kCMAqAxuRo2tRje/MvOKfXULIY4WRsArBWpPXdndjLP/G7\nPvHb7IzA8GH2YQ/S1eO8LPs3MRMVJPKyf1J/5WNSV7S6memXxDsYrnYIOm/B2oT8\n7oytPH9eteZhR95KRl36eoWbijGat/TWE4vYiUSK3VG6kgvBWbb/wIrawB1rNOqH\ngtqkD3rZv1VIqbfVhuwZPeRCDkQRFuMiCI3ozwIDAQABAoIBAFADflIS0zQRQCdL\nwol/0NmAPbDt4lpdMUg0161wapZ2CrA8bQHMNxMHnVLuBR0lHrdMyhCusVZgqebe\nAT/ok8oiMFdd2AY9UCFO/R+PVskwr7ut7BRtVyY88/Dye9zMFGumeJaDhNxaj5wB\n0coMxfPJO4pF1XQo5CZplS+jc0RtiNnRmWP/zwwtH+QwT43GXKS3U3QgX1a/7Yzw\nliUFuggsjysNPovM5NzcgzYfVlMg3F9fDnMeve2s/MO6/wCIp1+SHN89DwluDmw0\nII0sJDtBRB1nPqseLV1XwYImdSosKuaUIK225vQy/cXK9S/zcq6+d6P5efCw8nRg\nbCfwd7ECgYEA8Agkx+P7zBAWItnkrNzah6QaWd3VP5bSw6WeHwcWIS1h3ASKSr3u\nT8rp5qDTk92eV/g5Uqr5lr8txnp448wnipeK0LDF4r+uhOsHOY4B4eFiTsRecXKD\nzlcC/ees4UOzbdptqosyAG5ub8UMwEH0zPOCszpnIhZkm004EHxc8zUCgYEAx/t0\nF1DYHm834CYyHfq3XiuB3yNECKMQZ1lgcq8IXaO3EJKnaSF3INogS1lZ6hQR2AW+\ntr+U6LdBRzsxH0ZeHu/lYCZ6ssgV3H6HTLlFVRysufVdlLaeaKAMuEADrUhVgvVA\n8rNM+8WSxrfya+2a/PwyJD9YdHCITcXVdwHHCHMCgYBLhYRtECJNVlJgrMXyTZrE\nSrGvzMgntcCiph1WDdi8n5bGrvcEBTZSDLoDQl7Pi08ixorio8Db2VMBu88FfVqD\nlKKsfrIEYeL7FyeyyCd3dn6D4e0FLM6jwWTDln0iczalPbB7lEgrMpO0vv8ADsCD\nK6rX1ZxZoWoOQwF8zmRAcQKBgQC85weoJpOfXAt5zlq1+ulPKOXKs3NGfVG3bjOp\n4SuT2FvKad19b0EqZSDzR/ylIkQgvHyD/8BXexNMh9tE4aFys8UF6BMq4dnUqCiC\nDtgxJ575IY8+NKq5xcV+HenbO2KbC7RIDZqAkQauc3+o947ZvhhXKQcTJmF6pY+Y\nlLM/hQKBgQCplo1rGsimNitBb2iw2B+jDJoMBLYjWeZWcr8VMwVlN9DXPG19uXKq\nCsbrteMX3VedbeRYk/NITsasRefZq7JDSe9JbsPxj3I+/nzV0EbMXX9cxJL3hkCc\n5QAmE/BMR7yh0odK57o+mcQZtecIEO1BK/qW6Au0otQHPraygGCwkQ==\n-----END RSA PRIVATE KEY-----",
      • "key_origin": "username",
      • "searched_users": [
        • "username"
        ],
      • "status": 1,
      • "statusmsg": "ok",
      • "user": "username"
      },
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}