All URIs are relative to https://cpanel-server.tld:2083/execute
Method | HTTP request | Description |
---|---|---|
retrieve | GET /UserTasks/retrieve | Return task queue information |
user_tasks_delete | GET /UserTasks/delete | Remove item from task queue |
InlineResponse200538 retrieve()
Return task queue information
This function retrieves a cPanel account's user task queue information.
Each cPanel account uses a separate user task queue in order to ensure that processes for one user do not impede another user on the server.
- For example, the Git Version Control
interface (cPanel >> Home >> Files >> Git Version Control) uses the user task queue
to clone repositories (via the
VersionControl::create
function). - For more information, read our Task Queue Monitor documentation.
- Basic Authentication (BasicAuth):
import clientapi_cpanel
from clientapi_cpanel.models.inline_response200538 import InlineResponse200538
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.UserTasksApi(api_client)
try:
# Return task queue information
api_response = api_instance.retrieve()
print("The response of UserTasksApi->retrieve:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling UserTasksApi->retrieve: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | HTTP Request was successful. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse200537 user_tasks_delete(id)
Remove item from task queue
This function deletes a process from the user task queue.
Each cPanel account uses a separate user task queue in order to ensure that processes for one user do not impede another user on the server.
- For example, the Git Version Control
interface (cPanel >> Home >> Files >> Git Version Control) uses the user task queue
to clone repositories (via the
VersionControl::create
function). - For more information, read our Task Queue Monitor documentation.
- Basic Authentication (BasicAuth):
import clientapi_cpanel
from clientapi_cpanel.models.inline_response200537 import InlineResponse200537
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.UserTasksApi(api_client)
id = '00000000/5a9ec8dd4c345d' # str | The task's ID number.
try:
# Remove item from task queue
api_response = api_instance.user_tasks_delete(id)
print("The response of UserTasksApi->user_tasks_delete:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling UserTasksApi->user_tasks_delete: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | The task's ID number. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | HTTP Request was successful. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]