Skip to content
Open
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
22 changes: 11 additions & 11 deletions Open-Connectors/Connectors/zendesk_v2/zendesk_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,28 +204,28 @@ def post_authomize_data(url, data):
logging.error("Data causing the issue: %s", batch) # Add this line to log the problematic data

# Post user_dicts and write to file for troubleshooting
with open('/app/zendesk_v2/accounts.json', 'w') as file:
file.write(json.dumps(account_data))
# with open('/app/zendesk_v2/accounts.json', 'w') as file:
# file.write(json.dumps(account_data))
post_authomize_data(accounts_url, account_data)

# Post role_dicts and write to file for troubleshooting
with open('/app/zendesk_v2/groups.json', 'w') as file:
file.write(json.dumps(groups_data))
# with open('/app/zendesk_v2/groups.json', 'w') as file:
# file.write(json.dumps(groups_data))
post_authomize_data(grouping_url, groups_data)

# Post use to role and write to file for troubleshooting
with open('/app/zendesk_v2/account_to_group.json', 'w') as file:
file.write(json.dumps(account_to_group_data))
# with open('/app/zendesk_v2/account_to_group.json', 'w') as file:
# file.write(json.dumps(account_to_group_data))
post_authomize_data(accounts_to_groups_url, account_to_group_data)

# Post privilege_dict and write to file for troubleshooting
with open('/app/zendesk_v2/privileges.json', 'w') as file:
file.write(json.dumps(privileges_data))
# with open('/app/zendesk_v2/privileges.json', 'w') as file:
# file.write(json.dumps(privileges_data))
post_authomize_data(privileges_url, privileges_data)

# Post role_association_dict and write to file for troubleshooting
with open('/app/zendesk_v2/permissions.json', 'w') as file:
file.write(json.dumps(permissions_data))
# with open('/app/zendesk_v2/permissions.json', 'w') as file:
# file.write(json.dumps(permissions_data))
post_authomize_data(permission_url, permissions_data)

# extract first Accepted_timestamps of a list of timestamp strings
Expand All @@ -237,4 +237,4 @@ def post_authomize_data(url, data):
# Send the DELETE request using the first user's timestamp
delete_url = f'https://api.authomize.com/v2/apps/{appId}/data?modifiedBefore={timestamp}'
delete_response = requests.delete(delete_url, headers=authomize_headers)
logging.info("Authomize Delete Response for: %s: %s", delete_url, delete_response.text)
logging.info("Authomize Delete Response for: %s: %s", delete_url, delete_response.text)