# Return SSL-encrypted domain for service access This function retrieves the most appropriate SSL-encrypted domain to use to access a service. Endpoint: GET /get_best_ssldomain_for_service Version: 11.134.0.5 Security: BasicAuth ## Query parameters: - `service` (string, required) The service's name. Example: "whostmgr" ## Response 200 fields (application/json): - `data` (object) - `data.cert_match_method` (string) The method that the system used to match the domain with the certificate. * — No domain matches the certificate. * — The domain exactly matches the certificate. * — The domain exactly matches the domain of a wildcard certificate. * — The mail 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. * — Any subdomain of any domain on the server matches the certificate. * — Any subdomain of any domain on the server matches the certificate. * — Any 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" - `data.cert_valid_not_after` (integer) The expiration date of the certificate. Example: 1457452989 - `data.is_currently_valid` (integer) Whether the certificate is currently valid. * — The certificate is valid. * — The certificate is valid. 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 less than the current time and date). Enum: 0, 1 - `data.is_self_signed` (integer) Whether the certificate is self-signed. * — The certificate is self-signed. * — The certificate is self-signed. For legacy reasons, if the value is , then the function will return a value of for the return, regardless of whether the certificate is actually self-signed. Enum: 0, 1 - `data.is_wild_card` (integer) Whether the service uses a wildcard certificate. * — The service uses a wildcard certificate. * — The service does use a wildcard certificate. Enum: 0, 1 - `data.ssldomain` (string) The domain of the service's SSL certificate. Example: "hostname.example.com" - `data.ssldomain_matches_cert` (integer) Whether an SSL-encrypted domain matches the certificate. * — Matches. * — Does match. Enum: 0, 1 - `metadata` (object) - `metadata.command` (string) The method name called. Example: "get_best_ssldomain_for_service" - `metadata.reason` (string) The reason the API function failed when the field is 0. This field may display a success message when a function succeeds. Example: "OK" - `metadata.result` (integer) * - Success * - Failed: Check the reason field for more details. Enum: 0, 1 - `metadata.version` (integer) The version of the API function. Example: 1