All URIs are relative to /api/v2
| Method | HTTP request | Description |
|---|---|---|
| domains_get | GET /domains | List all domains |
| domains_id_client_get | GET /domains/{id}/client | Get domain client |
| domains_id_delete | DELETE /domains/{id} | Delete a Domain |
| domains_id_get | GET /domains/{id} | Domain details |
| domains_id_put | PUT /domains/{id} | Update a Domain |
| domains_id_status_get | GET /domains/{id}/status | Get Domain status |
| domains_id_status_put | PUT /domains/{id}/status | Update a Domain status |
| domains_post | POST /domains | Create a new Domain |
List[DomainResponse] domains_get(name=name)
List all 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.DomainsApi(api_client)
name = 'example.com' # str | Filter data by domain name (optional)
try:
# List all domains
api_response = api_instance.domains_get(name=name)
print("The response of DomainsApi->domains_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DomainsApi->domains_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| name | str | Filter data by domain name | [optional] |
- 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]
Client domains_id_client_get(id)
Get domain client
- 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.DomainsApi(api_client)
id = 1 # int | Domain ID
try:
# Get domain client
api_response = api_instance.domains_id_client_get(id)
print("The response of DomainsApi->domains_id_client_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DomainsApi->domains_id_client_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | Domain ID |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 404 | Domain is not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreatedResponse domains_id_delete(id)
Delete a Domain
- 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.DomainsApi(api_client)
id = 1 # int | Domain ID
try:
# Delete a Domain
api_response = api_instance.domains_id_delete(id)
print("The response of DomainsApi->domains_id_delete:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DomainsApi->domains_id_delete: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | Domain ID |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Invalid request data | - |
| 404 | Domain is not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DomainResponse domains_id_get(id)
Domain details
- 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.DomainsApi(api_client)
id = 1 # int | Domain ID
try:
# Domain details
api_response = api_instance.domains_id_get(id)
print("The response of DomainsApi->domains_id_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DomainsApi->domains_id_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | Domain ID |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 404 | Domain is not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreatedResponse domains_id_put(id, body)
Update a Domain
- Api Key Authentication (APIKeyHeader):
- Basic Authentication (BasicAuth):
import plesk_client
from plesk_client.models.created_response import CreatedResponse
from plesk_client.models.domain_request import DomainRequest
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.DomainsApi(api_client)
id = 1 # int | Domain ID
body = plesk_client.DomainRequest() # DomainRequest | Domain
try:
# Update a Domain
api_response = api_instance.domains_id_put(id, body)
print("The response of DomainsApi->domains_id_put:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DomainsApi->domains_id_put: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | Domain ID | |
| body | DomainRequest | Domain |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Invalid request data | - |
| 404 | Domain is not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DomainStatus domains_id_status_get(id)
Get Domain status
- Api Key Authentication (APIKeyHeader):
- Basic Authentication (BasicAuth):
import plesk_client
from plesk_client.models.domain_status import DomainStatus
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.DomainsApi(api_client)
id = 1 # int | Domain ID
try:
# Get Domain status
api_response = api_instance.domains_id_status_get(id)
print("The response of DomainsApi->domains_id_status_get:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DomainsApi->domains_id_status_get: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | Domain ID |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 404 | Domain is not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DomainStatus domains_id_status_put(id, body)
Update a Domain status
- Api Key Authentication (APIKeyHeader):
- Basic Authentication (BasicAuth):
import plesk_client
from plesk_client.models.domain_status import DomainStatus
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.DomainsApi(api_client)
id = 1 # int | Domain ID
body = plesk_client.DomainStatus() # DomainStatus | Domain status
try:
# Update a Domain status
api_response = api_instance.domains_id_status_put(id, body)
print("The response of DomainsApi->domains_id_status_put:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DomainsApi->domains_id_status_put: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | Domain ID | |
| body | DomainStatus | Domain status |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 400 | Invalid request data | - |
| 404 | Domain is not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreatedResponse domains_post(body)
Create a new Domain
- Api Key Authentication (APIKeyHeader):
- Basic Authentication (BasicAuth):
import plesk_client
from plesk_client.models.created_response import CreatedResponse
from plesk_client.models.domain_request import DomainRequest
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.DomainsApi(api_client)
body = plesk_client.DomainRequest() # DomainRequest | Domain data
try:
# Create a new Domain
api_response = api_instance.domains_post(body)
print("The response of DomainsApi->domains_post:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DomainsApi->domains_post: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| body | DomainRequest | Domain data |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Domain successfully created | - |
| 400 | Invalid request data | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]