Skip to content

Latest commit

 

History

History
160 lines (108 loc) · 5 KB

WordPressSiteApi.md

File metadata and controls

160 lines (108 loc) · 5 KB

clientapi_cpanel.WordPressSiteApi

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

Method HTTP request Description
word_press_site_create GET /WordPressSite/create Install WordPress site
word_press_site_retrieve GET /WordPressSite/retrieve Return WordPress site information

word_press_site_create

InlineResponse200576 word_press_site_create()

Install WordPress site

This function installs a WordPress site for cPanel user's primary domain.

Example

  • Basic Authentication (BasicAuth):
import clientapi_cpanel
from clientapi_cpanel.models.inline_response200576 import InlineResponse200576
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.WordPressSiteApi(api_client)

    try:
        # Install WordPress site
        api_response = api_instance.word_press_site_create()
        print("The response of WordPressSiteApi->word_press_site_create:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling WordPressSiteApi->word_press_site_create: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

InlineResponse200576

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]

word_press_site_retrieve

InlineResponse200577 word_press_site_retrieve()

Return WordPress site information

This function retrieves the installation status and detailed information of the WordPress site for cPanel user's primary domain.

Example

  • Basic Authentication (BasicAuth):
import clientapi_cpanel
from clientapi_cpanel.models.inline_response200577 import InlineResponse200577
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.WordPressSiteApi(api_client)

    try:
        # Return WordPress site information
        api_response = api_instance.word_press_site_retrieve()
        print("The response of WordPressSiteApi->word_press_site_retrieve:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling WordPressSiteApi->word_press_site_retrieve: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

InlineResponse200577

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]