instruction
stringlengths 81
221
| input
stringlengths 50
1.19k
| output
stringlengths 525
3.61k
|
---|---|---|
Provide a Python example that uses the PUT /api/v2/webdeployments/configurations/{configurationId}/versions/draft Genesys Cloud Python SDK. | Genesys describes this as an API used to: Update the configuration draft | ```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.WebDeploymentsApi();
configuration_id = 'configuration_id_example' # str | The configuration version ID
configuration_version = PureCloudPlatformClientV2.WebDeploymentConfigurationVersion() # WebDeploymentConfigurationVersion |
try:
# Update the configuration draft
api_response = api_instance.put_webdeployments_configuration_versions_draft(configuration_id, configuration_version)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebDeploymentsApi->put_webdeployments_configuration_versions_draft: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/webdeployments/configurations/{configurationId}/versions/draft/publish Genesys Cloud Python SDK. | Genesys describes this as an API used to: Publish the configuration draft and create a new version | ```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.WebDeploymentsApi();
configuration_id = 'configuration_id_example' # str | The configuration version ID
try:
# Publish the configuration draft and create a new version
api_response = api_instance.post_webdeployments_configuration_versions_draft_publish(configuration_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebDeploymentsApi->post_webdeployments_configuration_versions_draft_publish: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/webdeployments/configurations/{configurationId}/versions/{versionId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get a configuration version | ```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.WebDeploymentsApi();
configuration_id = 'configuration_id_example' # str | The configuration version ID
version_id = 'version_id_example' # str | The version of the configuration to get
try:
# Get a configuration version
api_response = api_instance.get_webdeployments_configuration_version(configuration_id, version_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebDeploymentsApi->get_webdeployments_configuration_version: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/webdeployments/deployments Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get deployments | ```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.WebDeploymentsApi();
expand = ['expand_example'] # list[str] | The specified entity attributes will be filled. Comma separated values expected. (optional)
try:
# Get deployments
api_response = api_instance.get_webdeployments_deployments(expand=expand)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebDeploymentsApi->get_webdeployments_deployments: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/webdeployments/deployments Genesys Cloud Python SDK. | Genesys describes this as an API used to: Create a deployment | ```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.WebDeploymentsApi();
deployment = PureCloudPlatformClientV2.WebDeployment() # WebDeployment |
try:
# Create a deployment
api_response = api_instance.post_webdeployments_deployments(deployment)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebDeploymentsApi->post_webdeployments_deployments: %s\n" % e)``` |
Provide a Python example that uses the DELETE /api/v2/webdeployments/deployments/{deploymentId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Delete a deployment | ```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.WebDeploymentsApi();
deployment_id = 'deployment_id_example' # str | The deployment ID
try:
# Delete a deployment
api_instance.delete_webdeployments_deployment(deployment_id)
except ApiException as e:
print("Exception when calling WebDeploymentsApi->delete_webdeployments_deployment: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/webdeployments/deployments/{deploymentId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get a deployment | ```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.WebDeploymentsApi();
deployment_id = 'deployment_id_example' # str | The deployment ID
expand = ['expand_example'] # list[str] | The specified entity attributes will be filled. Comma separated values expected. (optional)
try:
# Get a deployment
api_response = api_instance.get_webdeployments_deployment(deployment_id, expand=expand)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebDeploymentsApi->get_webdeployments_deployment: %s\n" % e)``` |
Provide a Python example that uses the PUT /api/v2/webdeployments/deployments/{deploymentId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Update a deployment | ```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.WebDeploymentsApi();
deployment_id = 'deployment_id_example' # str | The deployment ID
deployment = PureCloudPlatformClientV2.WebDeployment() # WebDeployment |
try:
# Update a deployment
api_response = api_instance.put_webdeployments_deployment(deployment_id, deployment)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebDeploymentsApi->put_webdeployments_deployment: %s\n" % e)``` |
Provide a Python example that uses the DELETE /api/v2/webdeployments/deployments/{deploymentId}/cobrowse/{sessionId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Deletes a cobrowse session | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.WebDeploymentsApi();
deployment_id = 'deployment_id_example' # str | WebMessaging deployment ID
session_id = 'session_id_example' # str | Cobrowse session id or join code
try:
# Deletes a cobrowse session
api_response = api_instance.delete_webdeployments_deployment_cobrowse_session_id(deployment_id, session_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebDeploymentsApi->delete_webdeployments_deployment_cobrowse_session_id: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/webdeployments/deployments/{deploymentId}/cobrowse/{sessionId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Retrieves a cobrowse session | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.WebDeploymentsApi();
deployment_id = 'deployment_id_example' # str | WebMessaging deployment ID
session_id = 'session_id_example' # str | Cobrowse session id or join code
try:
# Retrieves a cobrowse session
api_response = api_instance.get_webdeployments_deployment_cobrowse_session_id(deployment_id, session_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebDeploymentsApi->get_webdeployments_deployment_cobrowse_session_id: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/webdeployments/deployments/{deploymentId}/configurations Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get active configuration for a given deployment | ```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.WebDeploymentsApi();
deployment_id = 'deployment_id_example' # str | The deployment ID
type = 'type_example' # str | Get active configuration on a deployment (optional)
expand = ['expand_example'] # list[str] | Expand instructions for the return value (optional)
try:
# Get active configuration for a given deployment
api_response = api_instance.get_webdeployments_deployment_configurations(deployment_id, type=type, expand=expand)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebDeploymentsApi->get_webdeployments_deployment_configurations: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/webdeployments/token/oauthcodegrantjwtexchange Genesys Cloud Python SDK. | Genesys describes this as an API used to: Exchange an oAuth code (obtained using the Authorization Code Flow) for a JWT that can be used by webdeployments. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.WebDeploymentsApi();
body = PureCloudPlatformClientV2.WebDeploymentsOAuthExchangeRequest() # WebDeploymentsOAuthExchangeRequest | webDeploymentsOAuthExchangeRequest
try:
# Exchange an oAuth code (obtained using the Authorization Code Flow) for a JWT that can be used by webdeployments.
api_response = api_instance.post_webdeployments_token_oauthcodegrantjwtexchange(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebDeploymentsApi->post_webdeployments_token_oauthcodegrantjwtexchange: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/webdeployments/token/refresh Genesys Cloud Python SDK. | Genesys describes this as an API used to: Refresh a JWT. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.WebDeploymentsApi();
body = PureCloudPlatformClientV2.WebDeploymentsRefreshJWTRequest() # WebDeploymentsRefreshJWTRequest | (optional)
try:
# Refresh a JWT.
api_response = api_instance.post_webdeployments_token_refresh(body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebDeploymentsApi->post_webdeployments_token_refresh: %s\n" % e)``` |
Provide a Python example that uses the DELETE /api/v2/webdeployments/token/revoke Genesys Cloud Python SDK. | Genesys describes this as an API used to: Invalidate JWT | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.WebDeploymentsApi();
x_journey_session_id = 'x_journey_session_id_example' # str | The Customer's journey sessionId. (optional)
x_journey_session_type = 'x_journey_session_type_example' # str | The Customer's journey session type. (optional)
try:
# Invalidate JWT
api_instance.delete_webdeployments_token_revoke(x_journey_session_id=x_journey_session_id, x_journey_session_type=x_journey_session_type)
except ApiException as e:
print("Exception when calling WebDeploymentsApi->delete_webdeployments_token_revoke: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/webchat/guest/conversations Genesys Cloud Python SDK. | Genesys describes this as an API used to: Create an ACD chat conversation from an external customer. This endpoint will create a new ACD Chat conversation under the specified Chat Deployment. The conversation will begin with a guest member in it (with a role=CUSTOMER) according to the customer information that is supplied. If the guest member is authenticated, the 'memberAuthToken' field should include his JWT as generated by the 'POST /api/v2/signeddata' resource; if the guest member is anonymous (and the Deployment permits it) this field can be omitted. The returned data includes the IDs of the conversation created, along with a newly-create JWT token that you can supply to all future endpoints as authentication to perform operations against that conversation. After successfully creating a conversation, you should connect a websocket to the event stream named in the 'eventStreamUri' field of the response; the conversation is not routed until the event stream is attached. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.WebChatApi();
body = PureCloudPlatformClientV2.CreateWebChatConversationRequest() # CreateWebChatConversationRequest | CreateConversationRequest
try:
# Create an ACD chat conversation from an external customer.
api_response = api_instance.post_webchat_guest_conversations(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebChatApi->post_webchat_guest_conversations: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/webchat/guest/conversations/{conversationId}/mediarequests Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get all media requests to the guest in the conversation | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure API key authorization: Guest Chat JWT
PureCloudPlatformClientV2.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# PureCloudPlatformClientV2.configuration.api_key_prefix['Authorization'] = 'BEARER'
# 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.WebChatApi();
conversation_id = 'conversation_id_example' # str | conversationId
try:
# Get all media requests to the guest in the conversation
api_response = api_instance.get_webchat_guest_conversation_mediarequests(conversation_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebChatApi->get_webchat_guest_conversation_mediarequests: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/webchat/guest/conversations/{conversationId}/members Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get the members of a chat conversation. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure API key authorization: Guest Chat JWT
PureCloudPlatformClientV2.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# PureCloudPlatformClientV2.configuration.api_key_prefix['Authorization'] = 'BEARER'
# 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.WebChatApi();
conversation_id = 'conversation_id_example' # str | conversationId
page_size = 25 # int | The number of entries to return per page, or omitted for the default. (optional) (default to 25)
page_number = 1 # int | The page number to return, or omitted for the first page. (optional) (default to 1)
exclude_disconnected_members = False # bool | If true, the results will not contain members who have a DISCONNECTED state. (optional) (default to False)
try:
# Get the members of a chat conversation.
api_response = api_instance.get_webchat_guest_conversation_members(conversation_id, page_size=page_size, page_number=page_number, exclude_disconnected_members=exclude_disconnected_members)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebChatApi->get_webchat_guest_conversation_members: %s\n" % e)``` |
Provide a Python example that uses the DELETE /api/v2/webchat/guest/conversations/{conversationId}/members/{memberId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Remove a member from a chat conversation | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure API key authorization: Guest Chat JWT
PureCloudPlatformClientV2.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# PureCloudPlatformClientV2.configuration.api_key_prefix['Authorization'] = 'BEARER'
# 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.WebChatApi();
conversation_id = 'conversation_id_example' # str | conversationId
member_id = 'member_id_example' # str | memberId
try:
# Remove a member from a chat conversation
api_instance.delete_webchat_guest_conversation_member(conversation_id, member_id)
except ApiException as e:
print("Exception when calling WebChatApi->delete_webchat_guest_conversation_member: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/webchat/guest/conversations/{conversationId}/members/{memberId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get a web chat conversation member | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure API key authorization: Guest Chat JWT
PureCloudPlatformClientV2.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# PureCloudPlatformClientV2.configuration.api_key_prefix['Authorization'] = 'BEARER'
# 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.WebChatApi();
conversation_id = 'conversation_id_example' # str | conversationId
member_id = 'member_id_example' # str | memberId
try:
# Get a web chat conversation member
api_response = api_instance.get_webchat_guest_conversation_member(conversation_id, member_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebChatApi->get_webchat_guest_conversation_member: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/webchat/guest/conversations/{conversationId}/members/{memberId}/messages Genesys Cloud Python SDK. | Genesys describes this as an API used to: Send a message in a chat conversation. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure API key authorization: Guest Chat JWT
PureCloudPlatformClientV2.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# PureCloudPlatformClientV2.configuration.api_key_prefix['Authorization'] = 'BEARER'
# 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.WebChatApi();
conversation_id = 'conversation_id_example' # str | conversationId
member_id = 'member_id_example' # str | memberId
body = PureCloudPlatformClientV2.CreateWebChatMessageRequest() # CreateWebChatMessageRequest | Message
try:
# Send a message in a chat conversation.
api_response = api_instance.post_webchat_guest_conversation_member_messages(conversation_id, member_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebChatApi->post_webchat_guest_conversation_member_messages: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/webchat/guest/conversations/{conversationId}/members/{memberId}/typing Genesys Cloud Python SDK. | Genesys describes this as an API used to: Send a typing-indicator in a chat conversation. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure API key authorization: Guest Chat JWT
PureCloudPlatformClientV2.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# PureCloudPlatformClientV2.configuration.api_key_prefix['Authorization'] = 'BEARER'
# 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.WebChatApi();
conversation_id = 'conversation_id_example' # str | conversationId
member_id = 'member_id_example' # str | memberId
try:
# Send a typing-indicator in a chat conversation.
api_response = api_instance.post_webchat_guest_conversation_member_typing(conversation_id, member_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebChatApi->post_webchat_guest_conversation_member_typing: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/webchat/guest/conversations/{conversationId}/messages Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get the messages of a chat conversation. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure API key authorization: Guest Chat JWT
PureCloudPlatformClientV2.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# PureCloudPlatformClientV2.configuration.api_key_prefix['Authorization'] = 'BEARER'
# 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.WebChatApi();
conversation_id = 'conversation_id_example' # str | conversationId
after = 'after_example' # str | If available, get the messages chronologically after the id of this message (optional)
before = 'before_example' # str | If available, get the messages chronologically before the id of this message (optional)
sort_order = ''ascending'' # str | Sort order (optional) (default to 'ascending')
max_results = 100 # int | Limit the returned number of messages, up to a maximum of 100 (optional) (default to 100)
try:
# Get the messages of a chat conversation.
api_response = api_instance.get_webchat_guest_conversation_messages(conversation_id, after=after, before=before, sort_order=sort_order, max_results=max_results)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebChatApi->get_webchat_guest_conversation_messages: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/webchat/guest/conversations/{conversationId}/messages/{messageId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get a web chat conversation message | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure API key authorization: Guest Chat JWT
PureCloudPlatformClientV2.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# PureCloudPlatformClientV2.configuration.api_key_prefix['Authorization'] = 'BEARER'
# 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.WebChatApi();
conversation_id = 'conversation_id_example' # str | conversationId
message_id = 'message_id_example' # str | messageId
try:
# Get a web chat conversation message
api_response = api_instance.get_webchat_guest_conversation_message(conversation_id, message_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebChatApi->get_webchat_guest_conversation_message: %s\n" % e)``` |
Provide a Python example that uses the DELETE /api/v2/webchat/settings Genesys Cloud Python SDK. | Genesys describes this as an API used to: Remove WebChat deployment 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.WebChatApi();
try:
# Remove WebChat deployment settings
api_instance.delete_webchat_settings()
except ApiException as e:
print("Exception when calling WebChatApi->delete_webchat_settings: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/webchat/settings Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get WebChat deployment 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.WebChatApi();
try:
# Get WebChat deployment settings
api_response = api_instance.get_webchat_settings()
pprint(api_response)
except ApiException as e:
print("Exception when calling WebChatApi->get_webchat_settings: %s\n" % e)``` |
Provide a Python example that uses the PUT /api/v2/webchat/settings Genesys Cloud Python SDK. | Genesys describes this as an API used to: Update WebChat deployment 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.WebChatApi();
body = PureCloudPlatformClientV2.WebChatSettings() # WebChatSettings | webChatSettings
try:
# Update WebChat deployment settings
api_response = api_instance.put_webchat_settings(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebChatApi->put_webchat_settings: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/webmessaging/messages Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get the messages for a web messaging session. | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.WebMessagingApi();
page_size = 25 # int | Page size (optional) (default to 25)
page_number = 1 # int | Page number (optional) (default to 1)
try:
# Get the messages for a web messaging session.
api_response = api_instance.get_webmessaging_messages(page_size=page_size, page_number=page_number)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebMessagingApi->get_webmessaging_messages: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/widgets/deployments Genesys Cloud Python SDK. | Genesys describes this as an API used to: List Widget deployments | ```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.WidgetsApi();
try:
# List Widget deployments
api_response = api_instance.get_widgets_deployments()
pprint(api_response)
except ApiException as e:
print("Exception when calling WidgetsApi->get_widgets_deployments: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/widgets/deployments Genesys Cloud Python SDK. | Genesys describes this as an API used to: Create Widget deployment | ```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.WidgetsApi();
body = PureCloudPlatformClientV2.WidgetDeployment() # WidgetDeployment | Deployment
try:
# Create Widget deployment
api_response = api_instance.post_widgets_deployments(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WidgetsApi->post_widgets_deployments: %s\n" % e)``` |
Provide a Python example that uses the DELETE /api/v2/widgets/deployments/{deploymentId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Delete a Widget deployment | ```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.WidgetsApi();
deployment_id = 'deployment_id_example' # str | Widget Config Id
try:
# Delete a Widget deployment
api_instance.delete_widgets_deployment(deployment_id)
except ApiException as e:
print("Exception when calling WidgetsApi->delete_widgets_deployment: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/widgets/deployments/{deploymentId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get a Widget deployment | ```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.WidgetsApi();
deployment_id = 'deployment_id_example' # str | Widget Config Id
try:
# Get a Widget deployment
api_response = api_instance.get_widgets_deployment(deployment_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WidgetsApi->get_widgets_deployment: %s\n" % e)``` |
Provide a Python example that uses the PUT /api/v2/widgets/deployments/{deploymentId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Update a Widget deployment | ```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.WidgetsApi();
deployment_id = 'deployment_id_example' # str | Widget Config Id
body = PureCloudPlatformClientV2.WidgetDeployment() # WidgetDeployment | Deployment
try:
# Update a Widget deployment
api_response = api_instance.put_widgets_deployment(deployment_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WidgetsApi->put_widgets_deployment: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/adherence Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get a list of UserScheduleAdherence records for the requested users | ```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.WorkforceManagementApi();
user_id = ['user_id_example'] # list[str] | User Id(s) for which to fetch current schedule adherence information. Min 1, Max of 100 userIds per request
try:
# Get a list of UserScheduleAdherence records for the requested users
api_response = api_instance.get_workforcemanagement_adherence(user_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_adherence: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/workforcemanagement/adherence/explanations Genesys Cloud Python SDK. | Genesys describes this as an API used to: Submit an adherence explanation for the current 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.WorkforceManagementApi();
body = PureCloudPlatformClientV2.AddAdherenceExplanationAgentRequest() # AddAdherenceExplanationAgentRequest | The request body
try:
# Submit an adherence explanation for the current user
api_response = api_instance.post_workforcemanagement_adherence_explanations(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->post_workforcemanagement_adherence_explanations: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/adherence/explanations/jobs/{jobId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Query the status of an adherence explanation operation. Only the user who started the operation can query the status. Job details are only retained if the initial request returned a 202 ACCEPTED response | ```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.WorkforceManagementApi();
job_id = 'job_id_example' # str | The ID of the job
try:
# Query the status of an adherence explanation operation. Only the user who started the operation can query the status
api_response = api_instance.get_workforcemanagement_adherence_explanations_job(job_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_adherence_explanations_job: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/workforcemanagement/adherence/explanations/query Genesys Cloud Python SDK. | Genesys describes this as an API used to: Query adherence explanations for the current 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.WorkforceManagementApi();
body = PureCloudPlatformClientV2.AgentQueryAdherenceExplanationsRequest() # AgentQueryAdherenceExplanationsRequest | The request body
force_async = True # bool | Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes (optional)
force_download_service = True # bool | Force the result of this operation to be sent via download service. For testing/app development purposes (optional)
try:
# Query adherence explanations for the current user
api_response = api_instance.post_workforcemanagement_adherence_explanations_query(body, force_async=force_async, force_download_service=force_download_service)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->post_workforcemanagement_adherence_explanations_query: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/adherence/explanations/{explanationId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get an adherence explanation for the current 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.WorkforceManagementApi();
explanation_id = 'explanation_id_example' # str | The ID of the explanation to update
try:
# Get an adherence explanation for the current user
api_response = api_instance.get_workforcemanagement_adherence_explanation(explanation_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_adherence_explanation: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/workforcemanagement/adherence/historical/bulk Genesys Cloud Python SDK. | Genesys describes this as an API used to: Request a historical adherence report in bulk | ```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.WorkforceManagementApi();
body = PureCloudPlatformClientV2.WfmHistoricalAdherenceBulkQuery() # WfmHistoricalAdherenceBulkQuery | body (optional)
try:
# Request a historical adherence report in bulk
api_response = api_instance.post_workforcemanagement_adherence_historical_bulk(body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->post_workforcemanagement_adherence_historical_bulk: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/adherence/historical/bulk/jobs/{jobId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Request to fetch the status of the historical adherence bulk job. Only the user who started the operation can query the status. Job details are only retained if the initial request returned a 202 ACCEPTED response | ```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.WorkforceManagementApi();
job_id = 'job_id_example' # str | ID of the job to get
try:
# Request to fetch the status of the historical adherence bulk job. Only the user who started the operation can query the status
api_response = api_instance.get_workforcemanagement_adherence_historical_bulk_job(job_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_adherence_historical_bulk_job: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/adherence/historical/jobs/{jobId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Query the status of a historical adherence request operation. Only the user who started the operation can query the status. Job details are only retained if the initial request returned a 202 ACCEPTED response | ```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.WorkforceManagementApi();
job_id = 'job_id_example' # str | jobId
try:
# Query the status of a historical adherence request operation. Only the user who started the operation can query the status
api_response = api_instance.get_workforcemanagement_adherence_historical_job(job_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_adherence_historical_job: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/workforcemanagement/agents Genesys Cloud Python SDK. | Genesys describes this as an API used to: Move agents in and out of management unit | ```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.WorkforceManagementApi();
body = PureCloudPlatformClientV2.MoveAgentsRequest() # MoveAgentsRequest | body (optional)
try:
# Move agents in and out of management unit
api_response = api_instance.post_workforcemanagement_agents(body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->post_workforcemanagement_agents: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/workforcemanagement/agents/integrations/hris/query Genesys Cloud Python SDK. | Genesys describes this as an API used to: Query integrations for agents | ```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.WorkforceManagementApi();
body = PureCloudPlatformClientV2.QueryAgentsIntegrationsRequest() # QueryAgentsIntegrationsRequest | body (optional)
try:
# Query integrations for agents
api_response = api_instance.post_workforcemanagement_agents_integrations_hris_query(body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->post_workforcemanagement_agents_integrations_hris_query: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/agents/me/managementunit Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get the management unit to which the currently logged in agent belongs | ```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.WorkforceManagementApi();
try:
# Get the management unit to which the currently logged in agent belongs
api_response = api_instance.get_workforcemanagement_agents_me_managementunit()
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_agents_me_managementunit: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/workforcemanagement/agents/me/possibleworkshifts Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get agent possible work shifts for requested time frame | ```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.WorkforceManagementApi();
body = PureCloudPlatformClientV2.AgentPossibleWorkShiftsRequest() # AgentPossibleWorkShiftsRequest | body
try:
# Get agent possible work shifts for requested time frame
api_response = api_instance.post_workforcemanagement_agents_me_possibleworkshifts(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->post_workforcemanagement_agents_me_possibleworkshifts: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/workforcemanagement/agents/{agentId}/adherence/explanations Genesys Cloud Python SDK. | Genesys describes this as an API used to: Add an adherence explanation for the requested 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.WorkforceManagementApi();
agent_id = 'agent_id_example' # str | The ID of the agent to query
body = PureCloudPlatformClientV2.AddAdherenceExplanationAdminRequest() # AddAdherenceExplanationAdminRequest | The request body
try:
# Add an adherence explanation for the requested user
api_response = api_instance.post_workforcemanagement_agent_adherence_explanations(agent_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->post_workforcemanagement_agent_adherence_explanations: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/workforcemanagement/agents/{agentId}/adherence/explanations/query Genesys Cloud Python SDK. | Genesys describes this as an API used to: Query adherence explanations for the given agent across a specified range | ```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.WorkforceManagementApi();
agent_id = 'agent_id_example' # str | The ID of the agent to query
body = PureCloudPlatformClientV2.AgentQueryAdherenceExplanationsRequest() # AgentQueryAdherenceExplanationsRequest | The request body
force_async = True # bool | Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes (optional)
force_download_service = True # bool | Force the result of this operation to be sent via download service. For testing/app development purposes (optional)
try:
# Query adherence explanations for the given agent across a specified range
api_response = api_instance.post_workforcemanagement_agent_adherence_explanations_query(agent_id, body, force_async=force_async, force_download_service=force_download_service)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->post_workforcemanagement_agent_adherence_explanations_query: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/agents/{agentId}/adherence/explanations/{explanationId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get an adherence explanation | ```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.WorkforceManagementApi();
agent_id = 'agent_id_example' # str | The ID of the agent to query
explanation_id = 'explanation_id_example' # str | The ID of the explanation to update
try:
# Get an adherence explanation
api_response = api_instance.get_workforcemanagement_agent_adherence_explanation(agent_id, explanation_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_agent_adherence_explanation: %s\n" % e)``` |
Provide a Python example that uses the PATCH /api/v2/workforcemanagement/agents/{agentId}/adherence/explanations/{explanationId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Update an adherence explanation | ```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.WorkforceManagementApi();
agent_id = 'agent_id_example' # str | The ID of the agent to query
explanation_id = 'explanation_id_example' # str | The ID of the explanation to update
body = PureCloudPlatformClientV2.UpdateAdherenceExplanationStatusRequest() # UpdateAdherenceExplanationStatusRequest | The request body
try:
# Update an adherence explanation
api_response = api_instance.patch_workforcemanagement_agent_adherence_explanation(agent_id, explanation_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->patch_workforcemanagement_agent_adherence_explanation: %s\n" % e)``` |
Provide a Python example that uses the PUT /api/v2/workforcemanagement/agents/{agentId}/integrations/hris Genesys Cloud Python SDK. | Genesys describes this as an API used to: Update integrations for agent | ```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.WorkforceManagementApi();
agent_id = 'agent_id_example' # str | The ID of the agent
body = PureCloudPlatformClientV2.AgentIntegrationsRequest() # AgentIntegrationsRequest | body
try:
# Update integrations for agent
api_response = api_instance.put_workforcemanagement_agent_integrations_hris(agent_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->put_workforcemanagement_agent_integrations_hris: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/agents/{agentId}/managementunit Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get the management unit to which the agent belongs | ```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.WorkforceManagementApi();
agent_id = 'agent_id_example' # str | The ID of the agent to look up
try:
# Get the management unit to which the agent belongs
api_response = api_instance.get_workforcemanagement_agent_managementunit(agent_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_agent_managementunit: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/workforcemanagement/agentschedules/mine Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get published schedule for the current 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.WorkforceManagementApi();
body = PureCloudPlatformClientV2.BuGetCurrentAgentScheduleRequest() # BuGetCurrentAgentScheduleRequest | body (optional)
try:
# Get published schedule for the current user
api_response = api_instance.post_workforcemanagement_agentschedules_mine(body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->post_workforcemanagement_agentschedules_mine: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/workforcemanagement/alternativeshifts/offers/jobs Genesys Cloud Python SDK. | Genesys describes this as an API used to: Request a list of alternative shift offers for a given schedule | ```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.WorkforceManagementApi();
body = PureCloudPlatformClientV2.AlternativeShiftOffersRequest() # AlternativeShiftOffersRequest | The request body
try:
# Request a list of alternative shift offers for a given schedule
api_response = api_instance.post_workforcemanagement_alternativeshifts_offers_jobs(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->post_workforcemanagement_alternativeshifts_offers_jobs: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/alternativeshifts/offers/jobs/{jobId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Query the status of an alternative shift offers operation. Only the user who started the operation can query the status. Job details are only retained if the initial request returned a 202 ACCEPTED response | ```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.WorkforceManagementApi();
job_id = 'job_id_example' # str | The ID of the job
try:
# Query the status of an alternative shift offers operation. Only the user who started the operation can query the status
api_response = api_instance.get_workforcemanagement_alternativeshifts_offers_job(job_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_alternativeshifts_offers_job: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/workforcemanagement/alternativeshifts/offers/search/jobs Genesys Cloud Python SDK. | Genesys describes this as an API used to: Request a search of alternative shift offers for a given shift | ```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.WorkforceManagementApi();
body = PureCloudPlatformClientV2.AlternativeShiftSearchOffersRequest() # AlternativeShiftSearchOffersRequest | The request body
try:
# Request a search of alternative shift offers for a given shift
api_response = api_instance.post_workforcemanagement_alternativeshifts_offers_search_jobs(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->post_workforcemanagement_alternativeshifts_offers_search_jobs: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/alternativeshifts/offers/search/jobs/{jobId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Query the status of an alternative shift search offers operation. Only the user who started the operation can query the status. Job details are only retained if the initial request returned a 202 ACCEPTED response | ```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.WorkforceManagementApi();
job_id = 'job_id_example' # str | The ID of the job
try:
# Query the status of an alternative shift search offers operation. Only the user who started the operation can query the status
api_response = api_instance.get_workforcemanagement_alternativeshifts_offers_search_job(job_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_alternativeshifts_offers_search_job: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/alternativeshifts/settings Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get alternative shifts settings from the current logged in agent’s business unit | ```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.WorkforceManagementApi();
try:
# Get alternative shifts settings from the current logged in agent’s business unit
api_response = api_instance.get_workforcemanagement_alternativeshifts_settings()
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_alternativeshifts_settings: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/alternativeshifts/trades Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get a list of my alternative shifts trades | ```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.WorkforceManagementApi();
force_async = True # bool | Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes (optional)
try:
# Get a list of my alternative shifts trades
api_response = api_instance.get_workforcemanagement_alternativeshifts_trades(force_async=force_async)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_alternativeshifts_trades: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/workforcemanagement/alternativeshifts/trades Genesys Cloud Python SDK. | Genesys describes this as an API used to: Create my alternative shift trade using an existing offer's jobId | ```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.WorkforceManagementApi();
body = PureCloudPlatformClientV2.CreateAlternativeShiftTradeRequest() # CreateAlternativeShiftTradeRequest | The request body
try:
# Create my alternative shift trade using an existing offer's jobId
api_response = api_instance.post_workforcemanagement_alternativeshifts_trades(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->post_workforcemanagement_alternativeshifts_trades: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/alternativeshifts/trades/jobs/{jobId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Query the status of an alternative shift trades operation. Only the user who started the operation can query the status. Job details are only retained if the initial request returned a 202 ACCEPTED response | ```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.WorkforceManagementApi();
job_id = 'job_id_example' # str | The ID of the job
try:
# Query the status of an alternative shift trades operation. Only the user who started the operation can query the status
api_response = api_instance.get_workforcemanagement_alternativeshifts_trades_job(job_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_alternativeshifts_trades_job: %s\n" % e)``` |
Provide a Python example that uses the PATCH /api/v2/workforcemanagement/alternativeshifts/trades/state/jobs Genesys Cloud Python SDK. | Genesys describes this as an API used to: Bulk update alternative shift trade states | ```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.WorkforceManagementApi();
body = PureCloudPlatformClientV2.AdminBulkUpdateAlternativeShiftTradeStateRequest() # AdminBulkUpdateAlternativeShiftTradeStateRequest | The request body
try:
# Bulk update alternative shift trade states
api_response = api_instance.patch_workforcemanagement_alternativeshifts_trades_state_jobs(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->patch_workforcemanagement_alternativeshifts_trades_state_jobs: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/alternativeshifts/trades/state/jobs/{jobId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Query the status of an alternative shift trade state operation. Only the user who started the operation can query the status. Job details are only retained if the initial request returned a 202 ACCEPTED response | ```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.WorkforceManagementApi();
job_id = 'job_id_example' # str | The ID of the job
try:
# Query the status of an alternative shift trade state operation. Only the user who started the operation can query the status
api_response = api_instance.get_workforcemanagement_alternativeshifts_trades_state_job(job_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_alternativeshifts_trades_state_job: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/alternativeshifts/trades/{tradeId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get my alternative shift trade by trade 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.WorkforceManagementApi();
trade_id = 'trade_id_example' # str | The ID of the alternative shift trade
try:
# Get my alternative shift trade by trade ID
api_response = api_instance.get_workforcemanagement_alternativeshifts_trade(trade_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_alternativeshifts_trade: %s\n" % e)``` |
Provide a Python example that uses the PATCH /api/v2/workforcemanagement/alternativeshifts/trades/{tradeId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Update my alternative shifts trade by trade 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.WorkforceManagementApi();
trade_id = 'trade_id_example' # str | The ID of the alternative shift trade
body = PureCloudPlatformClientV2.AgentUpdateAlternativeShiftTradeRequest() # AgentUpdateAlternativeShiftTradeRequest | body (optional)
try:
# Update my alternative shifts trade by trade ID
api_response = api_instance.patch_workforcemanagement_alternativeshifts_trade(trade_id, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->patch_workforcemanagement_alternativeshifts_trade: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get business units | ```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.WorkforceManagementApi();
feature = 'feature_example' # str | If specified, the list of business units for which the user is authorized to use the requested feature will be returned (optional)
division_id = 'division_id_example' # str | If specified, the list of business units belonging to the specified division will be returned (optional)
try:
# Get business units
api_response = api_instance.get_workforcemanagement_businessunits(feature=feature, division_id=division_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunits: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits Genesys Cloud Python SDK. | Genesys describes this as an API used to: Add a new business unit. It may take a minute or two for a new business unit to be available for api operations | ```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.WorkforceManagementApi();
body = PureCloudPlatformClientV2.CreateBusinessUnitRequest() # CreateBusinessUnitRequest | body (optional)
try:
# Add a new business unit
api_response = api_instance.post_workforcemanagement_businessunits(body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunits: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/divisionviews Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get business units across 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.WorkforceManagementApi();
division_id = ['division_id_example'] # list[str] | The divisionIds to filter by. If omitted, will return business units in all divisions (optional)
try:
# Get business units across divisions
api_response = api_instance.get_workforcemanagement_businessunits_divisionviews(division_id=division_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunits_divisionviews: %s\n" % e)``` |
Provide a Python example that uses the DELETE /api/v2/workforcemanagement/businessunits/{businessUnitId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Delete business unit. A business unit cannot be deleted if it contains one or more management units | ```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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit, or 'mine' for the business unit of the logged-in user.
try:
# Delete business unit
api_instance.delete_workforcemanagement_businessunit(business_unit_id)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->delete_workforcemanagement_businessunit: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get business unit. Expanding "settings" will retrieve all settings. All other expands will retrieve only the requested settings field(s). | ```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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit, or 'mine' for the business unit of the logged-in user.
expand = ['expand_example'] # list[str] | Include to access additional data on the business unit (optional)
try:
# Get business unit
api_response = api_instance.get_workforcemanagement_businessunit(business_unit_id, expand=expand)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit: %s\n" % e)``` |
Provide a Python example that uses the PATCH /api/v2/workforcemanagement/businessunits/{businessUnitId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Update business unit | ```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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit, or 'mine' for the business unit of the logged-in user.
body = PureCloudPlatformClientV2.UpdateBusinessUnitRequest() # UpdateBusinessUnitRequest | body (optional)
try:
# Update business unit
api_response = api_instance.patch_workforcemanagement_businessunit(business_unit_id, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->patch_workforcemanagement_businessunit: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/activitycodes Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get activity codes | ```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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit, or 'mine' for the business unit of the logged-in user.
force_download_service = True # bool | Force the result of this operation to be sent via download service. For testing/app development purposes (optional)
try:
# Get activity codes
api_response = api_instance.get_workforcemanagement_businessunit_activitycodes(business_unit_id, force_download_service=force_download_service)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_activitycodes: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/activitycodes Genesys Cloud Python SDK. | Genesys describes this as an API used to: Create a new activity code | ```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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit, or 'mine' for the business unit of the logged-in user.
body = PureCloudPlatformClientV2.CreateActivityCodeRequest() # CreateActivityCodeRequest | body (optional)
try:
# Create a new activity code
api_response = api_instance.post_workforcemanagement_businessunit_activitycodes(business_unit_id, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_activitycodes: %s\n" % e)``` |
Provide a Python example that uses the DELETE /api/v2/workforcemanagement/businessunits/{businessUnitId}/activitycodes/{activityCodeId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Deletes an activity code | ```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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit, or 'mine' for the business unit of the logged-in user.
activity_code_id = 'activity_code_id_example' # str | The ID of the activity code to delete
try:
# Deletes an activity code
api_instance.delete_workforcemanagement_businessunit_activitycode(business_unit_id, activity_code_id)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->delete_workforcemanagement_businessunit_activitycode: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/activitycodes/{activityCodeId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get an activity code | ```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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit, or 'mine' for the business unit of the logged-in user.
activity_code_id = 'activity_code_id_example' # str | The ID of the activity code to fetch
try:
# Get an activity code
api_response = api_instance.get_workforcemanagement_businessunit_activitycode(business_unit_id, activity_code_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_activitycode: %s\n" % e)``` |
Provide a Python example that uses the PATCH /api/v2/workforcemanagement/businessunits/{businessUnitId}/activitycodes/{activityCodeId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Update an activity code | ```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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit, or 'mine' for the business unit of the logged-in user.
activity_code_id = 'activity_code_id_example' # str | The ID of the activity code to update
body = PureCloudPlatformClientV2.UpdateActivityCodeRequest() # UpdateActivityCodeRequest | body (optional)
try:
# Update an activity code
api_response = api_instance.patch_workforcemanagement_businessunit_activitycode(business_unit_id, activity_code_id, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->patch_workforcemanagement_businessunit_activitycode: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/activityplans Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get activity plans | ```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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit
state = 'state_example' # str | Optionally filter by activity plan state (optional)
try:
# Get activity plans
api_response = api_instance.get_workforcemanagement_businessunit_activityplans(business_unit_id, state=state)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_activityplans: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/activityplans Genesys Cloud Python SDK. | Genesys describes this as an API used to: Create an activity plan | ```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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit
body = PureCloudPlatformClientV2.CreateActivityPlanRequest() # CreateActivityPlanRequest | body
try:
# Create an activity plan
api_response = api_instance.post_workforcemanagement_businessunit_activityplans(business_unit_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_activityplans: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/activityplans/jobs Genesys Cloud Python SDK. | Genesys describes this as an API used to: Gets the latest job for all activity plans in the business unit | ```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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit
try:
# Gets the latest job for all activity plans in the business unit
api_response = api_instance.get_workforcemanagement_businessunit_activityplans_jobs(business_unit_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_activityplans_jobs: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/activityplans/{activityPlanId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get an activity plan | ```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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit
activity_plan_id = 'activity_plan_id_example' # str | The ID of the activity plan to fetch
try:
# Get an activity plan
api_response = api_instance.get_workforcemanagement_businessunit_activityplan(business_unit_id, activity_plan_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_activityplan: %s\n" % e)``` |
Provide a Python example that uses the PATCH /api/v2/workforcemanagement/businessunits/{businessUnitId}/activityplans/{activityPlanId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Update an activity plan. If a job associated with the activity plan is in 'Processing' state the activity plan cannot be updated | ```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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit
activity_plan_id = 'activity_plan_id_example' # str | The ID of the activity plan to update
body = PureCloudPlatformClientV2.UpdateActivityPlanRequest() # UpdateActivityPlanRequest | body
try:
# Update an activity plan
api_response = api_instance.patch_workforcemanagement_businessunit_activityplan(business_unit_id, activity_plan_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->patch_workforcemanagement_businessunit_activityplan: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/activityplans/{activityPlanId}/runs/jobs Genesys Cloud Python SDK. | Genesys describes this as an API used to: Run an activity plan manually. Triggers a job running the activity plan. The activity plan cannot be updated until the job completes | ```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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit
activity_plan_id = 'activity_plan_id_example' # str | The ID of the activity plan to run
try:
# Run an activity plan manually
api_response = api_instance.post_workforcemanagement_businessunit_activityplan_runs_jobs(business_unit_id, activity_plan_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_activityplan_runs_jobs: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/activityplans/{activityPlanId}/runs/jobs/{jobId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Gets an activity plan run job | ```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit
activity_plan_id = 'activity_plan_id_example' # str | The ID of the activity plan associated with the run job
job_id = 'job_id_example' # str | The ID of the activity plan run job
try:
# Gets an activity plan run job
api_response = api_instance.get_workforcemanagement_businessunit_activityplan_runs_job(business_unit_id, activity_plan_id, job_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_activityplan_runs_job: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/adherence/explanations/query Genesys Cloud Python SDK. | Genesys describes this as an API used to: Query adherence explanations across an entire business unit for the requested period | ```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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit
body = PureCloudPlatformClientV2.BuQueryAdherenceExplanationsRequest() # BuQueryAdherenceExplanationsRequest | The request body
force_async = True # bool | Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes (optional)
force_download_service = True # bool | Force the result of this operation to be sent via download service. For testing/app development purposes (optional)
try:
# Query adherence explanations across an entire business unit for the requested period
api_response = api_instance.post_workforcemanagement_businessunit_adherence_explanations_query(business_unit_id, body, force_async=force_async, force_download_service=force_download_service)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_adherence_explanations_query: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/agentschedules/search Genesys Cloud Python SDK. | Genesys describes this as an API used to: Search published schedules | ```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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit
force_async = True # bool | Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes (optional)
force_download_service = True # bool | Force the result of this operation to be sent via download service. For testing/app development purposes (optional)
body = PureCloudPlatformClientV2.BuSearchAgentSchedulesRequest() # BuSearchAgentSchedulesRequest | body (optional)
try:
# Search published schedules
api_response = api_instance.post_workforcemanagement_businessunit_agentschedules_search(business_unit_id, force_async=force_async, force_download_service=force_download_service, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_agentschedules_search: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/alternativeshifts/settings Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get alternative shifts settings for a business unit | ```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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit
try:
# Get alternative shifts settings for a business unit
api_response = api_instance.get_workforcemanagement_businessunit_alternativeshifts_settings(business_unit_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_alternativeshifts_settings: %s\n" % e)``` |
Provide a Python example that uses the PATCH /api/v2/workforcemanagement/businessunits/{businessUnitId}/alternativeshifts/settings Genesys Cloud Python SDK. | Genesys describes this as an API used to: Update alternative shifts settings for a business unit | ```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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit
body = PureCloudPlatformClientV2.UpdateAlternativeShiftBuSettingsRequest() # UpdateAlternativeShiftBuSettingsRequest | body (optional)
try:
# Update alternative shifts settings for a business unit
api_response = api_instance.patch_workforcemanagement_businessunit_alternativeshifts_settings(business_unit_id, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->patch_workforcemanagement_businessunit_alternativeshifts_settings: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/alternativeshifts/trades/search Genesys Cloud Python SDK. | Genesys describes this as an API used to: List alternative shifts trades for a given management unit or agent | ```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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit
body = PureCloudPlatformClientV2.SearchAlternativeShiftTradesRequest() # SearchAlternativeShiftTradesRequest | The request body
force_async = True # bool | Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes (optional)
try:
# List alternative shifts trades for a given management unit or agent
api_response = api_instance.post_workforcemanagement_businessunit_alternativeshifts_trades_search(business_unit_id, body, force_async=force_async)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_alternativeshifts_trades_search: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/alternativeshifts/trades/search/jobs/{jobId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Query the status of an alternative shift search trade operation. Only the user who started the operation can query the status. Job details are only retained if the initial request returned a 202 ACCEPTED response | ```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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit
job_id = 'job_id_example' # str | The ID of the job
try:
# Query the status of an alternative shift search trade operation. Only the user who started the operation can query the status
api_response = api_instance.get_workforcemanagement_businessunit_alternativeshifts_trades_search_job(business_unit_id, job_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_alternativeshifts_trades_search_job: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/alternativeshifts/trades/{tradeId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get an alternative shifts trade in a business unit for a given trade 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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit
trade_id = 'trade_id_example' # str | The ID of the alternative shift trade
try:
# Get an alternative shifts trade in a business unit for a given trade ID
api_response = api_instance.get_workforcemanagement_businessunit_alternativeshifts_trade(business_unit_id, trade_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_alternativeshifts_trade: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/intraday Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get intraday data for the given date for the requested planningGroupIds | ```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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit
force_async = True # bool | Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes (optional)
body = PureCloudPlatformClientV2.IntradayPlanningGroupRequest() # IntradayPlanningGroupRequest | body (optional)
try:
# Get intraday data for the given date for the requested planningGroupIds
api_response = api_instance.post_workforcemanagement_businessunit_intraday(business_unit_id, force_async=force_async, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_intraday: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/intraday/planninggroups Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get intraday planning groups for the given date | ```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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit
date = '2013-10-20' # date | yyyy-MM-dd date string interpreted in the configured business unit time zone. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
try:
# Get intraday planning groups for the given date
api_response = api_instance.get_workforcemanagement_businessunit_intraday_planninggroups(business_unit_id, date)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_intraday_planninggroups: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/managementunits Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get all authorized management units in the business unit | ```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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit, or 'mine' for the business unit of the logged-in user.
feature = 'feature_example' # str | If specified, the list of management units for which the user is authorized to use the requested feature will be returned (optional)
division_id = 'division_id_example' # str | If specified, the list of management units belonging to the specified division will be returned (optional)
try:
# Get all authorized management units in the business unit
api_response = api_instance.get_workforcemanagement_businessunit_managementunits(business_unit_id, feature=feature, division_id=division_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_managementunits: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/planninggroups Genesys Cloud Python SDK. | Genesys describes this as an API used to: Gets list of planning groups | ```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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit.
try:
# Gets list of planning groups
api_response = api_instance.get_workforcemanagement_businessunit_planninggroups(business_unit_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_planninggroups: %s\n" % e)``` |
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/planninggroups Genesys Cloud Python SDK. | Genesys describes this as an API used to: Adds a new planning 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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit.
body = PureCloudPlatformClientV2.CreatePlanningGroupRequest() # CreatePlanningGroupRequest | body (optional)
try:
# Adds a new planning group
api_response = api_instance.post_workforcemanagement_businessunit_planninggroups(business_unit_id, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_planninggroups: %s\n" % e)``` |
Provide a Python example that uses the DELETE /api/v2/workforcemanagement/businessunits/{businessUnitId}/planninggroups/{planningGroupId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Deletes the planning 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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit.
planning_group_id = 'planning_group_id_example' # str | The ID of a planning group to delete
try:
# Deletes the planning group
api_instance.delete_workforcemanagement_businessunit_planninggroup(business_unit_id, planning_group_id)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->delete_workforcemanagement_businessunit_planninggroup: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/planninggroups/{planningGroupId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get a planning 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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit.
planning_group_id = 'planning_group_id_example' # str | The ID of a planning group to fetch
try:
# Get a planning group
api_response = api_instance.get_workforcemanagement_businessunit_planninggroup(business_unit_id, planning_group_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_planninggroup: %s\n" % e)``` |
Provide a Python example that uses the PATCH /api/v2/workforcemanagement/businessunits/{businessUnitId}/planninggroups/{planningGroupId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Updates the planning 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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit.
planning_group_id = 'planning_group_id_example' # str | The ID of a planning group to update
body = PureCloudPlatformClientV2.UpdatePlanningGroupRequest() # UpdatePlanningGroupRequest | body (optional)
try:
# Updates the planning group
api_response = api_instance.patch_workforcemanagement_businessunit_planninggroup(business_unit_id, planning_group_id, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->patch_workforcemanagement_businessunit_planninggroup: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/scheduling/runs Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get the list of scheduling runs | ```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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit
try:
# Get the list of scheduling runs
api_response = api_instance.get_workforcemanagement_businessunit_scheduling_runs(business_unit_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_scheduling_runs: %s\n" % e)``` |
Provide a Python example that uses the DELETE /api/v2/workforcemanagement/businessunits/{businessUnitId}/scheduling/runs/{runId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Cancel a scheduling run | ```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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit
run_id = 'run_id_example' # str | The ID of the schedule run
try:
# Cancel a scheduling run
api_instance.delete_workforcemanagement_businessunit_scheduling_run(business_unit_id, run_id)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->delete_workforcemanagement_businessunit_scheduling_run: %s\n" % e)``` |
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/scheduling/runs/{runId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Get a scheduling run | ```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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit
run_id = 'run_id_example' # str | The ID of the schedule run
try:
# Get a scheduling run
api_response = api_instance.get_workforcemanagement_businessunit_scheduling_run(business_unit_id, run_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_scheduling_run: %s\n" % e)``` |
Provide a Python example that uses the PATCH /api/v2/workforcemanagement/businessunits/{businessUnitId}/scheduling/runs/{runId} Genesys Cloud Python SDK. | Genesys describes this as an API used to: Mark a schedule run as applied | ```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.WorkforceManagementApi();
business_unit_id = 'business_unit_id_example' # str | The ID of the business unit
run_id = 'run_id_example' # str | The ID of the schedule run
body = PureCloudPlatformClientV2.PatchBuScheduleRunRequest() # PatchBuScheduleRunRequest | body (optional)
try:
# Mark a schedule run as applied
api_instance.patch_workforcemanagement_businessunit_scheduling_run(business_unit_id, run_id, body=body)
except ApiException as e:
print("Exception when calling WorkforceManagementApi->patch_workforcemanagement_businessunit_scheduling_run: %s\n" % e)``` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.