Skip to content

Latest commit

 

History

History
164 lines (111 loc) · 5.76 KB

AccountEnhancementsApi.md

File metadata and controls

164 lines (111 loc) · 5.76 KB

clientapi_cpanel.AccountEnhancementsApi

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

Method HTTP request Description
account_enhancements_has_enhancement GET /AccountEnhancements/has_enhancement Validate Account Enhancement assignment
account_enhancements_list GET /AccountEnhancements/list Return all cPanel account's Account Enhancements

account_enhancements_has_enhancement

InlineResponse200 account_enhancements_has_enhancement(id)

Validate Account Enhancement assignment

This function returns whether a cPanel account has a specific Account Enhancement.

Example

  • Basic Authentication (BasicAuth):
import clientapi_cpanel
from clientapi_cpanel.models.inline_response200 import InlineResponse200
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.AccountEnhancementsApi(api_client)
    id = 'sample-enhancement-id' # str | The identifier for a specific Account Enhancement.  **Note:**  To retrieve a list of all Account Enhancements IDs on the server, run the WHM API 1 `list_account_enhancements` function.

    try:
        # Validate Account Enhancement assignment
        api_response = api_instance.account_enhancements_has_enhancement(id)
        print("The response of AccountEnhancementsApi->account_enhancements_has_enhancement:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AccountEnhancementsApi->account_enhancements_has_enhancement: %s\n" % e)

Parameters

Name Type Description Notes
id str The identifier for a specific Account Enhancement. Note: To retrieve a list of all Account Enhancements IDs on the server, run the WHM API 1 `list_account_enhancements` function.

Return type

InlineResponse200

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]

account_enhancements_list

InlineResponse2001 account_enhancements_list()

Return all cPanel account's Account Enhancements

This function lists a cPanel account's Account Enhancements.

Example

  • Basic Authentication (BasicAuth):
import clientapi_cpanel
from clientapi_cpanel.models.inline_response2001 import InlineResponse2001
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.AccountEnhancementsApi(api_client)

    try:
        # Return all cPanel account's Account Enhancements
        api_response = api_instance.account_enhancements_list()
        print("The response of AccountEnhancementsApi->account_enhancements_list:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AccountEnhancementsApi->account_enhancements_list: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

InlineResponse2001

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]