instruction
stringlengths 81
221
| input
stringlengths 50
1.19k
| output
stringlengths 525
3.61k
|
---|---|---|
Provide a Python example that uses the GET /api/v2/diagnostics/logcapture/browser/users/{userId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get log capture configuration for the 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.LogCaptureApi();
user_id = 'user_id_example' # str | The id of the user to get browser log capture configuration
try:
# Get log capture configuration for the user
api_response = api_instance.get_diagnostics_logcapture_browser_user(user_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling LogCaptureApi->get_diagnostics_logcapture_browser_user: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/diagnostics/logcapture/browser/users/{userId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Enable log capture for a user or update expiration
|
```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.LogCaptureApi();
user_id = 'user_id_example' # str | The id of the user to enable browser log capture
body = PureCloudPlatformClientV2.LogCaptureUserConfiguration() # LogCaptureUserConfiguration | (optional)
try:
# Enable log capture for a user or update expiration
api_response = api_instance.post_diagnostics_logcapture_browser_user(user_id, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling LogCaptureApi->post_diagnostics_logcapture_browser_user: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/mobiledevices Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get a list of all devices.
|
```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.MobileDevicesApi();
page_size = 25 # int | Page size (optional) (default to 25)
page_number = 1 # int | Page number (optional) (default to 1)
sort_order = ''ascending'' # str | Ascending or descending sort order (optional) (default to 'ascending')
try:
# Get a list of all devices.
api_response = api_instance.get_mobiledevices(page_size=page_size, page_number=page_number, sort_order=sort_order)
pprint(api_response)
except ApiException as e:
print("Exception when calling MobileDevicesApi->get_mobiledevices: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/mobiledevices Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Create User device
|
```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.MobileDevicesApi();
body = PureCloudPlatformClientV2.UserDevice() # UserDevice | Device
try:
# Create User device
api_response = api_instance.post_mobiledevices(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling MobileDevicesApi->post_mobiledevices: %s\n" % e)```
|
Provide a Python example that uses the DELETE /api/v2/mobiledevices/{deviceId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Delete device
|
```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.MobileDevicesApi();
device_id = 'device_id_example' # str | Device ID
try:
# Delete device
api_instance.delete_mobiledevice(device_id)
except ApiException as e:
print("Exception when calling MobileDevicesApi->delete_mobiledevice: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/mobiledevices/{deviceId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get device
|
```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.MobileDevicesApi();
device_id = 'device_id_example' # str | Device ID
try:
# Get device
api_response = api_instance.get_mobiledevice(device_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling MobileDevicesApi->get_mobiledevice: %s\n" % e)```
|
Provide a Python example that uses the PUT /api/v2/mobiledevices/{deviceId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Update device
|
```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.MobileDevicesApi();
device_id = 'device_id_example' # str | Device ID
body = PureCloudPlatformClientV2.UserDevice() # UserDevice | Device (optional)
try:
# Update device
api_response = api_instance.put_mobiledevice(device_id, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling MobileDevicesApi->put_mobiledevice: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/notifications/availabletopics Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get available notification topics.
|
```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.NotificationsApi();
expand = ['expand_example'] # list[str] | Which fields, if any, to expand (optional)
include_preview = True # bool | Whether or not to include Preview topics (optional) (default to True)
try:
# Get available notification topics.
api_response = api_instance.get_notifications_availabletopics(expand=expand, include_preview=include_preview)
pprint(api_response)
except ApiException as e:
print("Exception when calling NotificationsApi->get_notifications_availabletopics: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/notifications/channels Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: The list of existing channels
|
```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.NotificationsApi();
includechannels = ''token'' # str | Show user's channels for this specific token or across all tokens for this user and app. Channel Ids for other access tokens will not be shown, but will be presented to show their existence. (optional) (default to 'token')
try:
# The list of existing channels
api_response = api_instance.get_notifications_channels(includechannels=includechannels)
pprint(api_response)
except ApiException as e:
print("Exception when calling NotificationsApi->get_notifications_channels: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/notifications/channels Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Create a new channel. There is a limit of 20 channels per user/app combination. Creating a 21st channel will remove the channel with oldest last used date. Channels without an active connection will be removed first.
|
```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.NotificationsApi();
try:
# Create a new channel
api_response = api_instance.post_notifications_channels()
pprint(api_response)
except ApiException as e:
print("Exception when calling NotificationsApi->post_notifications_channels: %s\n" % e)```
|
Provide a Python example that uses the HEAD /api/v2/notifications/channels/{channelId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Verify a channel still exists and is valid. Returns a 200 OK if channel exists, and a 404 Not Found if it doesn't
|
```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.NotificationsApi();
channel_id = 'channel_id_example' # str | Channel ID
try:
# Verify a channel still exists and is valid
api_instance.head_notifications_channel(channel_id)
except ApiException as e:
print("Exception when calling NotificationsApi->head_notifications_channel: %s\n" % e)```
|
Provide a Python example that uses the DELETE /api/v2/notifications/channels/{channelId}/subscriptions Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Remove all subscriptions
|
```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.NotificationsApi();
channel_id = 'channel_id_example' # str | Channel ID
try:
# Remove all subscriptions
api_instance.delete_notifications_channel_subscriptions(channel_id)
except ApiException as e:
print("Exception when calling NotificationsApi->delete_notifications_channel_subscriptions: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/notifications/channels/{channelId}/subscriptions Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: The list of all subscriptions for this channel
|
```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.NotificationsApi();
channel_id = 'channel_id_example' # str | Channel ID
try:
# The list of all subscriptions for this channel
api_response = api_instance.get_notifications_channel_subscriptions(channel_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling NotificationsApi->get_notifications_channel_subscriptions: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/notifications/channels/{channelId}/subscriptions Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Add a list of subscriptions to the existing list of subscriptions
|
```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.NotificationsApi();
channel_id = 'channel_id_example' # str | Channel ID
body = [PureCloudPlatformClientV2.ChannelTopic()] # list[ChannelTopic] | Body
ignore_errors = False # bool | Optionally prevent throwing of errors for failed permissions checks. (optional) (default to False)
try:
# Add a list of subscriptions to the existing list of subscriptions
api_response = api_instance.post_notifications_channel_subscriptions(channel_id, body, ignore_errors=ignore_errors)
pprint(api_response)
except ApiException as e:
print("Exception when calling NotificationsApi->post_notifications_channel_subscriptions: %s\n" % e)```
|
Provide a Python example that uses the PUT /api/v2/notifications/channels/{channelId}/subscriptions Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Replace the current list of subscriptions with a new list.
|
```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.NotificationsApi();
channel_id = 'channel_id_example' # str | Channel ID
body = [PureCloudPlatformClientV2.ChannelTopic()] # list[ChannelTopic] | Body
ignore_errors = False # bool | Optionally prevent throwing of errors for failed permissions checks. (optional) (default to False)
try:
# Replace the current list of subscriptions with a new list.
api_response = api_instance.put_notifications_channel_subscriptions(channel_id, body, ignore_errors=ignore_errors)
pprint(api_response)
except ApiException as e:
print("Exception when calling NotificationsApi->put_notifications_channel_subscriptions: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/oauth/authorizations Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: List clients that have been authorized, requested, or revoked by the resource owner
|
```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.OAuthApi();
accept_language = ''en-us'' # str | The language in which to display the client descriptions. (optional) (default to 'en-us')
try:
# List clients that have been authorized, requested, or revoked by the resource owner
api_response = api_instance.get_oauth_authorizations(accept_language=accept_language)
pprint(api_response)
except ApiException as e:
print("Exception when calling OAuthApi->get_oauth_authorizations: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/oauth/authorizations/{clientId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get a client that is authorized by the resource owner
|
```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.OAuthApi();
client_id = 'client_id_example' # str | The ID of client
accept_language = ''en-us'' # str | The language in which to display the client descriptions. (optional) (default to 'en-us')
try:
# Get a client that is authorized by the resource owner
api_response = api_instance.get_oauth_authorization(client_id, accept_language=accept_language)
pprint(api_response)
except ApiException as e:
print("Exception when calling OAuthApi->get_oauth_authorization: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/oauth/clients Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: The list of OAuth clients
|
```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.OAuthApi();
try:
# The list of OAuth clients
api_response = api_instance.get_oauth_clients()
pprint(api_response)
except ApiException as e:
print("Exception when calling OAuthApi->get_oauth_clients: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/oauth/clients Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Create OAuth client. The OAuth Grant/Client is required in order to create an authentication token and gain access to PureCloud. The preferred authorizedGrantTypes is 'CODE' which requires applications to send a client ID and client secret. This is typically a web server. If the client is unable to secure the client secret then the 'TOKEN' grant type aka IMPLICIT should be used. This is would be for browser or mobile apps. If a client is to be used outside of the context of a user then the 'CLIENT-CREDENTIALS' grant may be used. In this case the client must be granted roles via the 'roleIds' field.
|
```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.OAuthApi();
body = PureCloudPlatformClientV2.OAuthClientRequest() # OAuthClientRequest | Client
try:
# Create OAuth client
api_response = api_instance.post_oauth_clients(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling OAuthApi->post_oauth_clients: %s\n" % e)```
|
Provide a Python example that uses the DELETE /api/v2/oauth/clients/{clientId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Delete OAuth Client
|
```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.OAuthApi();
client_id = 'client_id_example' # str | Client ID
try:
# Delete OAuth Client
api_instance.delete_oauth_client(client_id)
except ApiException as e:
print("Exception when calling OAuthApi->delete_oauth_client: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/oauth/clients/{clientId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get OAuth Client
|
```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.OAuthApi();
client_id = 'client_id_example' # str | Client ID
try:
# Get OAuth Client
api_response = api_instance.get_oauth_client(client_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OAuthApi->get_oauth_client: %s\n" % e)```
|
Provide a Python example that uses the PUT /api/v2/oauth/clients/{clientId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Update OAuth Client
|
```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.OAuthApi();
client_id = 'client_id_example' # str | Client ID
body = PureCloudPlatformClientV2.OAuthClientRequest() # OAuthClientRequest | Client
try:
# Update OAuth Client
api_response = api_instance.put_oauth_client(client_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling OAuthApi->put_oauth_client: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/oauth/clients/{clientId}/secret Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Regenerate Client Secret. This operation will set the client secret to a randomly generated cryptographically random value. All clients must be updated with the new secret. This operation should be used with caution.
|
```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.OAuthApi();
client_id = 'client_id_example' # str | Client ID
try:
# Regenerate Client Secret
api_response = api_instance.post_oauth_client_secret(client_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OAuthApi->post_oauth_client_secret: %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 GET /api/v2/oauth/scopes Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: The list of OAuth scopes
|
```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.OAuthApi();
accept_language = ''en-us'' # str | The language with which to display the scope descriptions. (optional) (default to 'en-us')
try:
# The list of OAuth scopes
api_response = api_instance.get_oauth_scopes(accept_language=accept_language)
pprint(api_response)
except ApiException as e:
print("Exception when calling OAuthApi->get_oauth_scopes: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/oauth/scopes/{scopeId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: An OAuth scope
|
```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.OAuthApi();
scope_id = 'scope_id_example' # str | Scope ID
accept_language = ''en-us'' # str | The language with which to display the scope description. (optional) (default to 'en-us')
try:
# An OAuth scope
api_response = api_instance.get_oauth_scope(scope_id, accept_language=accept_language)
pprint(api_response)
except ApiException as e:
print("Exception when calling OAuthApi->get_oauth_scope: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/authorization/divisions Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Retrieve a list of all divisions defined for the organization. Request specific divisions by id using a query param "id", e.g. ?id=5f777167-63be-4c24-ad41-374155d9e28b&id=72e9fb25-c484-488d-9312-7acba82435b3
|
```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.ObjectsApi();
page_size = 25 # int | The total page size requested (optional) (default to 25)
page_number = 1 # int | The page number requested (optional) (default to 1)
sort_by = 'sort_by_example' # str | variable name requested to sort by (optional)
expand = ['expand_example'] # list[str] | variable name requested by expand list (optional)
next_page = 'next_page_example' # str | next page token (optional)
previous_page = 'previous_page_example' # str | Previous page token (optional)
object_count = False # bool | Include the count of objects contained in the division (optional) (default to False)
id = ['id_example'] # list[str] | Optionally request specific divisions by their IDs (optional)
name = 'name_example' # str | Search term to filter by division name (optional)
try:
# Retrieve a list of all divisions defined for the organization
api_response = api_instance.get_authorization_divisions(page_size=page_size, page_number=page_number, sort_by=sort_by, expand=expand, next_page=next_page, previous_page=previous_page, object_count=object_count, id=id, name=name)
pprint(api_response)
except ApiException as e:
print("Exception when calling ObjectsApi->get_authorization_divisions: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/authorization/divisions Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Create 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.ObjectsApi();
body = PureCloudPlatformClientV2.AuthzDivision() # AuthzDivision | Division
try:
# Create a division.
api_response = api_instance.post_authorization_divisions(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling ObjectsApi->post_authorization_divisions: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/authorization/divisions/home Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Retrieve the home division for the organization. Will not include object counts.
|
```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.ObjectsApi();
try:
# Retrieve the home division for the organization.
api_response = api_instance.get_authorization_divisions_home()
pprint(api_response)
except ApiException as e:
print("Exception when calling ObjectsApi->get_authorization_divisions_home: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/authorization/divisions/limit Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Returns the maximum allowed number of divisions.
|
```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.ObjectsApi();
try:
# Returns the maximum allowed number of divisions.
api_response = api_instance.get_authorization_divisions_limit()
pprint(api_response)
except ApiException as e:
print("Exception when calling ObjectsApi->get_authorization_divisions_limit: %s\n" % e)```
|
Provide a Python example that uses the DELETE /api/v2/authorization/divisions/{divisionId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Delete 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.ObjectsApi();
division_id = 'division_id_example' # str | Division ID
force = False # bool | Force delete this division as well as the grants and objects associated with it (optional) (default to False)
try:
# Delete a division.
api_instance.delete_authorization_division(division_id, force=force)
except ApiException as e:
print("Exception when calling ObjectsApi->delete_authorization_division: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/authorization/divisions/{divisionId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Returns an authorization 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.ObjectsApi();
division_id = 'division_id_example' # str | Division ID
object_count = False # bool | Get count of objects in this division, grouped by type (optional) (default to False)
try:
# Returns an authorization division.
api_response = api_instance.get_authorization_division(division_id, object_count=object_count)
pprint(api_response)
except ApiException as e:
print("Exception when calling ObjectsApi->get_authorization_division: %s\n" % e)```
|
Provide a Python example that uses the PUT /api/v2/authorization/divisions/{divisionId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Update 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.ObjectsApi();
division_id = 'division_id_example' # str | Division ID
body = PureCloudPlatformClientV2.AuthzDivision() # AuthzDivision | Updated division data
try:
# Update a division.
api_response = api_instance.put_authorization_division(division_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling ObjectsApi->put_authorization_division: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/authorization/divisions/{divisionId}/objects/{objectType} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Assign a list of objects to a division. Set the division of a specified list of objects. The objects must all be of the same type, one of: CAMPAIGN, MANAGEMENTUNIT, FLOW, QUEUE, DATATABLES or USER. The body of the request is a list of object IDs, which are expected to be GUIDs, e.g. ["206ce31f-61ec-40ed-a8b1-be6f06303998","250a754e-f5e4-4f51-800f-a92f09d3bf8c"]
|
```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.ObjectsApi();
division_id = 'division_id_example' # str | Division ID
object_type = 'object_type_example' # str | The type of the objects. Must be one of the valid object types
body = ['body_example'] # list[str] | Object Id List
try:
# Assign a list of objects to a division
api_instance.post_authorization_division_object(division_id, object_type, body)
except ApiException as e:
print("Exception when calling ObjectsApi->post_authorization_division_object: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/authorization/divisions/{divisionId}/restore Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Recreate a previously deleted 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.ObjectsApi();
division_id = 'division_id_example' # str | Division ID
body = PureCloudPlatformClientV2.AuthzDivision() # AuthzDivision | Recreated division data (optional)
try:
# Recreate a previously deleted division.
api_response = api_instance.post_authorization_division_restore(division_id, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling ObjectsApi->post_authorization_division_restore: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/usage/events/definitions Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get all operational event definitions
|
```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.OperationalEventsApi();
try:
# Get all operational event definitions
api_response = api_instance.get_usage_events_definitions()
pprint(api_response)
except ApiException as e:
print("Exception when calling OperationalEventsApi->get_usage_events_definitions: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/usage/events/definitions/{eventDefinitionId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get an operational event definition by its 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.OperationalEventsApi();
event_definition_id = 'event_definition_id_example' # str | EventDefinition id
try:
# Get an operational event definition by its id
api_response = api_instance.get_usage_events_definition(event_definition_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OperationalEventsApi->get_usage_events_definition: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/organizations/authentication/settings Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Gets the organization's 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.OrganizationApi();
try:
# Gets the organization's settings
api_response = api_instance.get_organizations_authentication_settings()
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationApi->get_organizations_authentication_settings: %s\n" % e)```
|
Provide a Python example that uses the PATCH /api/v2/organizations/authentication/settings Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Update the organization's 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.OrganizationApi();
body = PureCloudPlatformClientV2.OrgAuthSettings() # OrgAuthSettings | Org settings
try:
# Update the organization's settings
api_response = api_instance.patch_organizations_authentication_settings(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationApi->patch_organizations_authentication_settings: %s\n" % e)```
|
Provide a Python example that uses the PATCH /api/v2/organizations/features/{featureName} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Update organization
|
```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.OrganizationApi();
feature_name = 'feature_name_example' # str | Organization feature
enabled = PureCloudPlatformClientV2.FeatureState() # FeatureState | New state of feature
try:
# Update organization
api_response = api_instance.patch_organizations_feature(feature_name, enabled)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationApi->patch_organizations_feature: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/organizations/limits/changerequests Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get the available limit change requests. Timestamp interval defaults to the last 365 days if both query parameters are omitted. If only one parameter is omitted, the interval will default to a 180 day range in the specified direction.
|
```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.OrganizationApi();
after = 56 # int | Timestamp indicating the date to begin after when searching for requests. (optional)
before = 56 # int | Timestamp indicating the date to end before when searching for requests. (optional)
status = 'status_example' # str | Status of the request to be filtered by (optional)
page_size = 25 # int | Page Size (optional) (default to 25)
expand = ['expand_example'] # list[str] | Which fields, if any, to expand. (optional)
try:
# Get the available limit change requests
api_response = api_instance.get_organizations_limits_changerequests(after=after, before=before, status=status, page_size=page_size, expand=expand)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationApi->get_organizations_limits_changerequests: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/organizations/limits/changerequests/{requestId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get a limit change 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.OrganizationApi();
request_id = 'request_id_example' # str | Unique id for the limit change request
try:
# Get a limit change request
api_response = api_instance.get_organizations_limits_changerequest(request_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationApi->get_organizations_limits_changerequest: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/organizations/limits/docs Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get limit documentation
|
```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.OrganizationApi();
try:
# Get limit documentation
api_response = api_instance.get_organizations_limits_docs()
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationApi->get_organizations_limits_docs: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/organizations/limits/docs/freetrial Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get free trial limit documentation
|
```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.OrganizationApi();
try:
# Get free trial limit documentation
api_response = api_instance.get_organizations_limits_docs_freetrial()
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationApi->get_organizations_limits_docs_freetrial: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/organizations/limits/namespaces Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get the available limit namespaces
|
```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.OrganizationApi();
page_size = 100 # int | Page size (optional) (default to 100)
page_number = 1 # int | Page number (optional) (default to 1)
try:
# Get the available limit namespaces
api_response = api_instance.get_organizations_limits_namespaces(page_size=page_size, page_number=page_number)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationApi->get_organizations_limits_namespaces: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/organizations/limits/namespaces/{namespaceName} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get the effective limits in a namespace for an organization
|
```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.OrganizationApi();
namespace_name = 'namespace_name_example' # str | The namespace to fetch limits for
try:
# Get the effective limits in a namespace for an organization
api_response = api_instance.get_organizations_limits_namespace(namespace_name)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationApi->get_organizations_limits_namespace: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/organizations/limits/namespaces/{namespaceName}/counts Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get estimated limit counts for a namespace. This is not a source of truth for limit values but a record of estimates to facilitate limit threshold tracking. See https://developer.genesys.cloud/organization/organization/limits#available-limits for limits that are trackable (Operational Events 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.OrganizationApi();
namespace_name = 'namespace_name_example' # str | The namespace to get
cursor = 'cursor_example' # str | Cursor provided when retrieving the last page (optional)
entity_id = 'entity_id_example' # str | entity id of the count (optional)
user_id = 'user_id_example' # str | userid of the count (optional)
try:
# Get estimated limit counts for a namespace. This is not a source of truth for limit values but a record of estimates to facilitate limit threshold tracking.
api_response = api_instance.get_organizations_limits_namespace_counts(namespace_name, cursor=cursor, entity_id=entity_id, user_id=user_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationApi->get_organizations_limits_namespace_counts: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/organizations/limits/namespaces/{namespaceName}/defaults Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get the default limits in a namespace for an organization
|
```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.OrganizationApi();
namespace_name = 'namespace_name_example' # str | The namespace to fetch defaults limits for
try:
# Get the default limits in a namespace for an organization
api_response = api_instance.get_organizations_limits_namespace_defaults(namespace_name)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationApi->get_organizations_limits_namespace_defaults: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/organizations/limits/namespaces/{namespaceName}/limits/{limitName}/counts Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get estimated limit counts for a namespace and limit name. This is not a source of truth for limit values but a record of estimates to facilitate limit threshold tracking. See https://developer.genesys.cloud/organization/organization/limits#available-limits for limits that are trackable (Operational Events 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.OrganizationApi();
namespace_name = 'namespace_name_example' # str | The namespace to get
limit_name = 'limit_name_example' # str | The limit to get
entity_id = 'entity_id_example' # str | entity id of the count (optional)
user_id = 'user_id_example' # str | userid of the count (optional)
cursor = 'cursor_example' # str | Cursor provided when retrieving the last page (optional)
try:
# Get estimated limit counts for a namespace and limit name. This is not a source of truth for limit values but a record of estimates to facilitate limit threshold tracking.
api_response = api_instance.get_organizations_limits_namespace_limit_counts(namespace_name, limit_name, entity_id=entity_id, user_id=user_id, cursor=cursor)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationApi->get_organizations_limits_namespace_limit_counts: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/organizations/me Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get organization.
|
```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.OrganizationApi();
try:
# Get organization.
api_response = api_instance.get_organizations_me()
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationApi->get_organizations_me: %s\n" % e)```
|
Provide a Python example that uses the PUT /api/v2/organizations/me Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Update organization.
|
```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.OrganizationApi();
body = PureCloudPlatformClientV2.Organization() # Organization | Organization (optional)
try:
# Update organization.
api_response = api_instance.put_organizations_me(body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationApi->put_organizations_me: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/orgauthorization/pairings Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: A pairing id is created by the trustee and given to the trustor to create a trust.
|
```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.OrganizationAuthorizationApi();
body = PureCloudPlatformClientV2.TrustRequestCreate() # TrustRequestCreate | Pairing Info
try:
# A pairing id is created by the trustee and given to the trustor to create a trust.
api_response = api_instance.post_orgauthorization_pairings(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->post_orgauthorization_pairings: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/orgauthorization/pairings/{pairingId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get Pairing Info
|
```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.OrganizationAuthorizationApi();
pairing_id = 'pairing_id_example' # str | Pairing Id
try:
# Get Pairing Info
api_response = api_instance.get_orgauthorization_pairing(pairing_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->get_orgauthorization_pairing: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/orgauthorization/trustees Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: The list of trustees for this organization (i.e. organizations granted access to this organization).
|
```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.OrganizationAuthorizationApi();
page_size = 25 # int | Page size (optional) (default to 25)
page_number = 1 # int | Page number (optional) (default to 1)
try:
# The list of trustees for this organization (i.e. organizations granted access to this organization).
api_response = api_instance.get_orgauthorization_trustees(page_size=page_size, page_number=page_number)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->get_orgauthorization_trustees: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/orgauthorization/trustees Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Create a new organization authorization trust. This is required to grant other organizations access to your organization.
|
```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.OrganizationAuthorizationApi();
body = PureCloudPlatformClientV2.TrustCreate() # TrustCreate | Trust
try:
# Create a new organization authorization trust. This is required to grant other organizations access to your organization.
api_response = api_instance.post_orgauthorization_trustees(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->post_orgauthorization_trustees: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/orgauthorization/trustees/audits Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get Org Trustee Audits
|
```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.OrganizationAuthorizationApi();
body = PureCloudPlatformClientV2.TrusteeAuditQueryRequest() # TrusteeAuditQueryRequest | Values to scope the request.
page_size = 25 # int | Page size (optional) (default to 25)
page_number = 1 # int | Page number (optional) (default to 1)
sort_by = ''timestamp'' # str | Sort by (optional) (default to 'timestamp')
sort_order = ''descending'' # str | Sort order (optional) (default to 'descending')
try:
# Get Org Trustee Audits
api_response = api_instance.post_orgauthorization_trustees_audits(body, page_size=page_size, page_number=page_number, sort_by=sort_by, sort_order=sort_order)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->post_orgauthorization_trustees_audits: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/orgauthorization/trustees/default Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get organization authorization trust with Customer Care, if one exists.
|
```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.OrganizationAuthorizationApi();
try:
# Get organization authorization trust with Customer Care, if one exists.
api_response = api_instance.get_orgauthorization_trustees_default()
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->get_orgauthorization_trustees_default: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/orgauthorization/trustees/default Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Create a new organization authorization trust with Customer Care. This is required to grant your regional Customer Care organization access to your organization.
|
```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.OrganizationAuthorizationApi();
assign_default_role = True # bool | Assign Admin role to default pairing with Customer Care (optional)
auto_expire = True # bool | Automatically expire pairing after 30 days (optional)
try:
# Create a new organization authorization trust with Customer Care. This is required to grant your regional Customer Care organization access to your organization.
api_response = api_instance.post_orgauthorization_trustees_default(assign_default_role=assign_default_role, auto_expire=auto_expire)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->post_orgauthorization_trustees_default: %s\n" % e)```
|
Provide a Python example that uses the DELETE /api/v2/orgauthorization/trustees/{trusteeOrgId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Delete Org Trust
|
```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.OrganizationAuthorizationApi();
trustee_org_id = 'trustee_org_id_example' # str | Trustee Organization Id
try:
# Delete Org Trust
api_instance.delete_orgauthorization_trustee(trustee_org_id)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->delete_orgauthorization_trustee: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/orgauthorization/trustees/{trusteeOrgId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get Org Trust
|
```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.OrganizationAuthorizationApi();
trustee_org_id = 'trustee_org_id_example' # str | Trustee Organization Id
try:
# Get Org Trust
api_response = api_instance.get_orgauthorization_trustee(trustee_org_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->get_orgauthorization_trustee: %s\n" % e)```
|
Provide a Python example that uses the PUT /api/v2/orgauthorization/trustees/{trusteeOrgId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Update Org Trust
|
```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.OrganizationAuthorizationApi();
trustee_org_id = 'trustee_org_id_example' # str | Trustee Organization Id
body = PureCloudPlatformClientV2.TrustUpdate() # TrustUpdate | Client
try:
# Update Org Trust
api_response = api_instance.put_orgauthorization_trustee(trustee_org_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->put_orgauthorization_trustee: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/orgauthorization/trustees/{trusteeOrgId}/clonedusers Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: The list of cloned users from the trustee organization (i.e. users with a native user record). There can be no more than 5 cloned users per organization, so results are represented as simple list and not paged
|
```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.OrganizationAuthorizationApi();
trustee_org_id = 'trustee_org_id_example' # str | Trustee Organization Id
try:
# The list of cloned users from the trustee organization (i.e. users with a native user record).
api_response = api_instance.get_orgauthorization_trustee_clonedusers(trustee_org_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->get_orgauthorization_trustee_clonedusers: %s\n" % e)```
|
Provide a Python example that uses the DELETE /api/v2/orgauthorization/trustees/{trusteeOrgId}/clonedusers/{trusteeUserId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Deletes cloned 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.OrganizationAuthorizationApi();
trustee_org_id = 'trustee_org_id_example' # str | Trustee Organization Id
trustee_user_id = 'trustee_user_id_example' # str | Id of the cloned user to delete
try:
# Deletes cloned user
api_instance.delete_orgauthorization_trustee_cloneduser(trustee_org_id, trustee_user_id)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->delete_orgauthorization_trustee_cloneduser: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/orgauthorization/trustees/{trusteeOrgId}/groups Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: The list of trustee groups for this organization (i.e. groups granted access to this organization).
|
```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.OrganizationAuthorizationApi();
trustee_org_id = 'trustee_org_id_example' # str | Trustee Organization Id
page_size = 25 # int | Page size (optional) (default to 25)
page_number = 1 # int | Page number (optional) (default to 1)
try:
# The list of trustee groups for this organization (i.e. groups granted access to this organization).
api_response = api_instance.get_orgauthorization_trustee_groups(trustee_org_id, page_size=page_size, page_number=page_number)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->get_orgauthorization_trustee_groups: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/orgauthorization/trustees/{trusteeOrgId}/groups Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Add a group to the trust.
|
```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.OrganizationAuthorizationApi();
trustee_org_id = 'trustee_org_id_example' # str | Trustee Organization Id
body = PureCloudPlatformClientV2.TrustMemberCreate() # TrustMemberCreate | Trust
try:
# Add a group to the trust.
api_response = api_instance.post_orgauthorization_trustee_groups(trustee_org_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->post_orgauthorization_trustee_groups: %s\n" % e)```
|
Provide a Python example that uses the DELETE /api/v2/orgauthorization/trustees/{trusteeOrgId}/groups/{trusteeGroupId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Delete Trustee 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.OrganizationAuthorizationApi();
trustee_org_id = 'trustee_org_id_example' # str | Trustee Organization Id
trustee_group_id = 'trustee_group_id_example' # str | Trustee Group Id
try:
# Delete Trustee Group
api_instance.delete_orgauthorization_trustee_group(trustee_org_id, trustee_group_id)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->delete_orgauthorization_trustee_group: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/orgauthorization/trustees/{trusteeOrgId}/groups/{trusteeGroupId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get Trustee 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.OrganizationAuthorizationApi();
trustee_org_id = 'trustee_org_id_example' # str | Trustee Organization Id
trustee_group_id = 'trustee_group_id_example' # str | Trustee Group Id
try:
# Get Trustee Group
api_response = api_instance.get_orgauthorization_trustee_group(trustee_org_id, trustee_group_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->get_orgauthorization_trustee_group: %s\n" % e)```
|
Provide a Python example that uses the PUT /api/v2/orgauthorization/trustees/{trusteeOrgId}/groups/{trusteeGroupId}/roledivisions Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Update Trustee Group Roles
|
```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.OrganizationAuthorizationApi();
trustee_org_id = 'trustee_org_id_example' # str | Trustee Organization Id
trustee_group_id = 'trustee_group_id_example' # str | Trustee Group Id
body = PureCloudPlatformClientV2.RoleDivisionGrants() # RoleDivisionGrants | Set of roles with corresponding divisions to apply
try:
# Update Trustee Group Roles
api_response = api_instance.put_orgauthorization_trustee_group_roledivisions(trustee_org_id, trustee_group_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->put_orgauthorization_trustee_group_roledivisions: %s\n" % e)```
|
Provide a Python example that uses the DELETE /api/v2/orgauthorization/trustees/{trusteeOrgId}/groups/{trusteeGroupId}/roles Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Delete Trustee Group Roles
|
```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.OrganizationAuthorizationApi();
trustee_org_id = 'trustee_org_id_example' # str | Trustee Organization Id
trustee_group_id = 'trustee_group_id_example' # str | Trustee Group Id
try:
# Delete Trustee Group Roles
api_instance.delete_orgauthorization_trustee_group_roles(trustee_org_id, trustee_group_id)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->delete_orgauthorization_trustee_group_roles: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/orgauthorization/trustees/{trusteeOrgId}/groups/{trusteeGroupId}/roles Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get Trustee Group Roles
|
```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.OrganizationAuthorizationApi();
trustee_org_id = 'trustee_org_id_example' # str | Trustee Organization Id
trustee_group_id = 'trustee_group_id_example' # str | Trustee Group Id
try:
# Get Trustee Group Roles
api_response = api_instance.get_orgauthorization_trustee_group_roles(trustee_org_id, trustee_group_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->get_orgauthorization_trustee_group_roles: %s\n" % e)```
|
Provide a Python example that uses the PUT /api/v2/orgauthorization/trustees/{trusteeOrgId}/groups/{trusteeGroupId}/roles Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Update Trustee Group Roles
|
```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.OrganizationAuthorizationApi();
trustee_org_id = 'trustee_org_id_example' # str | Trustee Organization Id
trustee_group_id = 'trustee_group_id_example' # str | Trustee Group Id
body = ['body_example'] # list[str] | List of roles
try:
# Update Trustee Group Roles
api_response = api_instance.put_orgauthorization_trustee_group_roles(trustee_org_id, trustee_group_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->put_orgauthorization_trustee_group_roles: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/orgauthorization/trustees/{trusteeOrgId}/users Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: The list of trustee users for this organization (i.e. users granted access to this organization).
|
```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.OrganizationAuthorizationApi();
trustee_org_id = 'trustee_org_id_example' # str | Trustee Organization Id
page_size = 25 # int | Page size (optional) (default to 25)
page_number = 1 # int | Page number (optional) (default to 1)
try:
# The list of trustee users for this organization (i.e. users granted access to this organization).
api_response = api_instance.get_orgauthorization_trustee_users(trustee_org_id, page_size=page_size, page_number=page_number)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->get_orgauthorization_trustee_users: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/orgauthorization/trustees/{trusteeOrgId}/users Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Add a user to the trust.
|
```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.OrganizationAuthorizationApi();
trustee_org_id = 'trustee_org_id_example' # str | Trustee Organization Id
body = PureCloudPlatformClientV2.TrustMemberCreate() # TrustMemberCreate | Trust
try:
# Add a user to the trust.
api_response = api_instance.post_orgauthorization_trustee_users(trustee_org_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->post_orgauthorization_trustee_users: %s\n" % e)```
|
Provide a Python example that uses the DELETE /api/v2/orgauthorization/trustees/{trusteeOrgId}/users/{trusteeUserId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Delete Trustee 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.OrganizationAuthorizationApi();
trustee_org_id = 'trustee_org_id_example' # str | Trustee Organization Id
trustee_user_id = 'trustee_user_id_example' # str | Trustee User Id
try:
# Delete Trustee User
api_instance.delete_orgauthorization_trustee_user(trustee_org_id, trustee_user_id)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->delete_orgauthorization_trustee_user: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/orgauthorization/trustees/{trusteeOrgId}/users/{trusteeUserId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get Trustee 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.OrganizationAuthorizationApi();
trustee_org_id = 'trustee_org_id_example' # str | Trustee Organization Id
trustee_user_id = 'trustee_user_id_example' # str | Trustee User Id
try:
# Get Trustee User
api_response = api_instance.get_orgauthorization_trustee_user(trustee_org_id, trustee_user_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->get_orgauthorization_trustee_user: %s\n" % e)```
|
Provide a Python example that uses the PUT /api/v2/orgauthorization/trustees/{trusteeOrgId}/users/{trusteeUserId}/roledivisions Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Update Trustee User Roles
|
```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.OrganizationAuthorizationApi();
trustee_org_id = 'trustee_org_id_example' # str | Trustee Organization Id
trustee_user_id = 'trustee_user_id_example' # str | Trustee User Id
body = PureCloudPlatformClientV2.RoleDivisionGrants() # RoleDivisionGrants | Set of roles with corresponding divisions to apply
try:
# Update Trustee User Roles
api_response = api_instance.put_orgauthorization_trustee_user_roledivisions(trustee_org_id, trustee_user_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->put_orgauthorization_trustee_user_roledivisions: %s\n" % e)```
|
Provide a Python example that uses the DELETE /api/v2/orgauthorization/trustees/{trusteeOrgId}/users/{trusteeUserId}/roles Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Delete Trustee User Roles
|
```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.OrganizationAuthorizationApi();
trustee_org_id = 'trustee_org_id_example' # str | Trustee Organization Id
trustee_user_id = 'trustee_user_id_example' # str | Trustee User Id
try:
# Delete Trustee User Roles
api_instance.delete_orgauthorization_trustee_user_roles(trustee_org_id, trustee_user_id)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->delete_orgauthorization_trustee_user_roles: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/orgauthorization/trustees/{trusteeOrgId}/users/{trusteeUserId}/roles Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get Trustee User Roles
|
```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.OrganizationAuthorizationApi();
trustee_org_id = 'trustee_org_id_example' # str | Trustee Organization Id
trustee_user_id = 'trustee_user_id_example' # str | Trustee User Id
try:
# Get Trustee User Roles
api_response = api_instance.get_orgauthorization_trustee_user_roles(trustee_org_id, trustee_user_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->get_orgauthorization_trustee_user_roles: %s\n" % e)```
|
Provide a Python example that uses the PUT /api/v2/orgauthorization/trustees/{trusteeOrgId}/users/{trusteeUserId}/roles Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Update Trustee User Roles
|
```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.OrganizationAuthorizationApi();
trustee_org_id = 'trustee_org_id_example' # str | Trustee Organization Id
trustee_user_id = 'trustee_user_id_example' # str | Trustee User Id
body = ['body_example'] # list[str] | List of roles
try:
# Update Trustee User Roles
api_response = api_instance.put_orgauthorization_trustee_user_roles(trustee_org_id, trustee_user_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->put_orgauthorization_trustee_user_roles: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/orgauthorization/trustor/audits Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get Org Trustor Audits
|
```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.OrganizationAuthorizationApi();
body = PureCloudPlatformClientV2.TrustorAuditQueryRequest() # TrustorAuditQueryRequest | Values to scope the request.
page_size = 25 # int | Page size (optional) (default to 25)
page_number = 1 # int | Page number (optional) (default to 1)
sort_by = ''timestamp'' # str | Sort by (optional) (default to 'timestamp')
sort_order = ''descending'' # str | Sort order (optional) (default to 'descending')
try:
# Get Org Trustor Audits
api_response = api_instance.post_orgauthorization_trustor_audits(body, page_size=page_size, page_number=page_number, sort_by=sort_by, sort_order=sort_order)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->post_orgauthorization_trustor_audits: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/orgauthorization/trustors Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: The list of organizations that have authorized/trusted your organization.
|
```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.OrganizationAuthorizationApi();
page_size = 25 # int | Page size (optional) (default to 25)
page_number = 1 # int | Page number (optional) (default to 1)
try:
# The list of organizations that have authorized/trusted your organization.
api_response = api_instance.get_orgauthorization_trustors(page_size=page_size, page_number=page_number)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->get_orgauthorization_trustors: %s\n" % e)```
|
Provide a Python example that uses the DELETE /api/v2/orgauthorization/trustors/{trustorOrgId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Delete Org Trust
|
```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.OrganizationAuthorizationApi();
trustor_org_id = 'trustor_org_id_example' # str | Trustor Organization Id
try:
# Delete Org Trust
api_instance.delete_orgauthorization_trustor(trustor_org_id)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->delete_orgauthorization_trustor: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/orgauthorization/trustors/{trustorOrgId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get Org Trust
|
```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.OrganizationAuthorizationApi();
trustor_org_id = 'trustor_org_id_example' # str | Trustor Organization Id
try:
# Get Org Trust
api_response = api_instance.get_orgauthorization_trustor(trustor_org_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->get_orgauthorization_trustor: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/orgauthorization/trustors/{trustorOrgId}/clonedusers Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: The list of cloned users in the trustor organization (i.e. users with a native user record).
|
```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.OrganizationAuthorizationApi();
trustor_org_id = 'trustor_org_id_example' # str | Trustor Organization Id
try:
# The list of cloned users in the trustor organization (i.e. users with a native user record).
api_response = api_instance.get_orgauthorization_trustor_clonedusers(trustor_org_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->get_orgauthorization_trustor_clonedusers: %s\n" % e)```
|
Provide a Python example that uses the DELETE /api/v2/orgauthorization/trustors/{trustorOrgId}/clonedusers/{trusteeUserId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Delete Cloned 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.OrganizationAuthorizationApi();
trustor_org_id = 'trustor_org_id_example' # str | Trustor Organization Id
trustee_user_id = 'trustee_user_id_example' # str | Trustee User Id
try:
# Delete Cloned User
api_instance.delete_orgauthorization_trustor_cloneduser(trustor_org_id, trustee_user_id)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->delete_orgauthorization_trustor_cloneduser: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/orgauthorization/trustors/{trustorOrgId}/clonedusers/{trusteeUserId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get Cloned 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.OrganizationAuthorizationApi();
trustor_org_id = 'trustor_org_id_example' # str | Trustor Organization Id
trustee_user_id = 'trustee_user_id_example' # str | Trustee User Id
try:
# Get Cloned User
api_response = api_instance.get_orgauthorization_trustor_cloneduser(trustor_org_id, trustee_user_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->get_orgauthorization_trustor_cloneduser: %s\n" % e)```
|
Provide a Python example that uses the PUT /api/v2/orgauthorization/trustors/{trustorOrgId}/clonedusers/{trusteeUserId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Creates a clone of the trustee user in the trustor org.
|
```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.OrganizationAuthorizationApi();
trustor_org_id = 'trustor_org_id_example' # str | Trustor Organization Id
trustee_user_id = 'trustee_user_id_example' # str | Trustee User Id
try:
# Creates a clone of the trustee user in the trustor org.
api_response = api_instance.put_orgauthorization_trustor_cloneduser(trustor_org_id, trustee_user_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->put_orgauthorization_trustor_cloneduser: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/orgauthorization/trustors/{trustorOrgId}/groups Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: The list of groups in the trustor organization (i.e. groups granted access).
|
```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.OrganizationAuthorizationApi();
trustor_org_id = 'trustor_org_id_example' # str | Trustee Organization Id
page_size = 25 # int | Page size (optional) (default to 25)
page_number = 1 # int | Page number (optional) (default to 1)
try:
# The list of groups in the trustor organization (i.e. groups granted access).
api_response = api_instance.get_orgauthorization_trustor_groups(trustor_org_id, page_size=page_size, page_number=page_number)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->get_orgauthorization_trustor_groups: %s\n" % e)```
|
Provide a Python example that uses the DELETE /api/v2/orgauthorization/trustors/{trustorOrgId}/groups/{trustorGroupId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Delete Trustee 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.OrganizationAuthorizationApi();
trustor_org_id = 'trustor_org_id_example' # str | Trustor Organization Id
trustor_group_id = 'trustor_group_id_example' # str | Trustor Group Id
try:
# Delete Trustee Group
api_instance.delete_orgauthorization_trustor_group(trustor_org_id, trustor_group_id)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->delete_orgauthorization_trustor_group: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/orgauthorization/trustors/{trustorOrgId}/groups/{trustorGroupId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get Trustee 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.OrganizationAuthorizationApi();
trustor_org_id = 'trustor_org_id_example' # str | Trustor Organization Id
trustor_group_id = 'trustor_group_id_example' # str | Trustor Group Id
try:
# Get Trustee Group
api_response = api_instance.get_orgauthorization_trustor_group(trustor_org_id, trustor_group_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->get_orgauthorization_trustor_group: %s\n" % e)```
|
Provide a Python example that uses the PUT /api/v2/orgauthorization/trustors/{trustorOrgId}/groups/{trustorGroupId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Add a Trustee Group to the trust.
|
```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.OrganizationAuthorizationApi();
trustor_org_id = 'trustor_org_id_example' # str | Trustor Organization Id
trustor_group_id = 'trustor_group_id_example' # str | Trustor Group Id
try:
# Add a Trustee Group to the trust.
api_response = api_instance.put_orgauthorization_trustor_group(trustor_org_id, trustor_group_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->put_orgauthorization_trustor_group: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/orgauthorization/trustors/{trustorOrgId}/users Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: The list of users in the trustor organization (i.e. users granted access).
|
```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.OrganizationAuthorizationApi();
trustor_org_id = 'trustor_org_id_example' # str | Trustee Organization Id
page_size = 25 # int | Page size (optional) (default to 25)
page_number = 1 # int | Page number (optional) (default to 1)
try:
# The list of users in the trustor organization (i.e. users granted access).
api_response = api_instance.get_orgauthorization_trustor_users(trustor_org_id, page_size=page_size, page_number=page_number)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->get_orgauthorization_trustor_users: %s\n" % e)```
|
Provide a Python example that uses the DELETE /api/v2/orgauthorization/trustors/{trustorOrgId}/users/{trusteeUserId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Delete Trustee 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.OrganizationAuthorizationApi();
trustor_org_id = 'trustor_org_id_example' # str | Trustor Organization Id
trustee_user_id = 'trustee_user_id_example' # str | Trustee User Id
try:
# Delete Trustee User
api_instance.delete_orgauthorization_trustor_user(trustor_org_id, trustee_user_id)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->delete_orgauthorization_trustor_user: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/orgauthorization/trustors/{trustorOrgId}/users/{trusteeUserId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get Trustee 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.OrganizationAuthorizationApi();
trustor_org_id = 'trustor_org_id_example' # str | Trustor Organization Id
trustee_user_id = 'trustee_user_id_example' # str | Trustee User Id
try:
# Get Trustee User
api_response = api_instance.get_orgauthorization_trustor_user(trustor_org_id, trustee_user_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->get_orgauthorization_trustor_user: %s\n" % e)```
|
Provide a Python example that uses the PUT /api/v2/orgauthorization/trustors/{trustorOrgId}/users/{trusteeUserId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Add a Trustee user to the trust.
|
```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.OrganizationAuthorizationApi();
trustor_org_id = 'trustor_org_id_example' # str | Trustor Organization Id
trustee_user_id = 'trustee_user_id_example' # str | Trustee User Id
try:
# Add a Trustee user to the trust.
api_response = api_instance.put_orgauthorization_trustor_user(trustor_org_id, trustee_user_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationAuthorizationApi->put_orgauthorization_trustor_user: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/outbound/attemptlimits Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Query attempt limits list
|
```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.OutboundApi();
page_size = 25 # int | Page size. The max that will be returned is 100. (optional) (default to 25)
page_number = 1 # int | Page number (optional) (default to 1)
allow_empty_result = False # bool | Whether to return an empty page when there are no results for that page (optional) (default to False)
filter_type = ''Prefix'' # str | Filter type (optional) (default to 'Prefix')
name = 'name_example' # str | Name (optional)
sort_by = 'sort_by_example' # str | Sort by (optional)
sort_order = ''a'' # str | Sort order (optional) (default to 'a')
try:
# Query attempt limits list
api_response = api_instance.get_outbound_attemptlimits(page_size=page_size, page_number=page_number, allow_empty_result=allow_empty_result, filter_type=filter_type, name=name, sort_by=sort_by, sort_order=sort_order)
pprint(api_response)
except ApiException as e:
print("Exception when calling OutboundApi->get_outbound_attemptlimits: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/outbound/attemptlimits Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Create attempt limits
|
```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.OutboundApi();
body = PureCloudPlatformClientV2.AttemptLimits() # AttemptLimits | AttemptLimits
try:
# Create attempt limits
api_response = api_instance.post_outbound_attemptlimits(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling OutboundApi->post_outbound_attemptlimits: %s\n" % e)```
|
Provide a Python example that uses the DELETE /api/v2/outbound/attemptlimits/{attemptLimitsId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Delete attempt limits
|
```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.OutboundApi();
attempt_limits_id = 'attempt_limits_id_example' # str | Attempt limits ID
try:
# Delete attempt limits
api_instance.delete_outbound_attemptlimit(attempt_limits_id)
except ApiException as e:
print("Exception when calling OutboundApi->delete_outbound_attemptlimit: %s\n" % e)```
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.