All URIs are relative to /api/v2
| Method | HTTP request | Description |
|---|---|---|
| clients_get | GET /clients | List all clients |
| clients_id_activate_put | PUT /clients/{id}/activate | Activate client |
| clients_id_delete | DELETE /clients/{id} | Delete client account |
| clients_id_domains_get | GET /clients/{id}/domains | List of client domains |
| clients_id_get | GET /clients/{id} | Client details |
| clients_id_put | PUT /clients/{id} | Update client account |
| clients_id_statistics_get | GET /clients/{id}/statistics | Get client stats |
| clients_id_suspend_put | PUT /clients/{id}/suspend | Suspend client |
| clients_post | POST /clients | Create a new Client account |
List[Client] clients_get()
List all clients
- Api Key Authentication (APIKeyHeader):
- Basic Authentication (BasicAuth):
import plesk_client
from plesk_client.models.client import Client
from plesk_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = plesk_client.Configuration(
host = "/api/v2"
)
# 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 API key authorization: APIKeyHeader
configuration.api_key['APIKeyHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKeyHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = plesk_client.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Enter a context with an instance of the API client
with plesk_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = plesk_client.ClientsApi(api_client)
try:
# List all clients
api_response = api_instance.clients_get()
print("The response of ClientsApi->clients_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClientsApi->clients_get: %s\n" % e)This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
StatusResponse clients_id_activate_put(id)
Activate client
- Api Key Authentication (APIKeyHeader):
- Basic Authentication (BasicAuth):
import plesk_client
from plesk_client.models.status_response import StatusResponse
from plesk_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = plesk_client.Configuration(
host = "/api/v2"
)
# 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 API key authorization: APIKeyHeader
configuration.api_key['APIKeyHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKeyHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = plesk_client.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Enter a context with an instance of the API client
with plesk_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = plesk_client.ClientsApi(api_client)
id = 7 # int | Client ID
try:
# Activate client
api_response = api_instance.clients_id_activate_put(id)
print("The response of ClientsApi->clients_id_activate_put:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClientsApi->clients_id_activate_put: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | Client ID |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 404 | Client is not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreatedResponse clients_id_delete(id)
Delete client account
- Api Key Authentication (APIKeyHeader):
- Basic Authentication (BasicAuth):
import plesk_client
from plesk_client.models.created_response import CreatedResponse
from plesk_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = plesk_client.Configuration(
host = "/api/v2"
)
# 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 API key authorization: APIKeyHeader
configuration.api_key['APIKeyHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKeyHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = plesk_client.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Enter a context with an instance of the API client
with plesk_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = plesk_client.ClientsApi(api_client)
id = 7 # int | Client ID
try:
# Delete client account
api_response = api_instance.clients_id_delete(id)
print("The response of ClientsApi->clients_id_delete:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClientsApi->clients_id_delete: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | Client ID |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 404 | Client is not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[DomainResponse] clients_id_domains_get(id)
List of client domains
- Api Key Authentication (APIKeyHeader):
- Basic Authentication (BasicAuth):
import plesk_client
from plesk_client.models.domain_response import DomainResponse
from plesk_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = plesk_client.Configuration(
host = "/api/v2"
)
# 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 API key authorization: APIKeyHeader
configuration.api_key['APIKeyHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKeyHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = plesk_client.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Enter a context with an instance of the API client
with plesk_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = plesk_client.ClientsApi(api_client)
id = 7 # int | Client ID
try:
# List of client domains
api_response = api_instance.clients_id_domains_get(id)
print("The response of ClientsApi->clients_id_domains_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClientsApi->clients_id_domains_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | Client ID |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 404 | Client is not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Client clients_id_get(id)
Client details
- Api Key Authentication (APIKeyHeader):
- Basic Authentication (BasicAuth):
import plesk_client
from plesk_client.models.client import Client
from plesk_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = plesk_client.Configuration(
host = "/api/v2"
)
# 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 API key authorization: APIKeyHeader
configuration.api_key['APIKeyHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKeyHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = plesk_client.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Enter a context with an instance of the API client
with plesk_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = plesk_client.ClientsApi(api_client)
id = 7 # int | Client ID
try:
# Client details
api_response = api_instance.clients_id_get(id)
print("The response of ClientsApi->clients_id_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClientsApi->clients_id_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | Client ID |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 404 | Client is not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreatedResponse clients_id_put(id, body)
Update client account
- Api Key Authentication (APIKeyHeader):
- Basic Authentication (BasicAuth):
import plesk_client
from plesk_client.models.client_update_request import ClientUpdateRequest
from plesk_client.models.created_response import CreatedResponse
from plesk_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = plesk_client.Configuration(
host = "/api/v2"
)
# 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 API key authorization: APIKeyHeader
configuration.api_key['APIKeyHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKeyHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = plesk_client.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Enter a context with an instance of the API client
with plesk_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = plesk_client.ClientsApi(api_client)
id = 7 # int | Client ID
body = plesk_client.ClientUpdateRequest() # ClientUpdateRequest | Client data
try:
# Update client account
api_response = api_instance.clients_id_put(id, body)
print("The response of ClientsApi->clients_id_put:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClientsApi->clients_id_put: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | Client ID | |
| body | ClientUpdateRequest | Client data |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Invalid request data | - |
| 404 | Client is not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ClientStatistics clients_id_statistics_get(id)
Get client stats
- Api Key Authentication (APIKeyHeader):
- Basic Authentication (BasicAuth):
import plesk_client
from plesk_client.models.client_statistics import ClientStatistics
from plesk_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = plesk_client.Configuration(
host = "/api/v2"
)
# 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 API key authorization: APIKeyHeader
configuration.api_key['APIKeyHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKeyHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = plesk_client.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Enter a context with an instance of the API client
with plesk_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = plesk_client.ClientsApi(api_client)
id = 7 # int | Client ID
try:
# Get client stats
api_response = api_instance.clients_id_statistics_get(id)
print("The response of ClientsApi->clients_id_statistics_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClientsApi->clients_id_statistics_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | Client ID |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 404 | Client is not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
StatusResponse clients_id_suspend_put(id)
Suspend client
- Api Key Authentication (APIKeyHeader):
- Basic Authentication (BasicAuth):
import plesk_client
from plesk_client.models.status_response import StatusResponse
from plesk_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = plesk_client.Configuration(
host = "/api/v2"
)
# 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 API key authorization: APIKeyHeader
configuration.api_key['APIKeyHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKeyHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = plesk_client.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Enter a context with an instance of the API client
with plesk_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = plesk_client.ClientsApi(api_client)
id = 7 # int | Client ID
try:
# Suspend client
api_response = api_instance.clients_id_suspend_put(id)
print("The response of ClientsApi->clients_id_suspend_put:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClientsApi->clients_id_suspend_put: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | Client ID |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 404 | Client is not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreatedResponse clients_post(body)
Create a new Client account
- Api Key Authentication (APIKeyHeader):
- Basic Authentication (BasicAuth):
import plesk_client
from plesk_client.models.client_request import ClientRequest
from plesk_client.models.created_response import CreatedResponse
from plesk_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = plesk_client.Configuration(
host = "/api/v2"
)
# 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 API key authorization: APIKeyHeader
configuration.api_key['APIKeyHeader'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKeyHeader'] = 'Bearer'
# Configure HTTP basic authorization: BasicAuth
configuration = plesk_client.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Enter a context with an instance of the API client
with plesk_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = plesk_client.ClientsApi(api_client)
body = plesk_client.ClientRequest() # ClientRequest | Client data
try:
# Create a new Client account
api_response = api_instance.clients_post(body)
print("The response of ClientsApi->clients_post:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ClientsApi->clients_post: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| body | ClientRequest | Client data |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Client account successfully created | - |
| 400 | Invalid request data | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]