instruction
stringlengths
81
221
input
stringlengths
50
1.19k
output
stringlengths
525
3.61k
Provide a Python example that uses the PATCH /api/v2/taskmanagement/workitems/{workitemId}/users/me/wrapups Genesys Cloud Python SDK.
Genesys describes this as an API used to: Add/Remove a wrapup code for the current user in a workitem.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TaskManagementApi(); workitem_id = 'workitem_id_example' # str | The ID of the Workitem. body = PureCloudPlatformClientV2.WorkitemWrapupUpdate() # WorkitemWrapupUpdate | Request body to add/remove the wrapup code for workitem try: # Add/Remove a wrapup code for the current user in a workitem. api_response = api_instance.patch_taskmanagement_workitem_users_me_wrapups(workitem_id, body) pprint(api_response) except ApiException as e: print("Exception when calling TaskManagementApi->patch_taskmanagement_workitem_users_me_wrapups: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/taskmanagement/workitems/{workitemId}/users/{userId}/wrapups Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get all wrapup codes added for the given user for a workitem.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TaskManagementApi(); workitem_id = 'workitem_id_example' # str | The ID of the Workitem. user_id = 'user_id_example' # str | The ID of the user expands = 'expands_example' # str | Which fields, if any, to expand. (optional) after = 'after_example' # str | The cursor that points to the end of the set of entities that has been returned. (optional) page_size = 25 # int | Limit the number of entities to return. It is not guaranteed that the requested number of entities will be filled in a single request. If an `after` key is returned as part of the response it is possible that more entities that match the filter criteria exist. Maximum of 50. (optional) (default to 25) sort_order = ''descending'' # str | Ascending or descending sort order (optional) (default to 'descending') try: # Get all wrapup codes added for the given user for a workitem. api_response = api_instance.get_taskmanagement_workitem_user_wrapups(workitem_id, user_id, expands=expands, after=after, page_size=page_size, sort_order=sort_order) pprint(api_response) except ApiException as e: print("Exception when calling TaskManagementApi->get_taskmanagement_workitem_user_wrapups: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/taskmanagement/workitems/{workitemId}/users/{userId}/wrapups Genesys Cloud Python SDK.
Genesys describes this as an API used to: Add/Remove a wrapup code for a given user in a workitem.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TaskManagementApi(); workitem_id = 'workitem_id_example' # str | The ID of the Workitem. user_id = 'user_id_example' # str | The ID of the user body = PureCloudPlatformClientV2.WorkitemWrapupUpdate() # WorkitemWrapupUpdate | Request body to add/remove a wrapup code for a workitem try: # Add/Remove a wrapup code for a given user in a workitem. api_response = api_instance.patch_taskmanagement_workitem_user_wrapups(workitem_id, user_id, body) pprint(api_response) except ApiException as e: print("Exception when calling TaskManagementApi->patch_taskmanagement_workitem_user_wrapups: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/taskmanagement/workitems/{workitemId}/wrapups Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get all wrapup codes added for all users for a workitem.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TaskManagementApi(); workitem_id = 'workitem_id_example' # str | The ID of the Workitem. expands = 'expands_example' # str | Which fields, if any, to expand. (optional) after = 'after_example' # str | The cursor that points to the end of the set of entities that has been returned. (optional) page_size = 25 # int | Limit the number of entities to return. It is not guaranteed that the requested number of entities will be filled in a single request. If an `after` key is returned as part of the response it is possible that more entities that match the filter criteria exist. Maximum of 50. (optional) (default to 25) sort_order = ''descending'' # str | Ascending or descending sort order (optional) (default to 'descending') try: # Get all wrapup codes added for all users for a workitem. api_response = api_instance.get_taskmanagement_workitem_wrapups(workitem_id, expands=expands, after=after, page_size=page_size, sort_order=sort_order) pprint(api_response) except ApiException as e: print("Exception when calling TaskManagementApi->get_taskmanagement_workitem_wrapups: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/taskmanagement/worktypes Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create a worktype
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TaskManagementApi(); body = PureCloudPlatformClientV2.WorktypeCreate() # WorktypeCreate | Worktype try: # Create a worktype api_response = api_instance.post_taskmanagement_worktypes(body) pprint(api_response) except ApiException as e: print("Exception when calling TaskManagementApi->post_taskmanagement_worktypes: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/taskmanagement/worktypes/query Genesys Cloud Python SDK.
Genesys describes this as an API used to: Query for worktypes
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TaskManagementApi(); body = PureCloudPlatformClientV2.WorktypeQueryRequest() # WorktypeQueryRequest | QueryPostRequest try: # Query for worktypes api_response = api_instance.post_taskmanagement_worktypes_query(body) pprint(api_response) except ApiException as e: print("Exception when calling TaskManagementApi->post_taskmanagement_worktypes_query: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/taskmanagement/worktypes/{worktypeId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete a worktype
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TaskManagementApi(); worktype_id = 'worktype_id_example' # str | Worktype id try: # Delete a worktype api_instance.delete_taskmanagement_worktype(worktype_id) except ApiException as e: print("Exception when calling TaskManagementApi->delete_taskmanagement_worktype: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/taskmanagement/worktypes/{worktypeId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a worktype
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TaskManagementApi(); worktype_id = 'worktype_id_example' # str | Worktype id expands = ['expands_example'] # list[str] | Which fields, if any, to expand. (optional) try: # Get a worktype api_response = api_instance.get_taskmanagement_worktype(worktype_id, expands=expands) pprint(api_response) except ApiException as e: print("Exception when calling TaskManagementApi->get_taskmanagement_worktype: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/taskmanagement/worktypes/{worktypeId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update the attributes of a worktype
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TaskManagementApi(); worktype_id = 'worktype_id_example' # str | Worktype id body = PureCloudPlatformClientV2.WorktypeUpdate() # WorktypeUpdate | Worktype try: # Update the attributes of a worktype api_response = api_instance.patch_taskmanagement_worktype(worktype_id, body) pprint(api_response) except ApiException as e: print("Exception when calling TaskManagementApi->patch_taskmanagement_worktype: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/taskmanagement/worktypes/{worktypeId}/statuses Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get list of statuses for this worktype.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TaskManagementApi(); worktype_id = 'worktype_id_example' # str | Worktype id try: # Get list of statuses for this worktype. api_response = api_instance.get_taskmanagement_worktype_statuses(worktype_id) pprint(api_response) except ApiException as e: print("Exception when calling TaskManagementApi->get_taskmanagement_worktype_statuses: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/taskmanagement/worktypes/{worktypeId}/statuses Genesys Cloud Python SDK.
Genesys describes this as an API used to: Add a status to a worktype
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TaskManagementApi(); worktype_id = 'worktype_id_example' # str | Worktype id body = PureCloudPlatformClientV2.WorkitemStatusCreate() # WorkitemStatusCreate | Status try: # Add a status to a worktype api_response = api_instance.post_taskmanagement_worktype_statuses(worktype_id, body) pprint(api_response) except ApiException as e: print("Exception when calling TaskManagementApi->post_taskmanagement_worktype_statuses: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/taskmanagement/worktypes/{worktypeId}/statuses/{statusId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete a status
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TaskManagementApi(); worktype_id = 'worktype_id_example' # str | Worktype id status_id = 'status_id_example' # str | Status id try: # Delete a status api_instance.delete_taskmanagement_worktype_status(worktype_id, status_id) except ApiException as e: print("Exception when calling TaskManagementApi->delete_taskmanagement_worktype_status: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/taskmanagement/worktypes/{worktypeId}/statuses/{statusId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a status
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TaskManagementApi(); worktype_id = 'worktype_id_example' # str | Worktype id status_id = 'status_id_example' # str | Status id try: # Get a status api_response = api_instance.get_taskmanagement_worktype_status(worktype_id, status_id) pprint(api_response) except ApiException as e: print("Exception when calling TaskManagementApi->get_taskmanagement_worktype_status: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/taskmanagement/worktypes/{worktypeId}/statuses/{statusId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update the attributes of a status
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TaskManagementApi(); worktype_id = 'worktype_id_example' # str | Worktype id status_id = 'status_id_example' # str | Status id body = PureCloudPlatformClientV2.WorkitemStatusUpdate() # WorkitemStatusUpdate | Status try: # Update the attributes of a status api_response = api_instance.patch_taskmanagement_worktype_status(worktype_id, status_id, body) pprint(api_response) except ApiException as e: print("Exception when calling TaskManagementApi->patch_taskmanagement_worktype_status: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/analytics/teams/activity/query Genesys Cloud Python SDK.
Genesys describes this as an API used to: Query for team activity observations
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TeamsApi(); body = PureCloudPlatformClientV2.TeamActivityQuery() # TeamActivityQuery | query page_size = 56 # int | The desired page size (optional) page_number = 56 # int | The desired page number (optional) try: # Query for team activity observations api_response = api_instance.post_analytics_teams_activity_query(body, page_size=page_size, page_number=page_number) pprint(api_response) except ApiException as e: print("Exception when calling TeamsApi->post_analytics_teams_activity_query: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/teams Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get Team listing
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TeamsApi(); page_size = 25 # int | Page size (optional) (default to 25) name = 'name_example' # str | Return only teams whose names start with this value (case-insensitive matching) (optional) after = 'after_example' # str | The cursor that points to the next item in the complete list of teams (optional) before = 'before_example' # str | The cursor that points to the previous item in the complete list of teams (optional) expand = 'expand_example' # str | Expand the name on each user (optional) try: # Get Team listing api_response = api_instance.get_teams(page_size=page_size, name=name, after=after, before=before, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling TeamsApi->get_teams: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/teams Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create a team
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TeamsApi(); body = PureCloudPlatformClientV2.Team() # Team | Team try: # Create a team api_response = api_instance.post_teams(body) pprint(api_response) except ApiException as e: print("Exception when calling TeamsApi->post_teams: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/teams/search Genesys Cloud Python SDK.
Genesys describes this as an API used to: Search resources.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TeamsApi(); body = PureCloudPlatformClientV2.TeamSearchRequest() # TeamSearchRequest | Search request options try: # Search resources. api_response = api_instance.post_teams_search(body) pprint(api_response) except ApiException as e: print("Exception when calling TeamsApi->post_teams_search: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/teams/{teamId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete team
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TeamsApi(); team_id = 'team_id_example' # str | Team ID try: # Delete team api_instance.delete_team(team_id) except ApiException as e: print("Exception when calling TeamsApi->delete_team: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/teams/{teamId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get team
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TeamsApi(); team_id = 'team_id_example' # str | Team ID try: # Get team api_response = api_instance.get_team(team_id) pprint(api_response) except ApiException as e: print("Exception when calling TeamsApi->get_team: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/teams/{teamId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update team
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TeamsApi(); team_id = 'team_id_example' # str | Team ID body = PureCloudPlatformClientV2.Team() # Team | Team try: # Update team api_response = api_instance.patch_team(team_id, body) pprint(api_response) except ApiException as e: print("Exception when calling TeamsApi->patch_team: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/teams/{teamId}/members Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete team members
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TeamsApi(); team_id = 'team_id_example' # str | Team ID id = 'id_example' # str | Comma separated list of member ids to remove try: # Delete team members api_instance.delete_team_members(team_id, id) except ApiException as e: print("Exception when calling TeamsApi->delete_team_members: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/teams/{teamId}/members Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get team membership
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TeamsApi(); team_id = 'team_id_example' # str | Team ID page_size = 25 # int | Page size (optional) (default to 25) before = 'before_example' # str | The cursor that points to the previous item in the complete list of teams (optional) after = 'after_example' # str | The cursor that points to the next item in the complete list of teams (optional) expand = 'expand_example' # str | Expand the name on each user (optional) try: # Get team membership api_response = api_instance.get_team_members(team_id, page_size=page_size, before=before, after=after, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling TeamsApi->get_team_members: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/teams/{teamId}/members Genesys Cloud Python SDK.
Genesys describes this as an API used to: Add team members
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TeamsApi(); team_id = 'team_id_example' # str | Team ID body = PureCloudPlatformClientV2.TeamMembers() # TeamMembers | TeamMembers try: # Add team members api_response = api_instance.post_team_members(team_id, body) pprint(api_response) except ApiException as e: print("Exception when calling TeamsApi->post_team_members: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/mediaregions Genesys Cloud Python SDK.
Genesys describes this as an API used to: Retrieve the list of AWS regions media can stream through.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyApi(); try: # Retrieve the list of AWS regions media can stream through. api_response = api_instance.get_telephony_mediaregions() pprint(api_response) except ApiException as e: print("Exception when calling TelephonyApi->get_telephony_mediaregions: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/sipmessages/conversations/{conversationId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a SIP message. Get the raw form of the SIP message
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyApi(); conversation_id = 'conversation_id_example' # str | Conversation id try: # Get a SIP message. api_response = api_instance.get_telephony_sipmessages_conversation(conversation_id) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyApi->get_telephony_sipmessages_conversation: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/sipmessages/conversations/{conversationId}/headers Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get SIP headers. Get parsed SIP headers. Returns specific headers if key query parameters are added.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyApi(); conversation_id = 'conversation_id_example' # str | Conversation id keys = ['keys_example'] # list[str] | comma-separated list of header identifiers to query. e.g. ruri,to,from (optional) try: # Get SIP headers. api_response = api_instance.get_telephony_sipmessages_conversation_headers(conversation_id, keys=keys) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyApi->get_telephony_sipmessages_conversation_headers: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/siptraces Genesys Cloud Python SDK.
Genesys describes this as an API used to: Fetch SIP metadata. Fetch SIP metadata that matches a given parameter. If exactMatch is passed as a parameter only sip records that have exactly that value will be returned. For example, some records contain conversationId but not all relevant records for that call may contain the conversationId so only a partial view of the call will be reflected
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyApi(); date_start = '2013-10-20T19:20:30+01:00' # datetime | Start date of the search. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss[.mmm]Z date_end = '2013-10-20T19:20:30+01:00' # datetime | End date of the search. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss[.mmm]Z call_id = 'call_id_example' # str | unique identification of the placed call (optional) to_user = 'to_user_example' # str | User to who the call was placed (optional) from_user = 'from_user_example' # str | user who placed the call (optional) conversation_id = 'conversation_id_example' # str | Unique identification of the conversation (optional) try: # Fetch SIP metadata api_response = api_instance.get_telephony_siptraces(date_start, date_end, call_id=call_id, to_user=to_user, from_user=from_user, conversation_id=conversation_id) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyApi->get_telephony_siptraces: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/telephony/siptraces/download Genesys Cloud Python SDK.
Genesys describes this as an API used to: Request a download of a pcap file to S3
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyApi(); sip_search_public_request = PureCloudPlatformClientV2.SIPSearchPublicRequest() # SIPSearchPublicRequest | try: # Request a download of a pcap file to S3 api_response = api_instance.post_telephony_siptraces_download(sip_search_public_request) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyApi->post_telephony_siptraces_download: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/siptraces/download/{downloadId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get signed S3 URL for a pcap download
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyApi(); download_id = 'download_id_example' # str | unique id for the downloaded file in S3 try: # Get signed S3 URL for a pcap download api_response = api_instance.get_telephony_siptraces_download_download_id(download_id) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyApi->get_telephony_siptraces_download_download_id: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the list of edges.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) name = 'name_example' # str | Name (optional) site_id = 'site_id_example' # str | Filter by site.id (optional) edge_group_id = 'edge_group_id_example' # str | Filter by edgeGroup.id (optional) sort_by = ''name'' # str | Sort by (optional) (default to 'name') managed = True # bool | Filter by managed (optional) show_cloud_media = True # bool | True to show the cloud media devices in the result. (optional) (default to True) try: # Get the list of edges. api_response = api_instance.get_telephony_providers_edges(page_size=page_size, page_number=page_number, name=name, site_id=site_id, edge_group_id=edge_group_id, sort_by=sort_by, managed=managed, show_cloud_media=show_cloud_media) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/telephony/providers/edges Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create an edge.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); body = PureCloudPlatformClientV2.Edge() # Edge | Edge try: # Create an edge. api_response = api_instance.post_telephony_providers_edges(body) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->post_telephony_providers_edges: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/telephony/providers/edges/addressvalidation Genesys Cloud Python SDK.
Genesys describes this as an API used to: Validates a street address
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); body = PureCloudPlatformClientV2.ValidateAddressRequest() # ValidateAddressRequest | Address try: # Validates a street address api_response = api_instance.post_telephony_providers_edges_addressvalidation(body) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->post_telephony_providers_edges_addressvalidation: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/telephony/providers/edges/alertablepresences Genesys Cloud Python SDK.
Genesys describes this as an API used to: Deletes alertable presences overrides.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); try: # Deletes alertable presences overrides. api_instance.delete_telephony_providers_edges_alertablepresences() except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->delete_telephony_providers_edges_alertablepresences: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/alertablepresences Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the list alertable presences. The 'type' query parameter can be used to If there are any overrides, this is the list of overrides; if there are no overrides, it is the default list.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); type = 'type_example' # str | (optional) try: # Get the list alertable presences. The 'type' query parameter can be used to If there are any overrides, this is the list of overrides; if there are no overrides, it is the default list. api_response = api_instance.get_telephony_providers_edges_alertablepresences(type=type) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_alertablepresences: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/telephony/providers/edges/alertablepresences Genesys Cloud Python SDK.
Genesys describes this as an API used to: Creates or updates alertable presences overrides.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); body = PureCloudPlatformClientV2.AlertablePresences() # AlertablePresences | Alertable Presences Overrides try: # Creates or updates alertable presences overrides. api_instance.put_telephony_providers_edges_alertablepresences(body) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->put_telephony_providers_edges_alertablepresences: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/certificateauthorities Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the list of certificate authorities.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); try: # Get the list of certificate authorities. api_response = api_instance.get_telephony_providers_edges_certificateauthorities() pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_certificateauthorities: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/telephony/providers/edges/certificateauthorities Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create a certificate authority.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); body = PureCloudPlatformClientV2.DomainCertificateAuthority() # DomainCertificateAuthority | CertificateAuthority try: # Create a certificate authority. api_response = api_instance.post_telephony_providers_edges_certificateauthorities(body) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->post_telephony_providers_edges_certificateauthorities: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/telephony/providers/edges/certificateauthorities/{certificateId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete a certificate authority.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); certificate_id = 'certificate_id_example' # str | Certificate ID try: # Delete a certificate authority. api_instance.delete_telephony_providers_edges_certificateauthority(certificate_id) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->delete_telephony_providers_edges_certificateauthority: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/certificateauthorities/{certificateId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a certificate authority.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); certificate_id = 'certificate_id_example' # str | Certificate ID try: # Get a certificate authority. api_response = api_instance.get_telephony_providers_edges_certificateauthority(certificate_id) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_certificateauthority: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/telephony/providers/edges/certificateauthorities/{certificateId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a certificate authority.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); certificate_id = 'certificate_id_example' # str | Certificate ID body = PureCloudPlatformClientV2.DomainCertificateAuthority() # DomainCertificateAuthority | Certificate authority try: # Update a certificate authority. api_response = api_instance.put_telephony_providers_edges_certificateauthority(certificate_id, body) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->put_telephony_providers_edges_certificateauthority: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/didpools Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a listing of DID Pools
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) sort_by = ''number'' # str | Sort by (optional) (default to 'number') id = ['id_example'] # list[str] | Filter by a specific list of ID's (optional) try: # Get a listing of DID Pools api_response = api_instance.get_telephony_providers_edges_didpools(page_size=page_size, page_number=page_number, sort_by=sort_by, id=id) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_didpools: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/telephony/providers/edges/didpools Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create a new DID pool
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); body = PureCloudPlatformClientV2.DIDPool() # DIDPool | DID pool try: # Create a new DID pool api_response = api_instance.post_telephony_providers_edges_didpools(body) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->post_telephony_providers_edges_didpools: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/didpools/dids Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a listing of unassigned and/or assigned numbers in a set of DID Pools.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); type = 'type_example' # str | The type of numbers to return. id = ['id_example'] # list[str] | Filter by a specific list of DID Pools. If this is not provided, numbers from all DID Pools will be returned. (optional) number_match = 'number_match_example' # str | A number to filter the results by. (optional) page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) sort_order = ''ascending'' # str | Sort order (optional) (default to 'ascending') try: # Get a listing of unassigned and/or assigned numbers in a set of DID Pools. api_response = api_instance.get_telephony_providers_edges_didpools_dids(type, id=id, number_match=number_match, page_size=page_size, page_number=page_number, sort_order=sort_order) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_didpools_dids: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/telephony/providers/edges/didpools/{didPoolId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete a DID Pool by ID.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); did_pool_id = 'did_pool_id_example' # str | DID pool ID try: # Delete a DID Pool by ID. api_instance.delete_telephony_providers_edges_didpool(did_pool_id) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->delete_telephony_providers_edges_didpool: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/didpools/{didPoolId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a DID Pool by ID.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); did_pool_id = 'did_pool_id_example' # str | DID pool ID try: # Get a DID Pool by ID. api_response = api_instance.get_telephony_providers_edges_didpool(did_pool_id) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_didpool: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/telephony/providers/edges/didpools/{didPoolId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a DID Pool by ID.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); did_pool_id = 'did_pool_id_example' # str | DID pool ID body = PureCloudPlatformClientV2.DIDPool() # DIDPool | DID pool try: # Update a DID Pool by ID. api_response = api_instance.put_telephony_providers_edges_didpool(did_pool_id, body) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->put_telephony_providers_edges_didpool: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/dids Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a listing of DIDs
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) sort_by = ''number'' # str | Sort by (optional) (default to 'number') sort_order = ''ASC'' # str | Sort order (optional) (default to 'ASC') phone_number = 'phone_number_example' # str | Filter by phoneNumber (optional) owner_id = 'owner_id_example' # str | Filter by the owner of a phone number (optional) did_pool_id = 'did_pool_id_example' # str | Filter by the DID Pool assignment (optional) id = ['id_example'] # list[str] | Filter by a specific list of ID's (optional) try: # Get a listing of DIDs api_response = api_instance.get_telephony_providers_edges_dids(page_size=page_size, page_number=page_number, sort_by=sort_by, sort_order=sort_order, phone_number=phone_number, owner_id=owner_id, did_pool_id=did_pool_id, id=id) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_dids: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/dids/{didId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a DID by ID.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); did_id = 'did_id_example' # str | DID ID try: # Get a DID by ID. api_response = api_instance.get_telephony_providers_edges_did(did_id) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_did: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/edgegroups Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the list of edge 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.TelephonyProvidersEdgeApi(); page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) name = 'name_example' # str | Name (optional) sort_by = ''name'' # str | Sort by (optional) (default to 'name') managed = True # bool | Filter by managed (optional) try: # Get the list of edge groups. api_response = api_instance.get_telephony_providers_edges_edgegroups(page_size=page_size, page_number=page_number, name=name, sort_by=sort_by, managed=managed) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_edgegroups: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/telephony/providers/edges/edgegroups Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create an edge group.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); body = PureCloudPlatformClientV2.EdgeGroup() # EdgeGroup | EdgeGroup try: # Create an edge group. api_response = api_instance.post_telephony_providers_edges_edgegroups(body) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->post_telephony_providers_edges_edgegroups: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/telephony/providers/edges/edgegroups/{edgeGroupId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete an edge group.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); edge_group_id = 'edge_group_id_example' # str | Edge group ID try: # Delete an edge group. api_instance.delete_telephony_providers_edges_edgegroup(edge_group_id) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->delete_telephony_providers_edges_edgegroup: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/edgegroups/{edgeGroupId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get edge group.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); edge_group_id = 'edge_group_id_example' # str | Edge group ID expand = ['expand_example'] # list[str] | Fields to expand in the response (optional) try: # Get edge group. api_response = api_instance.get_telephony_providers_edges_edgegroup(edge_group_id, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_edgegroup: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/telephony/providers/edges/edgegroups/{edgeGroupId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update an edge group.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); edge_group_id = 'edge_group_id_example' # str | Edge group ID body = PureCloudPlatformClientV2.EdgeGroup() # EdgeGroup | EdgeGroup try: # Update an edge group. api_response = api_instance.put_telephony_providers_edges_edgegroup(edge_group_id, body) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->put_telephony_providers_edges_edgegroup: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/edgegroups/{edgegroupId}/edgetrunkbases/{edgetrunkbaseId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Gets the edge trunk base associated with the edge group
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); edgegroup_id = 'edgegroup_id_example' # str | Edge Group ID edgetrunkbase_id = 'edgetrunkbase_id_example' # str | Edge Trunk Base ID try: # Gets the edge trunk base associated with the edge group api_response = api_instance.get_telephony_providers_edges_edgegroup_edgetrunkbase(edgegroup_id, edgetrunkbase_id) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_edgegroup_edgetrunkbase: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/telephony/providers/edges/edgegroups/{edgegroupId}/edgetrunkbases/{edgetrunkbaseId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update the edge trunk base associated with the edge group
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); edgegroup_id = 'edgegroup_id_example' # str | Edge Group ID edgetrunkbase_id = 'edgetrunkbase_id_example' # str | Edge Trunk Base ID body = PureCloudPlatformClientV2.EdgeTrunkBase() # EdgeTrunkBase | EdgeTrunkBase try: # Update the edge trunk base associated with the edge group api_response = api_instance.put_telephony_providers_edges_edgegroup_edgetrunkbase(edgegroup_id, edgetrunkbase_id, body) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->put_telephony_providers_edges_edgegroup_edgetrunkbase: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/edgeversionreport Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the edge version report. The report will not have consistent data about the edge version(s) until all edges have been reset.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); try: # Get the edge version report. api_response = api_instance.get_telephony_providers_edges_edgeversionreport() pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_edgeversionreport: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/expired Genesys Cloud Python SDK.
Genesys describes this as an API used to: List of edges more than 4 edge versions behind the latest software.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); try: # List of edges more than 4 edge versions behind the latest software. api_response = api_instance.get_telephony_providers_edges_expired() pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_expired: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/extensionpools Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a listing of extension pools
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) sort_by = 'sort_by_example' # str | Sort by (optional) number = 'number_example' # str | Deprecated, filtering by number not supported (optional) try: # Get a listing of extension pools api_response = api_instance.get_telephony_providers_edges_extensionpools(page_size=page_size, page_number=page_number, sort_by=sort_by, number=number) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_extensionpools: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/telephony/providers/edges/extensionpools Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create a new extension pool
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); body = PureCloudPlatformClientV2.ExtensionPool() # ExtensionPool | ExtensionPool try: # Create a new extension pool api_response = api_instance.post_telephony_providers_edges_extensionpools(body) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->post_telephony_providers_edges_extensionpools: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/extensionpools/divisionviews Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a pageable list of basic extension pool objects filterable by query parameters. This returns extension pools consisting of name and division. If one or more IDs are specified, the search will fetch flow outcomes that match the given ID(s) and not use any additional supplied query parameters in the search.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); page_number = 1 # int | Page number (optional) (default to 1) page_size = 25 # int | Page size (optional) (default to 25) sort_by = ''name'' # str | Sort by (optional) (default to 'name') sort_order = ''ASC'' # str | Sort order (optional) (default to 'ASC') id = ['id_example'] # list[str] | ID of the Extension Pools to filter by. (optional) name = 'name_example' # str | Name of the Extension Pools to filter by. (optional) division_id = ['division_id_example'] # list[str] | List of divisionIds on which to filter. (optional) try: # Get a pageable list of basic extension pool objects filterable by query parameters. api_response = api_instance.get_telephony_providers_edges_extensionpools_divisionviews(page_number=page_number, page_size=page_size, sort_by=sort_by, sort_order=sort_order, id=id, name=name, division_id=division_id) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_extensionpools_divisionviews: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/telephony/providers/edges/extensionpools/{extensionPoolId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete an extension pool by ID
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); extension_pool_id = 'extension_pool_id_example' # str | Extension pool ID try: # Delete an extension pool by ID api_instance.delete_telephony_providers_edges_extensionpool(extension_pool_id) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->delete_telephony_providers_edges_extensionpool: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/extensionpools/{extensionPoolId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get an extension pool by ID
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); extension_pool_id = 'extension_pool_id_example' # str | Extension pool ID try: # Get an extension pool by ID api_response = api_instance.get_telephony_providers_edges_extensionpool(extension_pool_id) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_extensionpool: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/telephony/providers/edges/extensionpools/{extensionPoolId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update an extension pool by ID
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); extension_pool_id = 'extension_pool_id_example' # str | Extension pool ID body = PureCloudPlatformClientV2.ExtensionPool() # ExtensionPool | ExtensionPool try: # Update an extension pool by ID api_response = api_instance.put_telephony_providers_edges_extensionpool(extension_pool_id, body) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->put_telephony_providers_edges_extensionpool: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/extensions Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a listing of extensions
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) sort_by = ''number'' # str | Sort by (optional) (default to 'number') sort_order = ''ASC'' # str | Sort order (optional) (default to 'ASC') number = 'number_example' # str | Filter by number (optional) try: # Get a listing of extensions api_response = api_instance.get_telephony_providers_edges_extensions(page_size=page_size, page_number=page_number, sort_by=sort_by, sort_order=sort_order, number=number) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_extensions: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/extensions/{extensionId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get an extension by ID.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); extension_id = 'extension_id_example' # str | Extension ID try: # Get an extension by ID. api_response = api_instance.get_telephony_providers_edges_extension(extension_id) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_extension: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/linebasesettings Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a listing of line base settings objects
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); page_number = 1 # int | Page number (optional) (default to 1) page_size = 25 # int | Page size (optional) (default to 25) sort_by = ''name'' # str | Value by which to sort (optional) (default to 'name') sort_order = ''ASC'' # str | Sort order (optional) (default to 'ASC') expand = ['expand_example'] # list[str] | Fields to expand in the response, comma-separated (optional) try: # Get a listing of line base settings objects api_response = api_instance.get_telephony_providers_edges_linebasesettings(page_number=page_number, page_size=page_size, sort_by=sort_by, sort_order=sort_order, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_linebasesettings: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/linebasesettings/{lineBaseId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a line base settings object by ID
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); line_base_id = 'line_base_id_example' # str | Line base ID try: # Get a line base settings object by ID api_response = api_instance.get_telephony_providers_edges_linebasesetting(line_base_id) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_linebasesetting: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/lines Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a list of Lines
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) name = 'name_example' # str | Name (optional) sort_by = ''name'' # str | Value by which to sort (optional) (default to 'name') expand = ['expand_example'] # list[str] | Fields to expand in the response, comma-separated. The edgeGroup value is deprecated. (optional) try: # Get a list of Lines api_response = api_instance.get_telephony_providers_edges_lines(page_size=page_size, page_number=page_number, name=name, sort_by=sort_by, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_lines: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/lines/template Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a Line instance template based on a Line Base Settings object. This object can then be modified and saved as a new Line instance
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); line_base_settings_id = 'line_base_settings_id_example' # str | The id of a Line Base Settings object upon which to base this Line try: # Get a Line instance template based on a Line Base Settings object. This object can then be modified and saved as a new Line instance api_response = api_instance.get_telephony_providers_edges_lines_template(line_base_settings_id) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_lines_template: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/lines/{lineId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a Line by ID
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); line_id = 'line_id_example' # str | Line ID try: # Get a Line by ID api_response = api_instance.get_telephony_providers_edges_line(line_id) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_line: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/logicalinterfaces Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get edge logical interfaces. Retrieve the configured logical interfaces for a list edges. Only 100 edges can be requested at a time.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); edge_ids = 'edge_ids_example' # str | Comma separated list of Edge Id's expand = ['expand_example'] # list[str] | Field to expand in the response (optional) try: # Get edge logical interfaces. api_response = api_instance.get_telephony_providers_edges_logicalinterfaces(edge_ids, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_logicalinterfaces: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/metrics Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the metrics for a list of edges.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); edge_ids = 'edge_ids_example' # str | Comma separated list of Edge Id's. Maximum of 100 edge ids allowed. try: # Get the metrics for a list of edges. api_response = api_instance.get_telephony_providers_edges_metrics(edge_ids) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_metrics: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/outboundroutes Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get outbound routes
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) name = 'name_example' # str | Name (optional) site_id = 'site_id_example' # str | Filter by site.id (optional) external_trunk_bases_ids = 'external_trunk_bases_ids_example' # str | Filter by externalTrunkBases.ids (optional) sort_by = ''name'' # str | Sort by (optional) (default to 'name') try: # Get outbound routes api_response = api_instance.get_telephony_providers_edges_outboundroutes(page_size=page_size, page_number=page_number, name=name, site_id=site_id, external_trunk_bases_ids=external_trunk_bases_ids, sort_by=sort_by) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_outboundroutes: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/phonebasesettings Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a list of Phone Base Settings objects
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) sort_by = ''name'' # str | Value by which to sort (optional) (default to 'name') sort_order = ''ASC'' # str | Sort order (optional) (default to 'ASC') expand = ['expand_example'] # list[str] | Fields to expand in the response, comma-separated (optional) name = 'name_example' # str | Name (optional) try: # Get a list of Phone Base Settings objects api_response = api_instance.get_telephony_providers_edges_phonebasesettings(page_size=page_size, page_number=page_number, sort_by=sort_by, sort_order=sort_order, expand=expand, name=name) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_phonebasesettings: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/telephony/providers/edges/phonebasesettings Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create a new Phone Base Settings object
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); body = PureCloudPlatformClientV2.PhoneBase() # PhoneBase | Phone base settings try: # Create a new Phone Base Settings object api_response = api_instance.post_telephony_providers_edges_phonebasesettings(body) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->post_telephony_providers_edges_phonebasesettings: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/phonebasesettings/availablemetabases Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a list of available makes and models to create a new Phone Base Settings
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) try: # Get a list of available makes and models to create a new Phone Base Settings api_response = api_instance.get_telephony_providers_edges_phonebasesettings_availablemetabases(page_size=page_size, page_number=page_number) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_phonebasesettings_availablemetabases: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/phonebasesettings/template Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a Phone Base Settings instance template from a given make and model. This object can then be modified and saved as a new Phone Base Settings instance
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); phone_metabase_id = 'phone_metabase_id_example' # str | The id of a metabase object upon which to base this Phone Base Settings try: # Get a Phone Base Settings instance template from a given make and model. This object can then be modified and saved as a new Phone Base Settings instance api_response = api_instance.get_telephony_providers_edges_phonebasesettings_template(phone_metabase_id) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_phonebasesettings_template: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/telephony/providers/edges/phonebasesettings/{phoneBaseId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete a Phone Base Settings by ID
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); phone_base_id = 'phone_base_id_example' # str | Phone base ID try: # Delete a Phone Base Settings by ID api_instance.delete_telephony_providers_edges_phonebasesetting(phone_base_id) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->delete_telephony_providers_edges_phonebasesetting: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/phonebasesettings/{phoneBaseId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a Phone Base Settings object by ID
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); phone_base_id = 'phone_base_id_example' # str | Phone base ID try: # Get a Phone Base Settings object by ID api_response = api_instance.get_telephony_providers_edges_phonebasesetting(phone_base_id) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_phonebasesetting: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/telephony/providers/edges/phonebasesettings/{phoneBaseId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a Phone Base Settings by ID
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); phone_base_id = 'phone_base_id_example' # str | Phone base ID body = PureCloudPlatformClientV2.PhoneBase() # PhoneBase | Phone base settings try: # Update a Phone Base Settings by ID api_response = api_instance.put_telephony_providers_edges_phonebasesetting(phone_base_id, body) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->put_telephony_providers_edges_phonebasesetting: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/phones Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a list of Phone Instances. A maximum of 10,000 results is returned when filtering the results or sorting by a field other than the ID. Sorting by only the ID has no result limit. Each filter supports a wildcard, *, as a value to search for partial values.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); page_number = 1 # int | Page number (optional) (default to 1) page_size = 25 # int | Page size (optional) (default to 25) sort_by = ''name'' # str | The field to sort by (optional) (default to 'name') sort_order = ''ASC'' # str | Sort order (optional) (default to 'ASC') site_id = 'site_id_example' # str | Filter by site.id (optional) web_rtc_user_id = 'web_rtc_user_id_example' # str | Filter by webRtcUser.id (optional) phone_base_settings_id = 'phone_base_settings_id_example' # str | Filter by phoneBaseSettings.id (optional) lines_logged_in_user_id = 'lines_logged_in_user_id_example' # str | Filter by lines.loggedInUser.id (optional) lines_default_for_user_id = 'lines_default_for_user_id_example' # str | Filter by lines.defaultForUser.id (optional) phone_hardware_id = 'phone_hardware_id_example' # str | Filter by phone_hardwareId (optional) lines_id = 'lines_id_example' # str | Filter by lines.id (optional) lines_name = 'lines_name_example' # str | Filter by lines.name (optional) name = 'name_example' # str | Name of the Phone to filter by, comma-separated (optional) status_operational_status = 'status_operational_status_example' # str | The primary status to filter by (optional) secondary_status_operational_status = 'secondary_status_operational_status_example' # str | The secondary status to filter by (optional) expand = ['expand_example'] # list[str] | Fields to expand in the response, comma-separated (optional) fields = ['fields_example'] # list[str] | Fields and properties to get, comma-separated (optional) try: # Get a list of Phone Instances. A maximum of 10,000 results is returned when filtering the results or sorting by a field other than the ID. Sorting by only the ID has no result limit. Each filter supports a wildcard, *, as a value to search for partial values. api_response = api_instance.get_telephony_providers_edges_phones(page_number=page_number, page_size=page_size, sort_by=sort_by, sort_order=sort_order, site_id=site_id, web_rtc_user_id=web_rtc_user_id, phone_base_settings_id=phone_base_settings_id, lines_logged_in_user_id=lines_logged_in_user_id, lines_default_for_user_id=lines_default_for_user_id, phone_hardware_id=phone_hardware_id, lines_id=lines_id, lines_name=lines_name, name=name, status_operational_status=status_operational_status, secondary_status_operational_status=secondary_status_operational_status, expand=expand, fields=fields) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_phones: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/telephony/providers/edges/phones Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create a new Phone
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); body = PureCloudPlatformClientV2.Phone() # Phone | Phone try: # Create a new Phone api_response = api_instance.post_telephony_providers_edges_phones(body) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->post_telephony_providers_edges_phones: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/telephony/providers/edges/phones/reboot Genesys Cloud Python SDK.
Genesys describes this as an API used to: Reboot Multiple Phones
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); body = PureCloudPlatformClientV2.PhonesReboot() # PhonesReboot | Phones try: # Reboot Multiple Phones api_instance.post_telephony_providers_edges_phones_reboot(body) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->post_telephony_providers_edges_phones_reboot: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/phones/template Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a Phone instance template based on a Phone Base Settings object. This object can then be modified and saved as a new Phone instance
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); phone_base_settings_id = 'phone_base_settings_id_example' # str | The id of a Phone Base Settings object upon which to base this Phone try: # Get a Phone instance template based on a Phone Base Settings object. This object can then be modified and saved as a new Phone instance api_response = api_instance.get_telephony_providers_edges_phones_template(phone_base_settings_id) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_phones_template: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/telephony/providers/edges/phones/{phoneId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete a Phone by ID
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); phone_id = 'phone_id_example' # str | Phone ID try: # Delete a Phone by ID api_instance.delete_telephony_providers_edges_phone(phone_id) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->delete_telephony_providers_edges_phone: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/phones/{phoneId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a Phone by ID
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); phone_id = 'phone_id_example' # str | Phone ID try: # Get a Phone by ID api_response = api_instance.get_telephony_providers_edges_phone(phone_id) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_phone: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/telephony/providers/edges/phones/{phoneId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a Phone by ID
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); phone_id = 'phone_id_example' # str | Phone ID body = PureCloudPlatformClientV2.Phone() # Phone | Phone try: # Update a Phone by ID api_response = api_instance.put_telephony_providers_edges_phone(phone_id, body) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->put_telephony_providers_edges_phone: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/telephony/providers/edges/phones/{phoneId}/reboot Genesys Cloud Python SDK.
Genesys describes this as an API used to: Reboot a Phone
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); phone_id = 'phone_id_example' # str | Phone Id try: # Reboot a Phone api_instance.post_telephony_providers_edges_phone_reboot(phone_id) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->post_telephony_providers_edges_phone_reboot: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/physicalinterfaces Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get physical interfaces for edges. Retrieves a list of all configured physical interfaces for a list of edges. Only 100 edges can be requested at a time.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); edge_ids = 'edge_ids_example' # str | Comma separated list of Edge Id's try: # Get physical interfaces for edges. api_response = api_instance.get_telephony_providers_edges_physicalinterfaces(edge_ids) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_physicalinterfaces: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/sites Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the list of Sites.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) sort_by = ''name'' # str | Sort by (optional) (default to 'name') sort_order = ''ASC'' # str | Sort order (optional) (default to 'ASC') name = 'name_example' # str | Name (optional) location_id = 'location_id_example' # str | Location Id (optional) managed = True # bool | Filter by managed (optional) expand = ['expand_example'] # list[str] | Fields to expand in the response, comma-separated (optional) try: # Get the list of Sites. api_response = api_instance.get_telephony_providers_edges_sites(page_size=page_size, page_number=page_number, sort_by=sort_by, sort_order=sort_order, name=name, location_id=location_id, managed=managed, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_sites: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/telephony/providers/edges/sites Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create a Site.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); body = PureCloudPlatformClientV2.Site() # Site | Site try: # Create a Site. api_response = api_instance.post_telephony_providers_edges_sites(body) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->post_telephony_providers_edges_sites: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/telephony/providers/edges/sites/{siteId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete a Site by ID
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); site_id = 'site_id_example' # str | Site ID try: # Delete a Site by ID api_instance.delete_telephony_providers_edges_site(site_id) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->delete_telephony_providers_edges_site: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/sites/{siteId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a Site by ID.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); site_id = 'site_id_example' # str | Site ID try: # Get a Site by ID. api_response = api_instance.get_telephony_providers_edges_site(site_id) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_site: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/telephony/providers/edges/sites/{siteId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a Site by ID.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); site_id = 'site_id_example' # str | Site ID body = PureCloudPlatformClientV2.Site() # Site | Site try: # Update a Site by ID. api_response = api_instance.put_telephony_providers_edges_site(site_id, body) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->put_telephony_providers_edges_site: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/sites/{siteId}/numberplans Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the list of Number Plans for this Site. Only fetches the first 200 records.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); site_id = 'site_id_example' # str | Site ID try: # Get the list of Number Plans for this Site. Only fetches the first 200 records. api_response = api_instance.get_telephony_providers_edges_site_numberplans(site_id) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_site_numberplans: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/telephony/providers/edges/sites/{siteId}/numberplans Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update the list of Number Plans. A user can update maximum 200 number plans at a time.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); site_id = 'site_id_example' # str | Site ID body = [PureCloudPlatformClientV2.NumberPlan()] # list[NumberPlan] | List of number plans try: # Update the list of Number Plans. A user can update maximum 200 number plans at a time. api_response = api_instance.put_telephony_providers_edges_site_numberplans(site_id, body) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->put_telephony_providers_edges_site_numberplans: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/sites/{siteId}/numberplans/classifications Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a list of Classifications for this Site
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); site_id = 'site_id_example' # str | Site ID classification = 'classification_example' # str | Classification (optional) try: # Get a list of Classifications for this Site api_response = api_instance.get_telephony_providers_edges_site_numberplans_classifications(site_id, classification=classification) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_site_numberplans_classifications: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/sites/{siteId}/numberplans/{numberPlanId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a Number Plan by ID.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); site_id = 'site_id_example' # str | Site ID number_plan_id = 'number_plan_id_example' # str | Number Plan ID try: # Get a Number Plan by ID. api_response = api_instance.get_telephony_providers_edges_site_numberplan(site_id, number_plan_id) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_site_numberplan: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/telephony/providers/edges/sites/{siteId}/outboundroutes Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get outbound routes
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi(); site_id = 'site_id_example' # str | Site ID page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) name = 'name_example' # str | Name (optional) external_trunk_bases_ids = 'external_trunk_bases_ids_example' # str | externalTrunkBases.ids (optional) sort_by = ''name'' # str | Sort by (optional) (default to 'name') try: # Get outbound routes api_response = api_instance.get_telephony_providers_edges_site_outboundroutes(site_id, page_size=page_size, page_number=page_number, name=name, external_trunk_bases_ids=external_trunk_bases_ids, sort_by=sort_by) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edges_site_outboundroutes: %s\n" % e)```