instruction
stringlengths 81
221
| input
stringlengths 50
1.19k
| output
stringlengths 525
3.61k
|
---|---|---|
Provide a Python example that uses the POST /api/v2/telephony/providers/edges/sites/{siteId}/outboundroutes Genesys Cloud Python SDK. | Genesys describes this as an API used to: Create outbound route | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
site_id = 'site_id_example' # str | Site ID
body = PureCloudPlatformClientV2.OutboundRouteBase() # OutboundRouteBase | OutboundRoute
try:
# Create outbound route
api_response = api_instance.post_telephony_providers_edges_site_outboundroutes(site_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->post_telephony_providers_edges_site_outboundroutes: %s\n" % e)``` |
Provide a Python example that uses the DELETE /api/v2/telephony/providers/edges/sites/{siteId}/outboundroutes/{outboundRouteId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Delete Outbound Route | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
site_id = 'site_id_example' # str | Site ID
outbound_route_id = 'outbound_route_id_example' # str | Outbound route ID
try:
# Delete Outbound Route
api_instance.delete_telephony_providers_edges_site_outboundroute(site_id, outbound_route_id)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->delete_telephony_providers_edges_site_outboundroute: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/sites/{siteId}/outboundroutes/{outboundRouteId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get an outbound route | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
site_id = 'site_id_example' # str | Site ID
outbound_route_id = 'outbound_route_id_example' # str | Outbound route ID
try:
# Get an outbound route
api_response = api_instance.get_telephony_providers_edges_site_outboundroute(site_id, outbound_route_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_site_outboundroute: %s\n" % e)``` |
Provide a Python example that uses the PUT /api/v2/telephony/providers/edges/sites/{siteId}/outboundroutes/{outboundRouteId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Update outbound route | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
site_id = 'site_id_example' # str | Site ID
outbound_route_id = 'outbound_route_id_example' # str | Outbound route ID
body = PureCloudPlatformClientV2.OutboundRouteBase() # OutboundRouteBase | OutboundRoute
try:
# Update outbound route
api_response = api_instance.put_telephony_providers_edges_site_outboundroute(site_id, outbound_route_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->put_telephony_providers_edges_site_outboundroute: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/sites/{siteId}/siteconnections Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get site connections for a site. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
site_id = 'site_id_example' # str | Site ID
try:
# Get site connections for a site.
api_response = api_instance.get_telephony_providers_edges_site_siteconnections(site_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_site_siteconnections: %s\n" % e)``` |
Provide a Python example that uses the PATCH /api/v2/telephony/providers/edges/sites/{siteId}/siteconnections Genesys Cloud Python SDK. | Genesys describes this as an API used to: Disable site connections for a site. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
site_id = 'site_id_example' # str | Site ID
body = PureCloudPlatformClientV2.DisableSiteConnectionsRequest() # DisableSiteConnectionsRequest | Site
try:
# Disable site connections for a site.
api_response = api_instance.patch_telephony_providers_edges_site_siteconnections(site_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->patch_telephony_providers_edges_site_siteconnections: %s\n" % e)``` |
Provide a Python example that uses the PUT /api/v2/telephony/providers/edges/sites/{siteId}/siteconnections Genesys Cloud Python SDK. | Genesys describes this as an API used to: Update site connections for a site. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
site_id = 'site_id_example' # str | Site ID
body = PureCloudPlatformClientV2.SiteConnections() # SiteConnections | Site
try:
# Update site connections for a site.
api_response = api_instance.put_telephony_providers_edges_site_siteconnections(site_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->put_telephony_providers_edges_site_siteconnections: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/timezones Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get a list of Edge-compatible time zones | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
page_size = 1000 # int | Page size (optional) (default to 1000)
page_number = 1 # int | Page number (optional) (default to 1)
try:
# Get a list of Edge-compatible time zones
api_response = api_instance.get_telephony_providers_edges_timezones(page_size=page_size, page_number=page_number)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_timezones: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/trunkbasesettings Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get Trunk Base Settings listing. Managed properties will not be returned unless the user is assigned the internal:trunk:edit permission. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
page_number = 1 # int | Page number (optional) (default to 1)
page_size = 25 # int | Page size (optional) (default to 25)
sort_by = ''name'' # str | Value by which to sort (optional) (default to 'name')
sort_order = ''ASC'' # str | Sort order (optional) (default to 'ASC')
recording_enabled = True # bool | Filter trunks by recording enabled (optional)
ignore_hidden = True # bool | Set this to true to not receive trunk properties that are meant to be hidden or for internal system usage only. (optional)
managed = True # bool | Filter by managed (optional)
expand = ['expand_example'] # list[str] | Fields to expand in the response, comma-separated (optional)
name = 'name_example' # str | Name of the TrunkBase to filter by (optional)
try:
# Get Trunk Base Settings listing
api_response = api_instance.get_telephony_providers_edges_trunkbasesettings(page_number=page_number, page_size=page_size, sort_by=sort_by, sort_order=sort_order, recording_enabled=recording_enabled, ignore_hidden=ignore_hidden, managed=managed, expand=expand, name=name)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_trunkbasesettings: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/telephony/providers/edges/trunkbasesettings Genesys Cloud Python SDK. | Genesys describes this as an API used to: Create a Trunk Base Settings object | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
body = PureCloudPlatformClientV2.TrunkBase() # TrunkBase | Trunk base settings
try:
# Create a Trunk Base Settings object
api_response = api_instance.post_telephony_providers_edges_trunkbasesettings(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->post_telephony_providers_edges_trunkbasesettings: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/trunkbasesettings/availablemetabases Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get a list of available makes and models to create a new Trunk Base Settings | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
type = 'type_example' # str | (optional)
page_size = 25 # int | (optional) (default to 25)
page_number = 1 # int | (optional) (default to 1)
try:
# Get a list of available makes and models to create a new Trunk Base Settings
api_response = api_instance.get_telephony_providers_edges_trunkbasesettings_availablemetabases(type=type, page_size=page_size, page_number=page_number)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_trunkbasesettings_availablemetabases: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/trunkbasesettings/template Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get a Trunk Base Settings instance template from a given make and model. This object can then be modified and saved as a new Trunk Base Settings instance | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
trunk_metabase_id = 'trunk_metabase_id_example' # str | The id of a metabase object upon which to base this Trunk Base Settings
try:
# Get a Trunk Base Settings instance template from a given make and model. This object can then be modified and saved as a new Trunk Base Settings instance
api_response = api_instance.get_telephony_providers_edges_trunkbasesettings_template(trunk_metabase_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_trunkbasesettings_template: %s\n" % e)``` |
Provide a Python example that uses the DELETE /api/v2/telephony/providers/edges/trunkbasesettings/{trunkBaseSettingsId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Delete a Trunk Base Settings object by ID | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
trunk_base_settings_id = 'trunk_base_settings_id_example' # str | Trunk Base ID
try:
# Delete a Trunk Base Settings object by ID
api_instance.delete_telephony_providers_edges_trunkbasesetting(trunk_base_settings_id)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->delete_telephony_providers_edges_trunkbasesetting: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/trunkbasesettings/{trunkBaseSettingsId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get a Trunk Base Settings object by ID. Managed properties will not be returned unless the user is assigned the internal:trunk:edit permission. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
trunk_base_settings_id = 'trunk_base_settings_id_example' # str | Trunk Base ID
ignore_hidden = True # bool | Set this to true to not receive trunk properties that are meant to be hidden or for internal system usage only. (optional)
try:
# Get a Trunk Base Settings object by ID
api_response = api_instance.get_telephony_providers_edges_trunkbasesetting(trunk_base_settings_id, ignore_hidden=ignore_hidden)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_trunkbasesetting: %s\n" % e)``` |
Provide a Python example that uses the PUT /api/v2/telephony/providers/edges/trunkbasesettings/{trunkBaseSettingsId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Update a Trunk Base Settings object by ID | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
trunk_base_settings_id = 'trunk_base_settings_id_example' # str | Trunk Base ID
body = PureCloudPlatformClientV2.TrunkBase() # TrunkBase | Trunk base settings
try:
# Update a Trunk Base Settings object by ID
api_response = api_instance.put_telephony_providers_edges_trunkbasesetting(trunk_base_settings_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->put_telephony_providers_edges_trunkbasesetting: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/trunks Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get the list of available trunks. Trunks are created by assigning trunk base settings to an Edge or Edge Group. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
page_number = 1 # int | Page number (optional) (default to 1)
page_size = 25 # int | Page size (optional) (default to 25)
sort_by = ''name'' # str | Value by which to sort (optional) (default to 'name')
sort_order = ''ASC'' # str | Sort order (optional) (default to 'ASC')
edge_id = 'edge_id_example' # str | Filter by Edge Ids (optional)
trunk_base_id = 'trunk_base_id_example' # str | Filter by Trunk Base Ids (optional)
trunk_type = 'trunk_type_example' # str | Filter by a Trunk type (optional)
try:
# Get the list of available trunks.
api_response = api_instance.get_telephony_providers_edges_trunks(page_number=page_number, page_size=page_size, sort_by=sort_by, sort_order=sort_order, edge_id=edge_id, trunk_base_id=trunk_base_id, trunk_type=trunk_type)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_trunks: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/trunks/metrics Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get the metrics for a list of trunks. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
trunk_ids = 'trunk_ids_example' # str | Comma separated list of Trunk Id's
try:
# Get the metrics for a list of trunks.
api_response = api_instance.get_telephony_providers_edges_trunks_metrics(trunk_ids)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_trunks_metrics: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/trunks/{trunkId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get a Trunk by ID | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
trunk_id = 'trunk_id_example' # str | Trunk ID
try:
# Get a Trunk by ID
api_response = api_instance.get_telephony_providers_edges_trunk(trunk_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_trunk: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/trunks/{trunkId}/metrics Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get the trunk metrics. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
trunk_id = 'trunk_id_example' # str | Trunk Id
try:
# Get the trunk metrics.
api_response = api_instance.get_telephony_providers_edges_trunk_metrics(trunk_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_trunk_metrics: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/trunkswithrecording Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get Counts of trunks that have recording disabled or enabled | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
trunk_type = 'trunk_type_example' # str | The type of this trunk base. (optional)
try:
# Get Counts of trunks that have recording disabled or enabled
api_response = api_instance.get_telephony_providers_edges_trunkswithrecording(trunk_type=trunk_type)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_trunkswithrecording: %s\n" % e)``` |
Provide a Python example that uses the DELETE /api/v2/telephony/providers/edges/{edgeId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Delete a edge. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
edge_id = 'edge_id_example' # str | Edge ID
try:
# Delete a edge.
api_instance.delete_telephony_providers_edge(edge_id)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->delete_telephony_providers_edge: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/{edgeId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get edge. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
edge_id = 'edge_id_example' # str | Edge ID
expand = ['expand_example'] # list[str] | Fields to expand in the response, comma-separated (optional)
try:
# Get edge.
api_response = api_instance.get_telephony_providers_edge(edge_id, expand=expand)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edge: %s\n" % e)``` |
Provide a Python example that uses the PUT /api/v2/telephony/providers/edges/{edgeId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Update a edge. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
edge_id = 'edge_id_example' # str | Edge ID
body = PureCloudPlatformClientV2.Edge() # Edge | Edge
try:
# Update a edge.
api_response = api_instance.put_telephony_providers_edge(edge_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->put_telephony_providers_edge: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/{edgeId}/diagnostic/nslookup Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get networking-related information from an Edge for a target IP or host. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
edge_id = 'edge_id_example' # str | Edge Id
try:
# Get networking-related information from an Edge for a target IP or host.
api_response = api_instance.get_telephony_providers_edge_diagnostic_nslookup(edge_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edge_diagnostic_nslookup: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/telephony/providers/edges/{edgeId}/diagnostic/nslookup Genesys Cloud Python SDK. | Genesys describes this as an API used to: Nslookup request command to collect networking-related information from an Edge for a target IP or host. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
edge_id = 'edge_id_example' # str | Edge Id
body = PureCloudPlatformClientV2.EdgeNetworkDiagnosticRequest() # EdgeNetworkDiagnosticRequest | request payload to get network diagnostic
try:
# Nslookup request command to collect networking-related information from an Edge for a target IP or host.
api_response = api_instance.post_telephony_providers_edge_diagnostic_nslookup(edge_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->post_telephony_providers_edge_diagnostic_nslookup: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/{edgeId}/diagnostic/ping Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get networking-related information from an Edge for a target IP or host. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
edge_id = 'edge_id_example' # str | Edge Id
try:
# Get networking-related information from an Edge for a target IP or host.
api_response = api_instance.get_telephony_providers_edge_diagnostic_ping(edge_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edge_diagnostic_ping: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/telephony/providers/edges/{edgeId}/diagnostic/ping Genesys Cloud Python SDK. | Genesys describes this as an API used to: Ping Request command to collect networking-related information from an Edge for a target IP or host. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
edge_id = 'edge_id_example' # str | Edge Id
body = PureCloudPlatformClientV2.EdgeNetworkDiagnosticRequest() # EdgeNetworkDiagnosticRequest | request payload to get network diagnostic
try:
# Ping Request command to collect networking-related information from an Edge for a target IP or host.
api_response = api_instance.post_telephony_providers_edge_diagnostic_ping(edge_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->post_telephony_providers_edge_diagnostic_ping: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/{edgeId}/diagnostic/route Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get networking-related information from an Edge for a target IP or host. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
edge_id = 'edge_id_example' # str | Edge Id
try:
# Get networking-related information from an Edge for a target IP or host.
api_response = api_instance.get_telephony_providers_edge_diagnostic_route(edge_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edge_diagnostic_route: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/telephony/providers/edges/{edgeId}/diagnostic/route Genesys Cloud Python SDK. | Genesys describes this as an API used to: Route request command to collect networking-related information from an Edge for a target IP or host. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
edge_id = 'edge_id_example' # str | Edge Id
body = PureCloudPlatformClientV2.EdgeNetworkDiagnosticRequest() # EdgeNetworkDiagnosticRequest | request payload to get network diagnostic
try:
# Route request command to collect networking-related information from an Edge for a target IP or host.
api_response = api_instance.post_telephony_providers_edge_diagnostic_route(edge_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->post_telephony_providers_edge_diagnostic_route: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/{edgeId}/diagnostic/tracepath Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get networking-related information from an Edge for a target IP or host. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
edge_id = 'edge_id_example' # str | Edge Id
try:
# Get networking-related information from an Edge for a target IP or host.
api_response = api_instance.get_telephony_providers_edge_diagnostic_tracepath(edge_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edge_diagnostic_tracepath: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/telephony/providers/edges/{edgeId}/diagnostic/tracepath Genesys Cloud Python SDK. | Genesys describes this as an API used to: Tracepath request command to collect networking-related information from an Edge for a target IP or host. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
edge_id = 'edge_id_example' # str | Edge Id
body = PureCloudPlatformClientV2.EdgeNetworkDiagnosticRequest() # EdgeNetworkDiagnosticRequest | request payload to get network diagnostic
try:
# Tracepath request command to collect networking-related information from an Edge for a target IP or host.
api_response = api_instance.post_telephony_providers_edge_diagnostic_tracepath(edge_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->post_telephony_providers_edge_diagnostic_tracepath: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/{edgeId}/logicalinterfaces Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get edge logical interfaces. Retrieve a list of all configured logical interfaces from a specific edge. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
edge_id = 'edge_id_example' # str | Edge ID
expand = ['expand_example'] # list[str] | Field to expand in the response (optional)
try:
# Get edge logical interfaces.
api_response = api_instance.get_telephony_providers_edge_logicalinterfaces(edge_id, expand=expand)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edge_logicalinterfaces: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/telephony/providers/edges/{edgeId}/logicalinterfaces Genesys Cloud Python SDK. | Genesys describes this as an API used to: Create an edge logical interface. Create | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
edge_id = 'edge_id_example' # str | Edge ID
body = PureCloudPlatformClientV2.DomainLogicalInterface() # DomainLogicalInterface | Logical interface
try:
# Create an edge logical interface.
api_response = api_instance.post_telephony_providers_edge_logicalinterfaces(edge_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->post_telephony_providers_edge_logicalinterfaces: %s\n" % e)``` |
Provide a Python example that uses the DELETE /api/v2/telephony/providers/edges/{edgeId}/logicalinterfaces/{interfaceId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Delete an edge logical interface | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
edge_id = 'edge_id_example' # str | Edge ID
interface_id = 'interface_id_example' # str | Interface ID
try:
# Delete an edge logical interface
api_instance.delete_telephony_providers_edge_logicalinterface(edge_id, interface_id)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->delete_telephony_providers_edge_logicalinterface: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/{edgeId}/logicalinterfaces/{interfaceId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get an edge logical interface | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
edge_id = 'edge_id_example' # str | Edge ID
interface_id = 'interface_id_example' # str | Interface ID
expand = ['expand_example'] # list[str] | Field to expand in the response (optional)
try:
# Get an edge logical interface
api_response = api_instance.get_telephony_providers_edge_logicalinterface(edge_id, interface_id, expand=expand)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edge_logicalinterface: %s\n" % e)``` |
Provide a Python example that uses the PUT /api/v2/telephony/providers/edges/{edgeId}/logicalinterfaces/{interfaceId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Update an edge logical interface. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
edge_id = 'edge_id_example' # str | Edge ID
interface_id = 'interface_id_example' # str | Interface ID
body = PureCloudPlatformClientV2.DomainLogicalInterface() # DomainLogicalInterface | Logical interface
try:
# Update an edge logical interface.
api_response = api_instance.put_telephony_providers_edge_logicalinterface(edge_id, interface_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->put_telephony_providers_edge_logicalinterface: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/telephony/providers/edges/{edgeId}/logs/jobs Genesys Cloud Python SDK. | Genesys describes this as an API used to: Create a job to upload a list of Edge logs. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
edge_id = 'edge_id_example' # str | Edge ID
body = PureCloudPlatformClientV2.EdgeLogsJobRequest() # EdgeLogsJobRequest | EdgeLogsJobRequest
try:
# Create a job to upload a list of Edge logs.
api_response = api_instance.post_telephony_providers_edge_logs_jobs(edge_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->post_telephony_providers_edge_logs_jobs: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/{edgeId}/logs/jobs/{jobId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get an Edge logs job. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
edge_id = 'edge_id_example' # str | Edge ID
job_id = 'job_id_example' # str | Job ID
try:
# Get an Edge logs job.
api_response = api_instance.get_telephony_providers_edge_logs_job(edge_id, job_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edge_logs_job: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/telephony/providers/edges/{edgeId}/logs/jobs/{jobId}/upload Genesys Cloud Python SDK. | Genesys describes this as an API used to: Request that the specified fileIds be uploaded from the Edge. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
edge_id = 'edge_id_example' # str | Edge ID
job_id = 'job_id_example' # str | Job ID
body = PureCloudPlatformClientV2.EdgeLogsJobUploadRequest() # EdgeLogsJobUploadRequest | Log upload request
try:
# Request that the specified fileIds be uploaded from the Edge.
api_instance.post_telephony_providers_edge_logs_job_upload(edge_id, job_id, body)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->post_telephony_providers_edge_logs_job_upload: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/{edgeId}/metrics Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get the edge metrics. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
edge_id = 'edge_id_example' # str | Edge Id
try:
# Get the edge metrics.
api_response = api_instance.get_telephony_providers_edge_metrics(edge_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edge_metrics: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/{edgeId}/physicalinterfaces Genesys Cloud Python SDK. | Genesys describes this as an API used to: Retrieve a list of all configured physical interfaces from a specific edge. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
edge_id = 'edge_id_example' # str | Edge ID
try:
# Retrieve a list of all configured physical interfaces from a specific edge.
api_response = api_instance.get_telephony_providers_edge_physicalinterfaces(edge_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edge_physicalinterfaces: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/{edgeId}/physicalinterfaces/{interfaceId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get edge physical interface. Retrieve a physical interface from a specific edge. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
edge_id = 'edge_id_example' # str | Edge ID
interface_id = 'interface_id_example' # str | Interface ID
try:
# Get edge physical interface.
api_response = api_instance.get_telephony_providers_edge_physicalinterface(edge_id, interface_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edge_physicalinterface: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/telephony/providers/edges/{edgeId}/reboot Genesys Cloud Python SDK. | Genesys describes this as an API used to: Reboot an Edge | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
edge_id = 'edge_id_example' # str | Edge ID
body = PureCloudPlatformClientV2.EdgeRebootParameters() # EdgeRebootParameters | Parameters for the edge reboot (optional)
try:
# Reboot an Edge
api_response = api_instance.post_telephony_providers_edge_reboot(edge_id, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->post_telephony_providers_edge_reboot: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/{edgeId}/setuppackage Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get the setup package for a locally deployed edge device. This is needed to complete the setup process for the virtual edge. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
edge_id = 'edge_id_example' # str | Edge ID
try:
# Get the setup package for a locally deployed edge device. This is needed to complete the setup process for the virtual edge.
api_response = api_instance.get_telephony_providers_edge_setuppackage(edge_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edge_setuppackage: %s\n" % e)``` |
Provide a Python example that uses the DELETE /api/v2/telephony/providers/edges/{edgeId}/softwareupdate Genesys Cloud Python SDK. | Genesys describes this as an API used to: Cancels any in-progress update for this edge. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
edge_id = 'edge_id_example' # str | Edge ID
try:
# Cancels any in-progress update for this edge.
api_instance.delete_telephony_providers_edge_softwareupdate(edge_id)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->delete_telephony_providers_edge_softwareupdate: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/{edgeId}/softwareupdate Genesys Cloud Python SDK. | Genesys describes this as an API used to: Gets software update status information about any edge. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
edge_id = 'edge_id_example' # str | Edge ID
try:
# Gets software update status information about any edge.
api_response = api_instance.get_telephony_providers_edge_softwareupdate(edge_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edge_softwareupdate: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/telephony/providers/edges/{edgeId}/softwareupdate Genesys Cloud Python SDK. | Genesys describes this as an API used to: Starts a software update for this edge. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
edge_id = 'edge_id_example' # str | Edge ID
body = PureCloudPlatformClientV2.DomainEdgeSoftwareUpdateDto() # DomainEdgeSoftwareUpdateDto | Software update request
try:
# Starts a software update for this edge.
api_response = api_instance.post_telephony_providers_edge_softwareupdate(edge_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->post_telephony_providers_edge_softwareupdate: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/{edgeId}/softwareversions Genesys Cloud Python SDK. | Genesys describes this as an API used to: Gets all the available software versions for this edge. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
edge_id = 'edge_id_example' # str | Edge ID
try:
# Gets all the available software versions for this edge.
api_response = api_instance.get_telephony_providers_edge_softwareversions(edge_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edge_softwareversions: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/telephony/providers/edges/{edgeId}/statuscode Genesys Cloud Python SDK. | Genesys describes this as an API used to: Take an Edge in or out of service | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
edge_id = 'edge_id_example' # str | Edge ID
body = PureCloudPlatformClientV2.EdgeServiceStateRequest() # EdgeServiceStateRequest | Edge Service State (optional)
try:
# Take an Edge in or out of service
api_response = api_instance.post_telephony_providers_edge_statuscode(edge_id, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->post_telephony_providers_edge_statuscode: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/{edgeId}/trunks Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get the list of available trunks for the given Edge. Trunks are created by assigning trunk base settings to an Edge or Edge Group. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
edge_id = 'edge_id_example' # str | Edge ID
page_number = 1 # int | Page number (optional) (default to 1)
page_size = 25 # int | Page size (optional) (default to 25)
sort_by = ''name'' # str | Value by which to sort (optional) (default to 'name')
sort_order = ''ASC'' # str | Sort order (optional) (default to 'ASC')
trunk_base_id = 'trunk_base_id_example' # str | Filter by Trunk Base Ids (optional)
trunk_type = 'trunk_type_example' # str | Filter by a Trunk type (optional)
try:
# Get the list of available trunks for the given Edge.
api_response = api_instance.get_telephony_providers_edge_trunks(edge_id, page_number=page_number, page_size=page_size, sort_by=sort_by, sort_order=sort_order, trunk_base_id=trunk_base_id, trunk_type=trunk_type)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edge_trunks: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/telephony/providers/edges/{edgeId}/unpair Genesys Cloud Python SDK. | Genesys describes this as an API used to: Unpair an Edge | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi();
edge_id = 'edge_id_example' # str | Edge Id
try:
# Unpair an Edge
api_response = api_instance.post_telephony_providers_edge_unpair(edge_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling TelephonyProvidersEdgeApi->post_telephony_providers_edge_unpair: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/textbots/botflows/sessions Genesys Cloud Python SDK. | Genesys describes this as an API used to: Create an execution instance of a bot flow definition. The launch is asynchronous; use the returned instance ID to post turns to it using 'POST /api/v2/textbots/botflows/sessions/{sessionId}/turns'. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TextbotsApi();
launch_request = PureCloudPlatformClientV2.TextBotFlowLaunchRequest() # TextBotFlowLaunchRequest |
try:
# Create an execution instance of a bot flow definition.
api_response = api_instance.post_textbots_botflows_sessions(launch_request)
pprint(api_response)
except ApiException as e:
print("Exception when calling TextbotsApi->post_textbots_botflows_sessions: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/textbots/botflows/sessions/{sessionId}/turns Genesys Cloud Python SDK. | Genesys describes this as an API used to: Issue a bot flow turn event. Send a turn event to an executing bot flow and produce the next action to take. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TextbotsApi();
session_id = 'session_id_example' # str | The bot flow session ID, typically obtained from 'POST /api/v2/textbots/botflows/sessions'
turn_request = PureCloudPlatformClientV2.TextBotFlowTurnRequest() # TextBotFlowTurnRequest |
try:
# Issue a bot flow turn event
api_response = api_instance.post_textbots_botflows_session_turns(session_id, turn_request)
pprint(api_response)
except ApiException as e:
print("Exception when calling TextbotsApi->post_textbots_botflows_session_turns: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/textbots/bots/execute Genesys Cloud Python SDK. | Genesys describes this as an API used to: Send an intent to a bot to start a dialog/interact with it via text. This will either start a bot with the given id or relay a communication to an existing bot session. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TextbotsApi();
post_text_request = PureCloudPlatformClientV2.PostTextRequest() # PostTextRequest |
try:
# Send an intent to a bot to start a dialog/interact with it via text
api_response = api_instance.post_textbots_bots_execute(post_text_request)
pprint(api_response)
except ApiException as e:
print("Exception when calling TextbotsApi->post_textbots_bots_execute: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/textbots/bots/search Genesys Cloud Python SDK. | Genesys describes this as an API used to: Find bots using the currently configured friendly name or ID. The name does allow case-insensitive partial string matches or by IDs (up to 50), but not both at the same time. Optionally you can limit the scope of the search by providing one or more bot types. You can specify the maximum results to return, up to a limit of 100 | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TextbotsApi();
bot_type = ['bot_type_example'] # list[str] | Bot types (optional)
bot_name = 'bot_name_example' # str | Bot name (optional)
bot_id = ['bot_id_example'] # list[str] | Bot IDs (optional)
page_size = 25 # int | The maximum results to return (optional) (default to 25)
try:
# Find bots using the currently configured friendly name or ID.
api_response = api_instance.get_textbots_bots_search(bot_type=bot_type, bot_name=bot_name, bot_id=bot_id, page_size=page_size)
pprint(api_response)
except ApiException as e:
print("Exception when calling TextbotsApi->get_textbots_bots_search: %s\n" % e)``` |
Provide a Python example that uses the DELETE /api/v2/tokens/me Genesys Cloud Python SDK. | Genesys describes this as an API used to: Delete auth token used to make the request. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TokensApi();
try:
# Delete auth token used to make the request.
api_instance.delete_tokens_me()
except ApiException as e:
print("Exception when calling TokensApi->delete_tokens_me: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/tokens/me Genesys Cloud Python SDK. | Genesys describes this as an API used to: Fetch information about the current token | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TokensApi();
preserve_idle_ttl = True # bool | preserveIdleTTL indicates whether the idle token timeout should be reset or preserved. If preserveIdleTTL is true, then TTL value is not reset. If unset or false, the value is reset. (optional)
try:
# Fetch information about the current token
api_response = api_instance.get_tokens_me(preserve_idle_ttl=preserve_idle_ttl)
pprint(api_response)
except ApiException as e:
print("Exception when calling TokensApi->get_tokens_me: %s\n" % e)``` |
Provide a Python example that uses the HEAD /api/v2/tokens/me Genesys Cloud Python SDK. | Genesys describes this as an API used to: Verify user token | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TokensApi();
try:
# Verify user token
api_instance.head_tokens_me()
except ApiException as e:
print("Exception when calling TokensApi->head_tokens_me: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/tokens/timeout Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get the current Idle Token Timeout Value | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TokensApi();
try:
# Get the current Idle Token Timeout Value
api_response = api_instance.get_tokens_timeout()
pprint(api_response)
except ApiException as e:
print("Exception when calling TokensApi->get_tokens_timeout: %s\n" % e)``` |
Provide a Python example that uses the PUT /api/v2/tokens/timeout Genesys Cloud Python SDK. | Genesys describes this as an API used to: Update or Enable/Disable the Idle Token Timeout | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TokensApi();
body = PureCloudPlatformClientV2.IdleTokenTimeout() # IdleTokenTimeout | (optional)
try:
# Update or Enable/Disable the Idle Token Timeout
api_response = api_instance.put_tokens_timeout(body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling TokensApi->put_tokens_timeout: %s\n" % e)``` |
Provide a Python example that uses the DELETE /api/v2/tokens/{userId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Delete all auth tokens for the specified user. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.TokensApi();
user_id = 'user_id_example' # str | User ID
try:
# Delete all auth tokens for the specified user.
api_instance.delete_token(user_id)
except ApiException as e:
print("Exception when calling TokensApi->delete_token: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/knowledge/documentuploads Genesys Cloud Python SDK. | Genesys describes this as an API used to: Creates a presigned URL for uploading a knowledge import file with a set of documents | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UploadsApi();
body = PureCloudPlatformClientV2.UploadUrlRequest() # UploadUrlRequest | query
try:
# Creates a presigned URL for uploading a knowledge import file with a set of documents
api_response = api_instance.post_knowledge_documentuploads(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling UploadsApi->post_knowledge_documentuploads: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/languageunderstanding/miners/{minerId}/uploads Genesys Cloud Python SDK. | Genesys describes this as an API used to: Creates a presigned URL for uploading a chat corpus which will be used for mining by intent miner | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UploadsApi();
miner_id = 'miner_id_example' # str | Miner ID
body = NULL # Empty | query
try:
# Creates a presigned URL for uploading a chat corpus which will be used for mining by intent miner
api_response = api_instance.post_languageunderstanding_miner_uploads(miner_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling UploadsApi->post_languageunderstanding_miner_uploads: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/uploads/learning/coverart Genesys Cloud Python SDK. | Genesys describes this as an API used to: Generates pre-signed URL to upload cover art for learning modules | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UploadsApi();
body = PureCloudPlatformClientV2.LearningCoverArtUploadUrlRequest() # LearningCoverArtUploadUrlRequest | query
try:
# Generates pre-signed URL to upload cover art for learning modules
api_response = api_instance.post_uploads_learning_coverart(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling UploadsApi->post_uploads_learning_coverart: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/uploads/publicassets/images Genesys Cloud Python SDK. | Genesys describes this as an API used to: Creates presigned url for uploading a public asset image | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UploadsApi();
body = PureCloudPlatformClientV2.UploadUrlRequest() # UploadUrlRequest | query
try:
# Creates presigned url for uploading a public asset image
api_response = api_instance.post_uploads_publicassets_images(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling UploadsApi->post_uploads_publicassets_images: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/uploads/recordings Genesys Cloud Python SDK. | Genesys describes this as an API used to: Creates presigned url for uploading a recording file | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UploadsApi();
body = PureCloudPlatformClientV2.UploadUrlRequest() # UploadUrlRequest | query
try:
# Creates presigned url for uploading a recording file
api_response = api_instance.post_uploads_recordings(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling UploadsApi->post_uploads_recordings: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/uploads/workforcemanagement/historicaldata/csv Genesys Cloud Python SDK. | Genesys describes this as an API used to: Creates presigned url for uploading WFM historical data file. Requires data in csv format. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UploadsApi();
body = PureCloudPlatformClientV2.UploadUrlRequest() # UploadUrlRequest | query
try:
# Creates presigned url for uploading WFM historical data file. Requires data in csv format.
api_response = api_instance.post_uploads_workforcemanagement_historicaldata_csv(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling UploadsApi->post_uploads_workforcemanagement_historicaldata_csv: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/oauth/clients/{clientId}/usage/query Genesys Cloud Python SDK. | Genesys describes this as an API used to: Query for OAuth client API usage. After calling this method, you will then need to poll for the query results based on the returned execution Id | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UsageApi();
client_id = 'client_id_example' # str | Client ID
body = PureCloudPlatformClientV2.ApiUsageClientQuery() # ApiUsageClientQuery | Query
try:
# Query for OAuth client API usage
api_response = api_instance.post_oauth_client_usage_query(client_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsageApi->post_oauth_client_usage_query: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/oauth/clients/{clientId}/usage/query/results/{executionId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get the results of a usage query | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UsageApi();
execution_id = 'execution_id_example' # str | ID of the query execution
client_id = 'client_id_example' # str | Client ID
try:
# Get the results of a usage query
api_response = api_instance.get_oauth_client_usage_query_result(execution_id, client_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsageApi->get_oauth_client_usage_query_result: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/oauth/clients/{clientId}/usage/summary Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get a summary of OAuth client API usage. After calling this method, you will then need to poll for the query results based on the returned execution Id | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UsageApi();
client_id = 'client_id_example' # str | Client ID
days = ''7'' # str | Previous number of days to query (optional) (default to '7')
try:
# Get a summary of OAuth client API usage
api_response = api_instance.get_oauth_client_usage_summary(client_id, days=days)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsageApi->get_oauth_client_usage_summary: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/usage/query Genesys Cloud Python SDK. | Genesys describes this as an API used to: Query organization API Usage -. After calling this method, you will then need to poll for the query results based on the returned execution Id | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UsageApi();
body = PureCloudPlatformClientV2.ApiUsageOrganizationQuery() # ApiUsageOrganizationQuery | Query
try:
# Query organization API Usage -
api_response = api_instance.post_usage_query(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsageApi->post_usage_query: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/usage/query/{executionId}/results Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get the results of a usage query | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UsageApi();
execution_id = 'execution_id_example' # str | ID of the query execution
try:
# Get the results of a usage query
api_response = api_instance.get_usage_query_execution_id_results(execution_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsageApi->get_usage_query_execution_id_results: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/usage/simplesearch Genesys Cloud Python SDK. | Genesys describes this as an API used to: Search organization API Usage. After calling this method, you will then need to poll for the query results based on the returned execution Id. The number of records is limited to 20,000 results | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UsageApi();
body = PureCloudPlatformClientV2.ApiUsageSimpleSearch() # ApiUsageSimpleSearch | SimpleSearch
try:
# Search organization API Usage
api_response = api_instance.post_usage_simplesearch(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsageApi->post_usage_simplesearch: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/usage/simplesearch/{executionId}/results Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get the results of a usage search. Number of records to be returned is limited to 20,000 results. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UsageApi();
execution_id = 'execution_id_example' # str | ID of the search execution
after = 'after_example' # str | The cursor that points to the end of the set of entities that has been returned (optional)
page_size = 56 # int | The max number of entities to be returned per request. Maximum page size of 1000 (optional)
try:
# Get the results of a usage search. Number of records to be returned is limited to 20,000 results.
api_response = api_instance.get_usage_simplesearch_execution_id_results(execution_id, after=after, page_size=page_size)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsageApi->get_usage_simplesearch_execution_id_results: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/userrecordings Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get a list of user recordings. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UserRecordingsApi();
page_size = 25 # int | Page size (optional) (default to 25)
page_number = 1 # int | Page number (optional) (default to 1)
expand = ['expand_example'] # list[str] | Which fields, if any, to expand. (optional)
try:
# Get a list of user recordings.
api_response = api_instance.get_userrecordings(page_size=page_size, page_number=page_number, expand=expand)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserRecordingsApi->get_userrecordings: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/userrecordings/summary Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get user recording summary | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UserRecordingsApi();
try:
# Get user recording summary
api_response = api_instance.get_userrecordings_summary()
pprint(api_response)
except ApiException as e:
print("Exception when calling UserRecordingsApi->get_userrecordings_summary: %s\n" % e)``` |
Provide a Python example that uses the DELETE /api/v2/userrecordings/{recordingId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Delete a user recording. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UserRecordingsApi();
recording_id = 'recording_id_example' # str | User Recording ID
try:
# Delete a user recording.
api_instance.delete_userrecording(recording_id)
except ApiException as e:
print("Exception when calling UserRecordingsApi->delete_userrecording: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/userrecordings/{recordingId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get a user recording. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UserRecordingsApi();
recording_id = 'recording_id_example' # str | User Recording ID
expand = ['expand_example'] # list[str] | Which fields, if any, to expand. (optional)
try:
# Get a user recording.
api_response = api_instance.get_userrecording(recording_id, expand=expand)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserRecordingsApi->get_userrecording: %s\n" % e)``` |
Provide a Python example that uses the PUT /api/v2/userrecordings/{recordingId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Update a user recording. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UserRecordingsApi();
recording_id = 'recording_id_example' # str | User Recording ID
body = PureCloudPlatformClientV2.UserRecording() # UserRecording | UserRecording
expand = ['expand_example'] # list[str] | Which fields, if any, to expand. (optional)
try:
# Update a user recording.
api_response = api_instance.put_userrecording(recording_id, body, expand=expand)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserRecordingsApi->put_userrecording: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/userrecordings/{recordingId}/transcoding Genesys Cloud Python SDK. | Genesys describes this as an API used to: Download a user recording. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UserRecordingsApi();
recording_id = 'recording_id_example' # str | User Recording ID
format_id = ''WEBM'' # str | The desired media format. (optional) (default to 'WEBM')
try:
# Download a user recording.
api_response = api_instance.get_userrecording_transcoding(recording_id, format_id=format_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserRecordingsApi->get_userrecording_transcoding: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/analytics/users/activity/query Genesys Cloud Python SDK. | Genesys describes this as an API used to: Query for user activity observations | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UsersApi();
body = PureCloudPlatformClientV2.UserActivityQuery() # UserActivityQuery | query
page_size = 56 # int | The desired page size (optional)
page_number = 56 # int | The desired page number (optional)
try:
# Query for user activity observations
api_response = api_instance.post_analytics_users_activity_query(body, page_size=page_size, page_number=page_number)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsersApi->post_analytics_users_activity_query: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/analytics/users/aggregates/query Genesys Cloud Python SDK. | Genesys describes this as an API used to: Query for user aggregates | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UsersApi();
body = PureCloudPlatformClientV2.UserAggregationQuery() # UserAggregationQuery | query
try:
# Query for user aggregates
api_response = api_instance.post_analytics_users_aggregates_query(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsersApi->post_analytics_users_aggregates_query: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/analytics/users/details/jobs Genesys Cloud Python SDK. | Genesys describes this as an API used to: Query for user details asynchronously | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UsersApi();
body = PureCloudPlatformClientV2.AsyncUserDetailsQuery() # AsyncUserDetailsQuery | query
try:
# Query for user details asynchronously
api_response = api_instance.post_analytics_users_details_jobs(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsersApi->post_analytics_users_details_jobs: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/analytics/users/details/jobs/availability Genesys Cloud Python SDK. | Genesys describes this as an API used to: Lookup the datalake availability date and time | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UsersApi();
try:
# Lookup the datalake availability date and time
api_response = api_instance.get_analytics_users_details_jobs_availability()
pprint(api_response)
except ApiException as e:
print("Exception when calling UsersApi->get_analytics_users_details_jobs_availability: %s\n" % e)``` |
Provide a Python example that uses the DELETE /api/v2/analytics/users/details/jobs/{jobId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Delete/cancel an async request | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UsersApi();
job_id = 'job_id_example' # str | jobId
try:
# Delete/cancel an async request
api_instance.delete_analytics_users_details_job(job_id)
except ApiException as e:
print("Exception when calling UsersApi->delete_analytics_users_details_job: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/analytics/users/details/jobs/{jobId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get status for async query for user details | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UsersApi();
job_id = 'job_id_example' # str | jobId
try:
# Get status for async query for user details
api_response = api_instance.get_analytics_users_details_job(job_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsersApi->get_analytics_users_details_job: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/analytics/users/details/jobs/{jobId}/results Genesys Cloud Python SDK. | Genesys describes this as an API used to: Fetch a page of results for an async query | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UsersApi();
job_id = 'job_id_example' # str | jobId
cursor = 'cursor_example' # str | Indicates where to resume query results (not required for first page) (optional)
page_size = 56 # int | The desired maximum number of results (optional)
try:
# Fetch a page of results for an async query
api_response = api_instance.get_analytics_users_details_job_results(job_id, cursor=cursor, page_size=page_size)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsersApi->get_analytics_users_details_job_results: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/analytics/users/details/query Genesys Cloud Python SDK. | Genesys describes this as an API used to: Query for user details | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UsersApi();
body = PureCloudPlatformClientV2.UserDetailsQuery() # UserDetailsQuery | query
try:
# Query for user details
api_response = api_instance.post_analytics_users_details_query(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsersApi->post_analytics_users_details_query: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/analytics/users/observations/query Genesys Cloud Python SDK. | Genesys describes this as an API used to: Query for user observations | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UsersApi();
body = PureCloudPlatformClientV2.UserObservationQuery() # UserObservationQuery | query
try:
# Query for user observations
api_response = api_instance.post_analytics_users_observations_query(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsersApi->post_analytics_users_observations_query: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/authorization/divisionspermitted/paged/me Genesys Cloud Python SDK. | Genesys describes this as an API used to: Returns which divisions the current user has the given permission in. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UsersApi();
permission = 'permission_example' # str | The permission string, including the object to access, e.g. routing:queue:view
page_number = 1 # int | Page number (optional) (default to 1)
page_size = 25 # int | Page size (optional) (default to 25)
try:
# Returns which divisions the current user has the given permission in.
api_response = api_instance.get_authorization_divisionspermitted_paged_me(permission, page_number=page_number, page_size=page_size)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsersApi->get_authorization_divisionspermitted_paged_me: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/authorization/subjects/me Genesys Cloud Python SDK. | Genesys describes this as an API used to: Returns a listing of roles and permissions for the currently authenticated user. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UsersApi();
include_duplicates = False # bool | Include multiple entries with the same role and division but different subjects (optional) (default to False)
try:
# Returns a listing of roles and permissions for the currently authenticated user.
api_response = api_instance.get_authorization_subjects_me(include_duplicates=include_duplicates)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsersApi->get_authorization_subjects_me: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/authorization/subjects/{subjectId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Returns a listing of roles and permissions for a user. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UsersApi();
subject_id = 'subject_id_example' # str | Subject ID (user or group)
include_duplicates = False # bool | Include multiple entries with the same role and division but different subjects (optional) (default to False)
try:
# Returns a listing of roles and permissions for a user.
api_response = api_instance.get_authorization_subject(subject_id, include_duplicates=include_duplicates)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsersApi->get_authorization_subject: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/authorization/subjects/{subjectId}/bulkadd Genesys Cloud Python SDK. | Genesys describes this as an API used to: Bulk-grant roles and divisions to a subject. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UsersApi();
subject_id = 'subject_id_example' # str | Subject ID (user or group)
body = PureCloudPlatformClientV2.RoleDivisionGrants() # RoleDivisionGrants | Pairs of role and division IDs
subject_type = ''PC_USER'' # str | what the type of the subject is (PC_GROUP, PC_USER or PC_OAUTH_CLIENT) (optional) (default to 'PC_USER')
try:
# Bulk-grant roles and divisions to a subject.
api_instance.post_authorization_subject_bulkadd(subject_id, body, subject_type=subject_type)
except ApiException as e:
print("Exception when calling UsersApi->post_authorization_subject_bulkadd: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/authorization/subjects/{subjectId}/bulkremove Genesys Cloud Python SDK. | Genesys describes this as an API used to: Bulk-remove grants from a subject. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UsersApi();
subject_id = 'subject_id_example' # str | Subject ID (user or group)
body = PureCloudPlatformClientV2.RoleDivisionGrants() # RoleDivisionGrants | Pairs of role and division IDs
try:
# Bulk-remove grants from a subject.
api_instance.post_authorization_subject_bulkremove(subject_id, body)
except ApiException as e:
print("Exception when calling UsersApi->post_authorization_subject_bulkremove: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/authorization/subjects/{subjectId}/bulkreplace Genesys Cloud Python SDK. | Genesys describes this as an API used to: Replace subject's roles and divisions with the exact list supplied in the request. This operation will not remove grants that are inherited from group membership. It will only set the grants directly applied to the subject. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UsersApi();
subject_id = 'subject_id_example' # str | Subject ID (user or group)
body = PureCloudPlatformClientV2.RoleDivisionGrants() # RoleDivisionGrants | Pairs of role and division IDs
subject_type = ''PC_USER'' # str | what the type of the subject is (PC_GROUP, PC_USER or PC_OAUTH_CLIENT) (optional) (default to 'PC_USER')
try:
# Replace subject's roles and divisions with the exact list supplied in the request.
api_instance.post_authorization_subject_bulkreplace(subject_id, body, subject_type=subject_type)
except ApiException as e:
print("Exception when calling UsersApi->post_authorization_subject_bulkreplace: %s\n" % e)``` |
Provide a Python example that uses the DELETE /api/v2/authorization/subjects/{subjectId}/divisions/{divisionId}/roles/{roleId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Delete a grant of a role in a division | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UsersApi();
subject_id = 'subject_id_example' # str | Subject ID (user or group)
division_id = 'division_id_example' # str | the id of the division of the grant
role_id = 'role_id_example' # str | the id of the role of the grant
try:
# Delete a grant of a role in a division
api_instance.delete_authorization_subject_division_role(subject_id, division_id, role_id)
except ApiException as e:
print("Exception when calling UsersApi->delete_authorization_subject_division_role: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/authorization/subjects/{subjectId}/divisions/{divisionId}/roles/{roleId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Make a grant of a role in a division | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UsersApi();
subject_id = 'subject_id_example' # str | Subject ID (user or group)
division_id = 'division_id_example' # str | the id of the division to which to make the grant
role_id = 'role_id_example' # str | the id of the role to grant
subject_type = ''PC_USER'' # str | what the type of the subject is: PC_GROUP, PC_USER or PC_OAUTH_CLIENT (note: for cross-org authorization, please use the Organization Authorization endpoints) (optional) (default to 'PC_USER')
try:
# Make a grant of a role in a division
api_instance.post_authorization_subject_division_role(subject_id, division_id, role_id, subject_type=subject_type)
except ApiException as e:
print("Exception when calling UsersApi->post_authorization_subject_division_role: %s\n" % e)``` |
Provide a Python example that uses the DELETE /api/v2/routing/directroutingbackup/settings/me Genesys Cloud Python SDK. | Genesys describes this as an API used to: Delete the user's Direct Routing Backup settings and revert to the Direct Routing Queue default. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UsersApi();
try:
# Delete the user's Direct Routing Backup settings and revert to the Direct Routing Queue default.
api_instance.delete_routing_directroutingbackup_settings_me()
except ApiException as e:
print("Exception when calling UsersApi->delete_routing_directroutingbackup_settings_me: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/routing/directroutingbackup/settings/me Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get the user's Direct Routing Backup settings. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UsersApi();
try:
# Get the user's Direct Routing Backup settings.
api_response = api_instance.get_routing_directroutingbackup_settings_me()
pprint(api_response)
except ApiException as e:
print("Exception when calling UsersApi->get_routing_directroutingbackup_settings_me: %s\n" % e)``` |
Provide a Python example that uses the PUT /api/v2/routing/directroutingbackup/settings/me Genesys Cloud Python SDK. | Genesys describes this as an API used to: Update the user's Direct Routing Backup settings. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.UsersApi();
body = PureCloudPlatformClientV2.AgentDirectRoutingBackupSettings() # AgentDirectRoutingBackupSettings | directRoutingBackup
try:
# Update the user's Direct Routing Backup settings.
api_response = api_instance.put_routing_directroutingbackup_settings_me(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling UsersApi->put_routing_directroutingbackup_settings_me: %s\n" % e)``` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.