All URIs are relative to https://cpanel-server.tld:2083/execute
| Method | HTTP request | Description |
|---|---|---|
| fetch_url | GET /Integration/fetch_url | Return integrated application URL |
| firstfile_relative_uri | GET /Parser/firstfile_relative_uri | Return session relative URI |
InlineResponse200274 fetch_url(app)
Return integrated application URL
This function returns the URL for an integrated application.
- Basic Authentication (BasicAuth):
import clientapi_cpanel
from clientapi_cpanel.models.inline_response200274 import InlineResponse200274
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.URLParsingApi(api_client)
app = 'applicationname' # str | The application's name.
try:
# Return integrated application URL
api_response = api_instance.fetch_url(app)
print("The response of URLParsingApi->fetch_url:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling URLParsingApi->fetch_url: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| app | str | The application's name. |
- 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]
InlineResponse200366 firstfile_relative_uri()
Return session relative URI
This function reports the first file's URI, relative to the cPanel base directory.
- Basic Authentication (BasicAuth):
import clientapi_cpanel
from clientapi_cpanel.models.inline_response200366 import InlineResponse200366
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.URLParsingApi(api_client)
try:
# Return session relative URI
api_response = api_instance.firstfile_relative_uri()
print("The response of URLParsingApi->firstfile_relative_uri:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling URLParsingApi->firstfile_relative_uri: %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]