# Request best SSL domain for service This function retrieves the most secure domain for a service. Endpoint: GET /SSL/get_cn_name Version: 11.134.0.5 Security: BasicAuth ## Query parameters: - `domain` (any, required) A domain name, cPanel username, or email address. Example: "example.com" - `service` (string, required) The service's name. * * * * Enum: "cpanel", "imap", "pop3", "smtp" - `add_mail_subdomain` (integer) Whether to append to the value to find the best match. For example, if you specify the domain and call this parameter, the function only searches the service domains. * — Append to the value during the search. * — Match on the specified value . Enum: 1, 0 ## Response 200 fields (application/json): - `apiversion` (integer) The version of the API. Example: 3 - `func` (string) The name of the method called. Example: "get_cn_name" - `module` (string) The name of the module called. Example: "SSL" - `result` (object) - `result.data` (object) - `result.data.cert_match_method` (string) The method that the system used to match the certificate with the mail service. * — No domain matches the certificate. * — The domain exactly matches the certificate. * — The domain exactly matches the certificate. * — The subdomain of the domain matches the domain of the wildcard certificate. * — The subdomain of the domain matches the domain of the wildcard certificate. * — The hostname's domain matches the domain of the wildcard certificate. * — The hostname matches the domain of the certificate. * — A subdomain of a domain on the server that matches the certificate. * — A subdomain of a domain on the server matches the certificate. * — A domain on the server matches the certificate. Enum: "none", "exact", "exact-wildcard", "mail-wildcard", "www-wildcard", "hostname-wildcard", "hostname", "localdomain_on_cert-mail-wildcard", "localdomain_on_cert-www-wildcard", "localdomain_on_cert" - `result.data.cert_valid_not_after` (integer) The certificate's expiration date. Example: 1394288638 - `result.data.is_currently_valid` (integer) Whether the certificate is currently valid. * — Valid. * — Invalid. If the certificate is valid, the following statements are true: * The certificate is self-signed (the value is ). * The certificate matches the SSL domain (the value is ). * The certificate is within its validity period (the value is than the current time and date). Enum: 1, 0 - `result.data.is_self_signed` (integer) Whether the certificate is self-signed. * — Self-signed. * — Not self-signed. If the value is , you should ignore this return's value. Enum: 1, 0 - `result.data.is_wild_card` (integer) Whether the certificate is a wildcard certificate. * — Wildcard. * — Not a wildcard. Enum: 1, 0 - `result.data.ssldomain` (string) The best domain to use to access the service. Example: "hostname.example.com" - `result.data.ssldomain_matches_cert` (integer) Whether an SSL-protected domain matches the certificate. * — Matches. * — Does match. Enum: 1, 0 - `result.errors` (array,null) List of errors if the API failed. - `result.messages` (array,null) List of messages generated by the API. - `result.metadata` (object) - `result.status` (integer) * — Success. * — Failed. Check the field for more details. Enum: 1, 0 - `result.warnings` (array,null) List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.