API for online agents
This Python package is automatically generated by the OpenAPI Generator project:
- API version: v1
- Package version: 1.0.0
- Generator version: 7.14.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
Python 3.9+
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/truehostcloud/agent-metrics-python-client.git(you may need to run pip with root permission: sudo pip install git+https://github.com/truehostcloud/agent-metrics-python-client.git)
Then import the package:
import agent_metrics_clientInstall via Setuptools.
python setup.py install --user(or sudo python setup.py install to install the package for all users)
Then import the package:
import agent_metrics_clientExecute pytest to run the tests.
Please follow the installation procedure and then run the following:
import agent_metrics_client
from agent_metrics_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8000
# See configuration.py for a list of all supported configuration parameters.
configuration = agent_metrics_client.Configuration(
host = "http://localhost:8000"
)
# 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: TokenAuth
configuration.api_key['TokenAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['TokenAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with agent_metrics_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = agent_metrics_client.CsatApi(api_client)
try:
api_instance.csat_save_create()
except ApiException as e:
print("Exception when calling CsatApi->csat_save_create: %s\n" % e)All URIs are relative to host
| Class | Method | HTTP request | Description |
|---|---|---|---|
| OnlineAgentsApi | online_agents_list | GET /online-agents/ |
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header