All URIs are relative to https://cpanel-server.tld:2083/execute
Method | HTTP request | Description |
---|---|---|
list_ssl_capable_domains | GET /WebVhosts/list_ssl_capable_domains | Return domains that allow SSL certificate purchase |
web_vhosts_list_domains | GET /WebVhosts/list_domains | Return virtual host names for domains |
InlineResponse200554 list_ssl_capable_domains()
Return domains that allow SSL certificate purchase
This function lists every domain for which you may purchase an SSL certificate. The possible domains for the Secure Sockets Layer (SSL) certificate include applicable service subdomains.
- Basic Authentication (BasicAuth):
import clientapi_cpanel
from clientapi_cpanel.models.inline_response200554 import InlineResponse200554
from clientapi_cpanel.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://cpanel-server.tld:2083/execute
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_cpanel.Configuration(
host = "https://cpanel-server.tld:2083/execute"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_cpanel.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Enter a context with an instance of the API client
with clientapi_cpanel.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_cpanel.VirtualHostInformationApi(api_client)
try:
# Return domains that allow SSL certificate purchase
api_response = api_instance.list_ssl_capable_domains()
print("The response of VirtualHostInformationApi->list_ssl_capable_domains:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling VirtualHostInformationApi->list_ssl_capable_domains: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | HTTP Request was successful. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse200553 web_vhosts_list_domains()
Return virtual host names for domains
This function lists virtual host names for each domain.
- Basic Authentication (BasicAuth):
import clientapi_cpanel
from clientapi_cpanel.models.inline_response200553 import InlineResponse200553
from clientapi_cpanel.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://cpanel-server.tld:2083/execute
# See configuration.py for a list of all supported configuration parameters.
configuration = clientapi_cpanel.Configuration(
host = "https://cpanel-server.tld:2083/execute"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: BasicAuth
configuration = clientapi_cpanel.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Enter a context with an instance of the API client
with clientapi_cpanel.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = clientapi_cpanel.VirtualHostInformationApi(api_client)
try:
# Return virtual host names for domains
api_response = api_instance.web_vhosts_list_domains()
print("The response of VirtualHostInformationApi->web_vhosts_list_domains:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling VirtualHostInformationApi->web_vhosts_list_domains: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | HTTP Request was successful. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]