Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump certifi from 2022.12.7 to 2024.7.4 in /export-data-from-genesys #579

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions ccai-insights-sample-data/generate-call-logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ def generate_log():
},
{
"start_timestamp_usec": timestamp + response_delay * 4,
"text": "Can you give me more details about the problem with your {0}?".format(device),
"text": "Can you give me more details about the problem with your {0}?".format(
device
),
"role": "AGENT",
"user_id": 2,
},
Expand All @@ -133,7 +135,9 @@ def generate_log():
},
{
"start_timestamp_usec": timestamp + response_delay * 6,
"text": "And what is the status shown in the settings on the {0}?".format(device),
"text": "And what is the status shown in the settings on the {0}?".format(
device
),
"role": "AGENT",
"user_id": 2,
},
Expand Down
32 changes: 18 additions & 14 deletions export-data-from-genesys/genesys.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,25 @@
import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException

print('-------------------------------------------------------------')
print('- Execute Bulk Action on recordings-')
print('-------------------------------------------------------------')
print("-------------------------------------------------------------")
print("- Execute Bulk Action on recordings-")
print("-------------------------------------------------------------")

# Credentials for the aws bucket
CLIENT_ID = ''
CLIENT_SECRET = ''
ORG_REGION = ''
CLIENT_ID = ""
CLIENT_SECRET = ""
ORG_REGION = ""

# Set environment
region = PureCloudPlatformClientV2.PureCloudRegionHosts[ORG_REGION]
PureCloudPlatformClientV2.configuration.host = region.get_api_host()

# OAuth when using Client Credentials
api_client = PureCloudPlatformClientV2.api_client.ApiClient() \
.get_client_credentials_token(CLIENT_ID, CLIENT_SECRET)
api_client = (
PureCloudPlatformClientV2.api_client.ApiClient().get_client_credentials_token(
CLIENT_ID, CLIENT_SECRET
)
)


# Get the api
Expand All @@ -36,7 +39,7 @@
query.conversation_query = {
"interval": "2023-12-01T00:00:00.000Z/2024-01-07T00:00:00.000Z",
"order": "asc",
"orderBy": "conversationStart"
"orderBy": "conversationStart",
}
print(query)
try:
Expand All @@ -55,7 +58,7 @@
try:
get_recording_job_response = recording_api.get_recording_job(job_id)
job_state = get_recording_job_response.state
if job_state != 'PENDING':
if job_state != "PENDING":
break
else:
print("Job state PENDING...")
Expand All @@ -65,9 +68,11 @@
sys.exit()


if job_state == 'READY':
if job_state == "READY":
try:
execute_job_response = recording_api.put_recording_job(job_id, {"state": "PROCESSING"})
execute_job_response = recording_api.put_recording_job(
job_id, {"state": "PROCESSING"}
)
job_state = execute_job_response.state
print(f"Successfully execute recording bulk job { execute_job_response}")
except ApiException as e:
Expand All @@ -79,7 +84,7 @@

# Call delete_recording_job api
# Can be canceled also in READY and PENDING states
if job_state == 'PROCESSING':
if job_state == "PROCESSING":
try:
cancel_job_response = recording_api.delete_recording_job(job_id)
print(f"Successfully cancelled recording bulk job { cancel_job_response}")
Expand All @@ -101,4 +106,3 @@
except ApiException as e:
print(f"Exception when calling RecordingApi->get_recording_jobs: { e }")
sys.exit()

2 changes: 1 addition & 1 deletion export-data-from-genesys/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
attrs==22.2.0
blinker==1.5
cachetools==5.2.1
certifi==2022.12.7
certifi==2024.7.4
charset-normalizer==2.1.1
click==8.1.3
commonmark==0.9.1
Expand Down
Loading