Skip to content

Latest commit

 

History

History
97 lines (65 loc) · 3.34 KB

File metadata and controls

97 lines (65 loc) · 3.34 KB

plesk_wp_toolkit_client.InstallationsFeaturesCacheApi

All URIs are relative to https://example.com/api/modules/wp-toolkit

Method HTTP request Description
clean_installation_cache POST /v1/cache-cleaner

clean_installation_cache

BackgroundTaskWithUrlResponse clean_installation_cache(cache_cleaner_request)

Refresh cache of specified installations

Example

  • Basic Authentication (httpBasic):
  • Api Key Authentication (pleskApiToken):
import plesk_wp_toolkit_client
from plesk_wp_toolkit_client.models.background_task_with_url_response import BackgroundTaskWithUrlResponse
from plesk_wp_toolkit_client.models.cache_cleaner_request import CacheCleanerRequest
from plesk_wp_toolkit_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://example.com/api/modules/wp-toolkit
# See configuration.py for a list of all supported configuration parameters.
configuration = plesk_wp_toolkit_client.Configuration(
    host = "https://example.com/api/modules/wp-toolkit"
)

# 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: httpBasic
configuration = plesk_wp_toolkit_client.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)

# Configure API key authorization: pleskApiToken
configuration.api_key['pleskApiToken'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['pleskApiToken'] = 'Bearer'

# Enter a context with an instance of the API client
with plesk_wp_toolkit_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = plesk_wp_toolkit_client.InstallationsFeaturesCacheApi(api_client)
    cache_cleaner_request = plesk_wp_toolkit_client.CacheCleanerRequest() # CacheCleanerRequest | 

    try:
        api_response = api_instance.clean_installation_cache(cache_cleaner_request)
        print("The response of InstallationsFeaturesCacheApi->clean_installation_cache:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling InstallationsFeaturesCacheApi->clean_installation_cache: %s\n" % e)

Parameters

Name Type Description Notes
cache_cleaner_request CacheCleanerRequest

Return type

BackgroundTaskWithUrlResponse

Authorization

httpBasic, pleskApiToken

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 Created -
400 Bad Request -
404 Not Found -

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