Skip to content

Latest commit

 

History

History
241 lines (164 loc) · 7.4 KB

FeaturesApi.md

File metadata and controls

241 lines (164 loc) · 7.4 KB

clientapi_cpanel.FeaturesApi

All URIs are relative to https://cpanel-server.tld:2083/execute

Method HTTP request Description
get_feature_metadata GET /Features/get_feature_metadata Return cPanel account's features' metadata
has_feature GET /Features/has_feature Validate cPanel account's feature access
list_features GET /Features/list_features Return cPanel account's features

get_feature_metadata

InlineResponse200232 get_feature_metadata()

Return cPanel account's features' metadata

This function lists the details of a cPanel account's available feature lists.

Example

  • Basic Authentication (BasicAuth):
import clientapi_cpanel
from clientapi_cpanel.models.inline_response200232 import InlineResponse200232
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.FeaturesApi(api_client)

    try:
        # Return cPanel account's features' metadata
        api_response = api_instance.get_feature_metadata()
        print("The response of FeaturesApi->get_feature_metadata:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling FeaturesApi->get_feature_metadata: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

InlineResponse200232

Authorization

BasicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 HTTP Request was successful. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

has_feature

InlineResponse200233 has_feature(name)

Validate cPanel account's feature access

This function checks whether a cPanel account has access to a feature.

Example

  • Basic Authentication (BasicAuth):
import clientapi_cpanel
from clientapi_cpanel.models.inline_response200233 import InlineResponse200233
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.FeaturesApi(api_client)
    name = 'autossl' # str | The feature's name.

    try:
        # Validate cPanel account's feature access
        api_response = api_instance.has_feature(name)
        print("The response of FeaturesApi->has_feature:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling FeaturesApi->has_feature: %s\n" % e)

Parameters

Name Type Description Notes
name str The feature's name.

Return type

InlineResponse200233

Authorization

BasicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 HTTP Request was successful. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_features

InlineResponse200234 list_features()

Return cPanel account's features

This function lists a cPanel account's features.

Example

  • Basic Authentication (BasicAuth):
import clientapi_cpanel
from clientapi_cpanel.models.inline_response200234 import InlineResponse200234
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.FeaturesApi(api_client)

    try:
        # Return cPanel account's features
        api_response = api_instance.list_features()
        print("The response of FeaturesApi->list_features:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling FeaturesApi->list_features: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

InlineResponse200234

Authorization

BasicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 HTTP Request was successful. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]