Python SDK for interacting with the CxEngage API
Project description
CxAdmin
CxAdmin is a Python API client for the CxEngage API. It is a work in progress and is not yet complete.
All objects are designed to mirror their CxEngage counterparts. For example, a CxList object has the exact same properties as a list on the CxEngage platform. Together with the way this program is designed, this means you can fetch items from CxEngage, manipulate them locally, and then upload them back to CxEngage, without having to worry about the API.
This API is designed to be easily expandable. If you would like to add functionality, please feel free to submit a pull request.
To Do
- [] Any object to CSV
Usage – Contents
Set up API client
import CxAdmin
cx = CxAdmin.Cx(
baseURL="your_base_url", # https://eu-west-1-prod-api.cxengage.net for EU, https://api.cxengage.net for US
apiKey="your_api_key",
apiSecret="your_api_secret",
tenantID="your_tenant_id",
)
or
import CxAdmin
cx = CxAdmin.Cx.fromConfigFile("config.json")
Example config.json
{
"baseURL": "https://eu-west-1-prod-api.cxengage.net",
"apiKey": "73668f12-4da1-9991-p182-83ufb38193pa",
"apiSecret": "biglongjumblystringoflettersandnumbershere",
"tenantID": "893jwa23-85k2-895k-1562-93pot7367185"
}
Queues
Get list of queues
cx.queues.getQueues()
or
cx.queues.get() # same as getQueues()
Get active queues
cx.queues.getActiveQueues()
Lists
Get all lists
cx.lists.get()
Get list by ID
cx.lists.getList(listId)
Get list as CSV
cx.lists.getListCSV(listId)
Convert list object to CSV
myList = cx.lists.getList(listId) # get a list
csv: list[str] = myList.toCSV() # convert to CSV, returns a list of strings
Users
Get all users
cx.users.getAllUsers()
or
cx.users.get() # same as getAllUsers()
Groups
Get all groups
cx.groups.getGroups()
or
cx.groups.get() # same as getGroups()
Environment
Get tenant
cx.environment.getTenant()
or
cx.environment.get() # same as getTenant()
Get regions
cx.environment.getRegions()
Flows
Get all flows
cx.flows.getFlows()
or
cx.flows.get() # same as getFlows()
Statistics
cx.statistics.getInteractions(between: (datetime, datetime))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for CxAdmin-1.0.56.2b1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b8748c83cc216b1514e588ce2f00077facf262a9438ee0a248b8bc466c281d3 |
|
MD5 | 2b1c7cf86fcc0743df19769e1d8d2854 |
|
BLAKE2b-256 | e83caa42df83bf7dcbc383a5162a2531940e32c4eeff6de41bc7d31e837883fc |