instruction
stringlengths
81
221
input
stringlengths
50
1.19k
output
stringlengths
525
3.61k
Provide a Python example that uses the DELETE /api/v2/routing/users/{userId}/directroutingbackup/settings Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete the user's Direct Routing Backup settings and revert to the Direct Routing Queue default.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID try: # Delete the user's Direct Routing Backup settings and revert to the Direct Routing Queue default. api_instance.delete_routing_user_directroutingbackup_settings(user_id) except ApiException as e: print("Exception when calling UsersApi->delete_routing_user_directroutingbackup_settings: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/routing/users/{userId}/directroutingbackup/settings Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the user's Direct Routing Backup 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.UsersApi(); user_id = 'user_id_example' # str | User ID try: # Get the user's Direct Routing Backup settings. api_response = api_instance.get_routing_user_directroutingbackup_settings(user_id) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->get_routing_user_directroutingbackup_settings: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/routing/users/{userId}/directroutingbackup/settings Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update the user's Direct Routing Backup 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.UsersApi(); user_id = 'user_id_example' # str | User ID body = PureCloudPlatformClientV2.AgentDirectRoutingBackupSettings() # AgentDirectRoutingBackupSettings | directRoutingBackup try: # Update the user's Direct Routing Backup settings. api_response = api_instance.put_routing_user_directroutingbackup_settings(user_id, body) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->put_routing_user_directroutingbackup_settings: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/routing/users/{userId}/utilization Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete the user's max utilization settings and revert to the organization-wide default.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID try: # Delete the user's max utilization settings and revert to the organization-wide default. api_instance.delete_routing_user_utilization(user_id) except ApiException as e: print("Exception when calling UsersApi->delete_routing_user_utilization: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/routing/users/{userId}/utilization Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the user's max utilization settings. If not configured, the organization-wide default is returned.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID try: # Get the user's max utilization settings. If not configured, the organization-wide default is returned. api_response = api_instance.get_routing_user_utilization(user_id) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->get_routing_user_utilization: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/routing/users/{userId}/utilization Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update the user's max utilization settings. Include only those media types requiring custom configuration.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID body = PureCloudPlatformClientV2.UtilizationRequest() # UtilizationRequest | utilization try: # Update the user's max utilization settings. Include only those media types requiring custom configuration. api_response = api_instance.put_routing_user_utilization(user_id, body) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->put_routing_user_utilization: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/users Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the list of available users.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) id = ['id_example'] # list[str] | A list of user IDs to fetch by bulk (optional) jabber_id = ['jabber_id_example'] # list[str] | A list of jabberIds to fetch by bulk (cannot be used with the \"id\" parameter) (optional) sort_order = ''ASC'' # str | Ascending or descending sort order (optional) (default to 'ASC') expand = ['expand_example'] # list[str] | Which fields, if any, to expand. Note, expand parameters are resolved with a best effort approach and not guaranteed to be returned. If requested expand information is absolutely required, it's recommended to use specific API requests instead. (optional) integration_presence_source = 'integration_presence_source_example' # str | Gets an integration presence for users instead of their defaults. This parameter will only be used when presence is provided as an \"expand\". When using this parameter the maximum number of users that can be returned is 100. (optional) state = ''active'' # str | Only list users of this state (optional) (default to 'active') try: # Get the list of available users. api_response = api_instance.get_users(page_size=page_size, page_number=page_number, id=id, jabber_id=jabber_id, sort_order=sort_order, expand=expand, integration_presence_source=integration_presence_source, state=state) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->get_users: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/users Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create user. If user creation is successful but the provided password is invalid or configuration fails, POST api/v2/users/{userId}/password can be used to re-attempt password configuration.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); body = PureCloudPlatformClientV2.CreateUser() # CreateUser | User try: # Create user api_response = api_instance.post_users(body) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->post_users: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/users/bulk Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update bulk acd autoanswer on users. Max 50 users can be updated 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.UsersApi(); body = [PureCloudPlatformClientV2.PatchUser()] # list[PatchUser] | Users try: # Update bulk acd autoanswer on users. Max 50 users can be updated at a time. api_response = api_instance.patch_users_bulk(body) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->patch_users_bulk: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/users/development/activities Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get list of Development Activities. Either moduleId or userId is required. Results are filtered based on the applicable permissions.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = ['user_id_example'] # list[str] | Specifies the list of user IDs to be queried, up to 100 user IDs. It searches for any relationship for the userId. (optional) module_id = 'module_id_example' # str | Specifies the ID of the learning module. (optional) interval = 'interval_example' # str | Specifies the dateDue range to be queried. Milliseconds will be truncated. A maximum of 1 year can be specified in the range. End date is not inclusive. Intervals are represented as an ISO-8601 string. For example: YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss (optional) completion_interval = 'completion_interval_example' # str | Specifies the range of completion dates to be used for filtering. A maximum of 1 year can be specified in the range. End date is not inclusive. Intervals are represented as an ISO-8601 string. For example: YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss (optional) overdue = ''Any'' # str | Specifies if non-overdue, overdue, or all activities are returned. If not specified, all activities are returned (optional) (default to 'Any') pcPass = ''Any'' # str | Specifies if only the failed (pass is \"False\") or passed (pass is \"True\") activities are returned. If pass is \"Any\" or if the pass parameter is not supplied, all activities are returned (optional) (default to 'Any') page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) sort_order = ''Desc'' # str | Specifies result set sort order sorted by the date due; if not specified, default sort order is descending (Desc) (optional) (default to 'Desc') types = ['types_example'] # list[str] | Specifies the activity types. Informational, AssessedContent and Assessment are deprecated (optional) statuses = ['statuses_example'] # list[str] | Specifies the activity statuses to filter by (optional) relationship = ['relationship_example'] # list[str] | Specifies how the current user relation should be interpreted, and filters the activities returned to only the activities that have the specified relationship. If a value besides Attendee is specified, it will only return Coaching Appointments. If not specified, no filtering is applied. (optional) try: # Get list of Development Activities api_response = api_instance.get_users_development_activities(user_id=user_id, module_id=module_id, interval=interval, completion_interval=completion_interval, overdue=overdue, pcPass=pcPass, page_size=page_size, page_number=page_number, sort_order=sort_order, types=types, statuses=statuses, relationship=relationship) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->get_users_development_activities: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/users/development/activities/aggregates/query Genesys Cloud Python SDK.
Genesys describes this as an API used to: Retrieve aggregated development activity data. Results are filtered based on the applicable permissions.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); body = PureCloudPlatformClientV2.DevelopmentActivityAggregateParam() # DevelopmentActivityAggregateParam | Aggregate Request try: # Retrieve aggregated development activity data api_response = api_instance.post_users_development_activities_aggregates_query(body) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->post_users_development_activities_aggregates_query: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/users/development/activities/me Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get list of Development Activities for current user. Results are filtered based on the applicable permissions.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); module_id = 'module_id_example' # str | Specifies the ID of the learning module. (optional) interval = 'interval_example' # str | Specifies the dateDue range to be queried. Milliseconds will be truncated. A maximum of 1 year can be specified in the range. End date is not inclusive. Intervals are represented as an ISO-8601 string. For example: YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss (optional) completion_interval = 'completion_interval_example' # str | Specifies the range of completion dates to be used for filtering. A maximum of 1 year can be specified in the range. End date is not inclusive. Intervals are represented as an ISO-8601 string. For example: YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss (optional) overdue = ''Any'' # str | Specifies if non-overdue, overdue, or all activities are returned. If not specified, all activities are returned (optional) (default to 'Any') pcPass = ''Any'' # str | Specifies if only the failed (pass is \"False\") or passed (pass is \"True\") activities are returned. If pass is \"Any\" or if the pass parameter is not supplied, all activities are returned (optional) (default to 'Any') page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) sort_order = ''Desc'' # str | Specifies result set sort order sorted by the date due; if not specified, default sort order is descending (Desc) (optional) (default to 'Desc') types = ['types_example'] # list[str] | Specifies the activity types. Informational, AssessedContent and Assessment are deprecated (optional) statuses = ['statuses_example'] # list[str] | Specifies the activity statuses to filter by (optional) relationship = ['relationship_example'] # list[str] | Specifies how the current user relation should be interpreted, and filters the activities returned to only the activities that have the specified relationship. If a value besides Attendee is specified, it will only return Coaching Appointments. If not specified, no filtering is applied. (optional) try: # Get list of Development Activities for current user api_response = api_instance.get_users_development_activities_me(module_id=module_id, interval=interval, completion_interval=completion_interval, overdue=overdue, pcPass=pcPass, page_size=page_size, page_number=page_number, sort_order=sort_order, types=types, statuses=statuses, relationship=relationship) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->get_users_development_activities_me: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/users/development/activities/{activityId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a Development Activity. Permission not required if you are the attendee, creator or facilitator of the coaching appointment or you are the assigned user of the learning assignment.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); activity_id = 'activity_id_example' # str | Specifies the activity ID, maps to either assignment or appointment ID type = 'type_example' # str | Specifies the activity type. Informational, AssessedContent and Assessment are deprecated try: # Get a Development Activity api_response = api_instance.get_users_development_activity(activity_id, type) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->get_users_development_activity: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/users/me Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get current user details. This request is not valid when using the Client Credentials OAuth grant.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); expand = ['expand_example'] # list[str] | Which fields, if any, to expand. (optional) integration_presence_source = 'integration_presence_source_example' # str | Get your presence for a given integration. This parameter will only be used when presence is provided as an \"expand\". (optional) try: # Get current user details. api_response = api_instance.get_users_me(expand=expand, integration_presence_source=integration_presence_source) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->get_users_me: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/users/me/password Genesys Cloud Python SDK.
Genesys describes this as an API used to: Change your password
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); body = PureCloudPlatformClientV2.ChangeMyPasswordRequest() # ChangeMyPasswordRequest | Password try: # Change your password api_instance.post_users_me_password(body) except ApiException as e: print("Exception when calling UsersApi->post_users_me_password: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/users/search Genesys Cloud Python SDK.
Genesys describes this as an API used to: Search users using the q64 value returned from a previous 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.UsersApi(); q64 = 'q64_example' # str | q64 expand = ['expand_example'] # list[str] | expand (optional) integration_presence_source = 'integration_presence_source_example' # str | integrationPresenceSource (optional) try: # Search users using the q64 value returned from a previous search api_response = api_instance.get_users_search(q64, expand=expand, integration_presence_source=integration_presence_source) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->get_users_search: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/users/search Genesys Cloud Python SDK.
Genesys describes this as an API used to: Search users
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); body = PureCloudPlatformClientV2.UserSearchRequest() # UserSearchRequest | Search request options try: # Search users api_response = api_instance.post_users_search(body) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->post_users_search: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/users/search/teams/assign Genesys Cloud Python SDK.
Genesys describes this as an API used to: Search users assigned to teams
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); body = PureCloudPlatformClientV2.UserSearchRequest() # UserSearchRequest | Search request options try: # Search users assigned to teams api_response = api_instance.post_users_search_teams_assign(body) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->post_users_search_teams_assign: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/users/{subjectId}/roles Genesys Cloud Python SDK.
Genesys describes this as an API used to: Returns a listing of roles and permissions for a user.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); subject_id = 'subject_id_example' # str | User ID try: # Returns a listing of roles and permissions for a user. api_response = api_instance.get_user_roles(subject_id) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->get_user_roles: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/users/{subjectId}/roles Genesys Cloud Python SDK.
Genesys describes this as an API used to: Sets the user's roles
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); subject_id = 'subject_id_example' # str | User ID body = ['body_example'] # list[str] | List of roles try: # Sets the user's roles api_response = api_instance.put_user_roles(subject_id, body) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->put_user_roles: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/users/{userId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete user
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID try: # Delete user api_response = api_instance.delete_user(user_id) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->delete_user: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/users/{userId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get user.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID expand = ['expand_example'] # list[str] | Which fields, if any, to expand. Note, expand parameters are resolved with a best effort approach and not guaranteed to be returned. If requested expand information is absolutely required, it's recommended to use specific API requests instead. (optional) integration_presence_source = 'integration_presence_source_example' # str | Gets an integration presence for a user instead of their default. (optional) state = ''active'' # str | Search for a user with this state (optional) (default to 'active') try: # Get user. api_response = api_instance.get_user(user_id, expand=expand, integration_presence_source=integration_presence_source, state=state) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->get_user: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/users/{userId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update user
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID body = PureCloudPlatformClientV2.UpdateUser() # UpdateUser | User try: # Update user api_response = api_instance.patch_user(user_id, body) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->patch_user: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/users/{userId}/adjacents Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get adjacents
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID expand = ['expand_example'] # list[str] | Which fields, if any, to expand (optional) try: # Get adjacents api_response = api_instance.get_user_adjacents(user_id, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->get_user_adjacents: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/users/{userId}/callforwarding Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a user's CallForwarding
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID try: # Get a user's CallForwarding api_response = api_instance.get_user_callforwarding(user_id) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->get_user_callforwarding: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/users/{userId}/callforwarding Genesys Cloud Python SDK.
Genesys describes this as an API used to: Patch a user's CallForwarding
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID body = PureCloudPlatformClientV2.CallForwarding() # CallForwarding | Call forwarding try: # Patch a user's CallForwarding api_response = api_instance.patch_user_callforwarding(user_id, body) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->patch_user_callforwarding: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/users/{userId}/callforwarding Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a user's CallForwarding
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID body = PureCloudPlatformClientV2.CallForwarding() # CallForwarding | Call forwarding try: # Update a user's CallForwarding api_response = api_instance.put_user_callforwarding(user_id, body) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->put_user_callforwarding: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/users/{userId}/directreports Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get direct reports
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID expand = ['expand_example'] # list[str] | Which fields, if any, to expand (optional) try: # Get direct reports api_response = api_instance.get_user_directreports(user_id, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->get_user_directreports: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/users/{userId}/externalid Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create mapping between external identifier and user. Limit 100 per entity. Authority Name and External key are case sensitive.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID body = PureCloudPlatformClientV2.UserExternalIdentifier() # UserExternalIdentifier | try: # Create mapping between external identifier and user. Limit 100 per entity. api_response = api_instance.post_user_externalid(user_id, body) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->post_user_externalid: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/users/{userId}/geolocations/{clientId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a user's Geolocation
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | user Id client_id = 'client_id_example' # str | client Id try: # Get a user's Geolocation api_response = api_instance.get_user_geolocation(user_id, client_id) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->get_user_geolocation: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/users/{userId}/geolocations/{clientId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Patch a user's Geolocation. The geolocation object can be patched one of three ways. Option 1: Set the 'primary' property to true. This will set the client as the user's primary geolocation source. Option 2: Provide the 'latitude' and 'longitude' values. This will enqueue an asynchronous update of the 'city', 'region', and 'country', generating a notification. A subsequent GET operation will include the new values for 'city', 'region' and 'country'. Option 3: Provide the 'city', 'region', 'country' values. Option 1 can be combined with Option 2 or Option 3. For example, update the client as primary and provide latitude and longitude 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.UsersApi(); user_id = 'user_id_example' # str | user Id client_id = 'client_id_example' # str | client Id body = PureCloudPlatformClientV2.Geolocation() # Geolocation | Geolocation try: # Patch a user's Geolocation api_response = api_instance.patch_user_geolocation(user_id, client_id, body) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->patch_user_geolocation: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/users/{userId}/invite Genesys Cloud Python SDK.
Genesys describes this as an API used to: Send an activation email to the user
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID force = False # bool | Resend the invitation even if one is already outstanding (optional) (default to False) try: # Send an activation email to the user api_instance.post_user_invite(user_id, force=force) except ApiException as e: print("Exception when calling UsersApi->post_user_invite: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/users/{userId}/outofoffice Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a OutOfOffice
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID try: # Get a OutOfOffice api_response = api_instance.get_user_outofoffice(user_id) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->get_user_outofoffice: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/users/{userId}/outofoffice Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update an OutOfOffice
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID body = PureCloudPlatformClientV2.OutOfOffice() # OutOfOffice | The updated OutOffOffice try: # Update an OutOfOffice api_response = api_instance.put_user_outofoffice(user_id, body) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->put_user_outofoffice: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/users/{userId}/password Genesys Cloud Python SDK.
Genesys describes this as an API used to: Change a users password
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID body = PureCloudPlatformClientV2.ChangePasswordRequest() # ChangePasswordRequest | Password try: # Change a users password api_instance.post_user_password(user_id, body) except ApiException as e: print("Exception when calling UsersApi->post_user_password: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/users/{userId}/profileskills Genesys Cloud Python SDK.
Genesys describes this as an API used to: List profile skills for a user
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID try: # List profile skills for a user api_response = api_instance.get_user_profileskills(user_id) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->get_user_profileskills: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/users/{userId}/profileskills Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update profile skills for a user
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID body = ['body_example'] # list[str] | Skills try: # Update profile skills for a user api_response = api_instance.put_user_profileskills(user_id, body) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->put_user_profileskills: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/users/{userId}/queues Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get queues for user
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) joined = True # bool | Is joined to the queue (optional) (default to True) division_id = ['division_id_example'] # list[str] | Division ID(s) (optional) try: # Get queues for user api_response = api_instance.get_user_queues(user_id, page_size=page_size, page_number=page_number, joined=joined, division_id=division_id) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->get_user_queues: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/users/{userId}/queues Genesys Cloud Python SDK.
Genesys describes this as an API used to: Join or unjoin a set of queues for a user
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID body = [PureCloudPlatformClientV2.UserQueue()] # list[UserQueue] | User Queues division_id = ['division_id_example'] # list[str] | Division ID(s) (optional) try: # Join or unjoin a set of queues for a user api_response = api_instance.patch_user_queues(user_id, body, division_id=division_id) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->patch_user_queues: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/users/{userId}/queues/{queueId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Join or unjoin a queue for a user
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); queue_id = 'queue_id_example' # str | Queue ID user_id = 'user_id_example' # str | User ID body = PureCloudPlatformClientV2.UserQueue() # UserQueue | Queue Member try: # Join or unjoin a queue for a user api_response = api_instance.patch_user_queue(queue_id, user_id, body) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->patch_user_queue: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/users/{userId}/routinglanguages Genesys Cloud Python SDK.
Genesys describes this as an API used to: List routing language for user
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) sort_order = ''ASC'' # str | Ascending or descending sort order (optional) (default to 'ASC') try: # List routing language for user api_response = api_instance.get_user_routinglanguages(user_id, page_size=page_size, page_number=page_number, sort_order=sort_order) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->get_user_routinglanguages: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/users/{userId}/routinglanguages Genesys Cloud Python SDK.
Genesys describes this as an API used to: Add routing language to user
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID body = PureCloudPlatformClientV2.UserRoutingLanguagePost() # UserRoutingLanguagePost | Language try: # Add routing language to user api_response = api_instance.post_user_routinglanguages(user_id, body) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->post_user_routinglanguages: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/users/{userId}/routinglanguages/bulk Genesys Cloud Python SDK.
Genesys describes this as an API used to: Add bulk routing language to user. Max limit 50 languages
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID body = [PureCloudPlatformClientV2.UserRoutingLanguagePost()] # list[UserRoutingLanguagePost] | Language try: # Add bulk routing language to user. Max limit 50 languages api_response = api_instance.patch_user_routinglanguages_bulk(user_id, body) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->patch_user_routinglanguages_bulk: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/users/{userId}/routinglanguages/{languageId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Remove routing language from user
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID language_id = 'language_id_example' # str | languageId try: # Remove routing language from user api_instance.delete_user_routinglanguage(user_id, language_id) except ApiException as e: print("Exception when calling UsersApi->delete_user_routinglanguage: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/users/{userId}/routinglanguages/{languageId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update routing language proficiency or state.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID language_id = 'language_id_example' # str | languageId body = PureCloudPlatformClientV2.UserRoutingLanguage() # UserRoutingLanguage | Language try: # Update routing language proficiency or state. api_response = api_instance.patch_user_routinglanguage(user_id, language_id, body) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->patch_user_routinglanguage: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/users/{userId}/routingskills Genesys Cloud Python SDK.
Genesys describes this as an API used to: List routing skills for user
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) sort_order = ''ASC'' # str | Ascending or descending sort order (optional) (default to 'ASC') try: # List routing skills for user api_response = api_instance.get_user_routingskills(user_id, page_size=page_size, page_number=page_number, sort_order=sort_order) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->get_user_routingskills: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/users/{userId}/routingskills Genesys Cloud Python SDK.
Genesys describes this as an API used to: Add routing skill to user
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID body = PureCloudPlatformClientV2.UserRoutingSkillPost() # UserRoutingSkillPost | Skill try: # Add routing skill to user api_response = api_instance.post_user_routingskills(user_id, body) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->post_user_routingskills: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/users/{userId}/routingskills/bulk Genesys Cloud Python SDK.
Genesys describes this as an API used to: Bulk add routing skills to user
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID body = [PureCloudPlatformClientV2.UserRoutingSkillPost()] # list[UserRoutingSkillPost] | Skill try: # Bulk add routing skills to user api_response = api_instance.patch_user_routingskills_bulk(user_id, body) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->patch_user_routingskills_bulk: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/users/{userId}/routingskills/bulk Genesys Cloud Python SDK.
Genesys describes this as an API used to: Replace all routing skills assigned to a user
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID body = [PureCloudPlatformClientV2.UserRoutingSkillPost()] # list[UserRoutingSkillPost] | Skill try: # Replace all routing skills assigned to a user api_response = api_instance.put_user_routingskills_bulk(user_id, body) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->put_user_routingskills_bulk: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/users/{userId}/routingskills/{skillId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Remove routing skill from user
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID skill_id = 'skill_id_example' # str | skillId try: # Remove routing skill from user api_instance.delete_user_routingskill(user_id, skill_id) except ApiException as e: print("Exception when calling UsersApi->delete_user_routingskill: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/users/{userId}/routingskills/{skillId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update routing skill proficiency or state.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID skill_id = 'skill_id_example' # str | skillId body = PureCloudPlatformClientV2.UserRoutingSkill() # UserRoutingSkill | Skill try: # Update routing skill proficiency or state. api_response = api_instance.put_user_routingskill(user_id, skill_id, body) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->put_user_routingskill: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/users/{userId}/routingstatus Genesys Cloud Python SDK.
Genesys describes this as an API used to: Fetch the routing status of a user
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID try: # Fetch the routing status of a user api_response = api_instance.get_user_routingstatus(user_id) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->get_user_routingstatus: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/users/{userId}/routingstatus Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update the routing status of a user
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID body = PureCloudPlatformClientV2.RoutingStatus() # RoutingStatus | Routing Status try: # Update the routing status of a user api_response = api_instance.put_user_routingstatus(user_id, body) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->put_user_routingstatus: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/users/{userId}/skillgroups Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get skill groups for a user
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID page_size = 25 # int | Page size (optional) (default to 25) after = 'after_example' # str | The cursor that points to the next page (optional) before = 'before_example' # str | The cursor that points to the previous page (optional) try: # Get skill groups for a user api_response = api_instance.get_user_skillgroups(user_id, page_size=page_size, after=after, before=before) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->get_user_skillgroups: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/users/{userId}/state Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get user state information.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID try: # Get user state information. api_response = api_instance.get_user_state(user_id) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->get_user_state: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/users/{userId}/state Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update user state information.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID body = PureCloudPlatformClientV2.UserState() # UserState | User try: # Update user state information. api_response = api_instance.put_user_state(user_id, body) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->put_user_state: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/users/{userId}/station Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get station information for user
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID try: # Get station information for user api_response = api_instance.get_user_station(user_id) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->get_user_station: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/users/{userId}/station/associatedstation Genesys Cloud Python SDK.
Genesys describes this as an API used to: Clear associated station
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID try: # Clear associated station api_instance.delete_user_station_associatedstation(user_id) except ApiException as e: print("Exception when calling UsersApi->delete_user_station_associatedstation: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/users/{userId}/station/associatedstation/{stationId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Set associated station
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID station_id = 'station_id_example' # str | stationId try: # Set associated station api_instance.put_user_station_associatedstation_station_id(user_id, station_id) except ApiException as e: print("Exception when calling UsersApi->put_user_station_associatedstation_station_id: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/users/{userId}/station/defaultstation Genesys Cloud Python SDK.
Genesys describes this as an API used to: Clear default station
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID try: # Clear default station api_instance.delete_user_station_defaultstation(user_id) except ApiException as e: print("Exception when calling UsersApi->delete_user_station_defaultstation: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/users/{userId}/station/defaultstation/{stationId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Set default station
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID station_id = 'station_id_example' # str | stationId try: # Set default station api_instance.put_user_station_defaultstation_station_id(user_id, station_id) except ApiException as e: print("Exception when calling UsersApi->put_user_station_defaultstation_station_id: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/users/{userId}/superiors Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get superiors
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID expand = ['expand_example'] # list[str] | Which fields, if any, to expand (optional) try: # Get superiors api_response = api_instance.get_user_superiors(user_id, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->get_user_superiors: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/users/{userId}/trustors Genesys Cloud Python SDK.
Genesys describes this as an API used to: List the organizations that have authorized/trusted the user.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) try: # List the organizations that have authorized/trusted the user. api_response = api_instance.get_user_trustors(user_id, page_size=page_size, page_number=page_number) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->get_user_trustors: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/users/{userId}/verifiers Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a list of verifiers
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID try: # Get a list of verifiers api_response = api_instance.get_user_verifiers(user_id) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->get_user_verifiers: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/users/{userId}/verifiers/{verifierId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete a verifier
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID verifier_id = 'verifier_id_example' # str | Verifier ID try: # Delete a verifier api_instance.delete_user_verifier(user_id, verifier_id) except ApiException as e: print("Exception when calling UsersApi->delete_user_verifier: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/users/{userId}/verifiers/{verifierId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a verifier
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UsersApi(); user_id = 'user_id_example' # str | User ID verifier_id = 'verifier_id_example' # str | Verifier ID body = PureCloudPlatformClientV2.UpdateVerifierRequest() # UpdateVerifierRequest | Verifier Update try: # Update a verifier api_response = api_instance.put_user_verifier(user_id, verifier_id, body) pprint(api_response) except ApiException as e: print("Exception when calling UsersApi->put_user_verifier: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/certificate/details Genesys Cloud Python SDK.
Genesys describes this as an API used to: Returns the information about an X509 PEM encoded certificate or certificate chain.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UtilitiesApi(); body = PureCloudPlatformClientV2.Certificate() # Certificate | Certificate try: # Returns the information about an X509 PEM encoded certificate or certificate chain. api_response = api_instance.post_certificate_details(body) pprint(api_response) except ApiException as e: print("Exception when calling UtilitiesApi->post_certificate_details: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/date Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the current system date/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.UtilitiesApi(); try: # Get the current system date/time api_response = api_instance.get_date() pprint(api_response) except ApiException as e: print("Exception when calling UtilitiesApi->get_date: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/ipranges Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get public ip address ranges for Genesys Cloud
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.UtilitiesApi(); try: # Get public ip address ranges for Genesys Cloud api_response = api_instance.get_ipranges() pprint(api_response) except ApiException as e: print("Exception when calling UtilitiesApi->get_ipranges: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/timezones Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get time zones 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.UtilitiesApi(); page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) try: # Get time zones list api_response = api_instance.get_timezones(page_size=page_size, page_number=page_number) pprint(api_response) except ApiException as e: print("Exception when calling UtilitiesApi->get_timezones: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/voicemail/groups/{groupId}/mailbox Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the group's mailbox information
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.VoicemailApi(); group_id = 'group_id_example' # str | groupId try: # Get the group's mailbox information api_response = api_instance.get_voicemail_group_mailbox(group_id) pprint(api_response) except ApiException as e: print("Exception when calling VoicemailApi->get_voicemail_group_mailbox: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/voicemail/groups/{groupId}/messages Genesys Cloud Python SDK.
Genesys describes this as an API used to: List voicemail messages
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.VoicemailApi(); group_id = 'group_id_example' # str | Group ID page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) try: # List voicemail messages api_response = api_instance.get_voicemail_group_messages(group_id, page_size=page_size, page_number=page_number) pprint(api_response) except ApiException as e: print("Exception when calling VoicemailApi->get_voicemail_group_messages: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/voicemail/groups/{groupId}/policy Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a group's voicemail policy
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.VoicemailApi(); group_id = 'group_id_example' # str | Group ID try: # Get a group's voicemail policy api_response = api_instance.get_voicemail_group_policy(group_id) pprint(api_response) except ApiException as e: print("Exception when calling VoicemailApi->get_voicemail_group_policy: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/voicemail/groups/{groupId}/policy Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a group's voicemail policy
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.VoicemailApi(); group_id = 'group_id_example' # str | Group ID body = PureCloudPlatformClientV2.VoicemailGroupPolicy() # VoicemailGroupPolicy | The group's voicemail policy try: # Update a group's voicemail policy api_response = api_instance.patch_voicemail_group_policy(group_id, body) pprint(api_response) except ApiException as e: print("Exception when calling VoicemailApi->patch_voicemail_group_policy: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/voicemail/mailbox Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the current user's mailbox information
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.VoicemailApi(); try: # Get the current user's mailbox information api_response = api_instance.get_voicemail_mailbox() pprint(api_response) except ApiException as e: print("Exception when calling VoicemailApi->get_voicemail_mailbox: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/voicemail/me/mailbox Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the current user's mailbox information
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.VoicemailApi(); try: # Get the current user's mailbox information api_response = api_instance.get_voicemail_me_mailbox() pprint(api_response) except ApiException as e: print("Exception when calling VoicemailApi->get_voicemail_me_mailbox: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/voicemail/me/messages Genesys Cloud Python SDK.
Genesys describes this as an API used to: List voicemail messages
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.VoicemailApi(); page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) try: # List voicemail messages api_response = api_instance.get_voicemail_me_messages(page_size=page_size, page_number=page_number) pprint(api_response) except ApiException as e: print("Exception when calling VoicemailApi->get_voicemail_me_messages: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/voicemail/me/policy Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the current user's voicemail policy
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.VoicemailApi(); try: # Get the current user's voicemail policy api_response = api_instance.get_voicemail_me_policy() pprint(api_response) except ApiException as e: print("Exception when calling VoicemailApi->get_voicemail_me_policy: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/voicemail/me/policy Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update the current user's voicemail policy
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.VoicemailApi(); body = PureCloudPlatformClientV2.VoicemailUserPolicy() # VoicemailUserPolicy | The user's voicemail policy try: # Update the current user's voicemail policy api_response = api_instance.patch_voicemail_me_policy(body) pprint(api_response) except ApiException as e: print("Exception when calling VoicemailApi->patch_voicemail_me_policy: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/voicemail/messages Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete all voicemail messages
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.VoicemailApi(); try: # Delete all voicemail messages api_instance.delete_voicemail_messages() except ApiException as e: print("Exception when calling VoicemailApi->delete_voicemail_messages: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/voicemail/messages Genesys Cloud Python SDK.
Genesys describes this as an API used to: List voicemail messages
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.VoicemailApi(); ids = 'ids_example' # str | An optional comma separated list of VoicemailMessage ids (optional) expand = ['expand_example'] # list[str] | If the caller is a known user, which fields, if any, to expand (optional) try: # List voicemail messages api_response = api_instance.get_voicemail_messages(ids=ids, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling VoicemailApi->get_voicemail_messages: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/voicemail/messages Genesys Cloud Python SDK.
Genesys describes this as an API used to: Copy a voicemail message to a user or 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.VoicemailApi(); body = PureCloudPlatformClientV2.CopyVoicemailMessage() # CopyVoicemailMessage | (optional) try: # Copy a voicemail message to a user or group api_response = api_instance.post_voicemail_messages(body=body) pprint(api_response) except ApiException as e: print("Exception when calling VoicemailApi->post_voicemail_messages: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/voicemail/messages/{messageId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete a voicemail message. A user voicemail can only be deleted by its associated user. A group voicemail can only be deleted by a user that is a member of the group. A queue voicemail can only be deleted by a user with the acd voicemail delete permission.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.VoicemailApi(); message_id = 'message_id_example' # str | Message ID try: # Delete a voicemail message. api_instance.delete_voicemail_message(message_id) except ApiException as e: print("Exception when calling VoicemailApi->delete_voicemail_message: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/voicemail/messages/{messageId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a voicemail 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.VoicemailApi(); message_id = 'message_id_example' # str | Message ID expand = ['expand_example'] # list[str] | If the caller is a known user, which fields, if any, to expand (optional) try: # Get a voicemail message api_response = api_instance.get_voicemail_message(message_id, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling VoicemailApi->get_voicemail_message: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/voicemail/messages/{messageId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a voicemail message. A user voicemail can only be modified by its associated user. A group voicemail can only be modified by a user that is a member of the group. A queue voicemail can only be modified by a participant of the conversation the voicemail is associated with.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.VoicemailApi(); message_id = 'message_id_example' # str | Message ID body = PureCloudPlatformClientV2.VoicemailMessage() # VoicemailMessage | VoicemailMessage try: # Update a voicemail message api_response = api_instance.patch_voicemail_message(message_id, body) pprint(api_response) except ApiException as e: print("Exception when calling VoicemailApi->patch_voicemail_message: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/voicemail/messages/{messageId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a voicemail message. A user voicemail can only be modified by its associated user. A group voicemail can only be modified by a user that is a member of the group. A queue voicemail can only be modified by a participant of the conversation the voicemail is associated with.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.VoicemailApi(); message_id = 'message_id_example' # str | Message ID body = PureCloudPlatformClientV2.VoicemailMessage() # VoicemailMessage | VoicemailMessage try: # Update a voicemail message api_response = api_instance.put_voicemail_message(message_id, body) pprint(api_response) except ApiException as e: print("Exception when calling VoicemailApi->put_voicemail_message: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/voicemail/messages/{messageId}/media Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get media playback URI for this voicemail 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.VoicemailApi(); message_id = 'message_id_example' # str | Message ID format_id = ''WEBM'' # str | The desired media format. (optional) (default to 'WEBM') try: # Get media playback URI for this voicemail message api_response = api_instance.get_voicemail_message_media(message_id, format_id=format_id) pprint(api_response) except ApiException as e: print("Exception when calling VoicemailApi->get_voicemail_message_media: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/voicemail/policy Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a policy
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.VoicemailApi(); try: # Get a policy api_response = api_instance.get_voicemail_policy() pprint(api_response) except ApiException as e: print("Exception when calling VoicemailApi->get_voicemail_policy: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/voicemail/policy Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a policy
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.VoicemailApi(); body = PureCloudPlatformClientV2.VoicemailOrganizationPolicy() # VoicemailOrganizationPolicy | Policy try: # Update a policy api_response = api_instance.put_voicemail_policy(body) pprint(api_response) except ApiException as e: print("Exception when calling VoicemailApi->put_voicemail_policy: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/voicemail/queues/{queueId}/messages Genesys Cloud Python SDK.
Genesys describes this as an API used to: List voicemail messages
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.VoicemailApi(); queue_id = 'queue_id_example' # str | Queue ID page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) try: # List voicemail messages api_response = api_instance.get_voicemail_queue_messages(queue_id, page_size=page_size, page_number=page_number) pprint(api_response) except ApiException as e: print("Exception when calling VoicemailApi->get_voicemail_queue_messages: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/voicemail/search Genesys Cloud Python SDK.
Genesys describes this as an API used to: Search voicemails using the q64 value returned from a previous 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.VoicemailApi(); q64 = 'q64_example' # str | q64 expand = ['expand_example'] # list[str] | expand (optional) try: # Search voicemails using the q64 value returned from a previous search api_response = api_instance.get_voicemail_search(q64, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling VoicemailApi->get_voicemail_search: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/voicemail/search Genesys Cloud Python SDK.
Genesys describes this as an API used to: Search voicemails
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.VoicemailApi(); body = PureCloudPlatformClientV2.VoicemailSearchRequest() # VoicemailSearchRequest | Search request options try: # Search voicemails api_response = api_instance.post_voicemail_search(body) pprint(api_response) except ApiException as e: print("Exception when calling VoicemailApi->post_voicemail_search: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/voicemail/userpolicies/{userId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a user's voicemail policy
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.VoicemailApi(); user_id = 'user_id_example' # str | User ID try: # Get a user's voicemail policy api_response = api_instance.get_voicemail_userpolicy(user_id) pprint(api_response) except ApiException as e: print("Exception when calling VoicemailApi->get_voicemail_userpolicy: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/voicemail/userpolicies/{userId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a user's voicemail policy
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.VoicemailApi(); user_id = 'user_id_example' # str | User ID body = PureCloudPlatformClientV2.VoicemailUserPolicy() # VoicemailUserPolicy | The user's voicemail policy try: # Update a user's voicemail policy api_response = api_instance.patch_voicemail_userpolicy(user_id, body) pprint(api_response) except ApiException as e: print("Exception when calling VoicemailApi->patch_voicemail_userpolicy: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/voicemail/userpolicies/{userId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a user's voicemail policy
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.VoicemailApi(); user_id = 'user_id_example' # str | User ID body = PureCloudPlatformClientV2.VoicemailUserPolicy() # VoicemailUserPolicy | The user's voicemail policy try: # Update a user's voicemail policy api_response = api_instance.put_voicemail_userpolicy(user_id, body) pprint(api_response) except ApiException as e: print("Exception when calling VoicemailApi->put_voicemail_userpolicy: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/webdeployments/configurations Genesys Cloud Python SDK.
Genesys describes this as an API used to: View configuration drafts
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WebDeploymentsApi(); show_only_published = False # bool | Get only configuration drafts with published versions (optional) (default to False) try: # View configuration drafts api_response = api_instance.get_webdeployments_configurations(show_only_published=show_only_published) pprint(api_response) except ApiException as e: print("Exception when calling WebDeploymentsApi->get_webdeployments_configurations: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/webdeployments/configurations Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create a configuration draft
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WebDeploymentsApi(); configuration_version = PureCloudPlatformClientV2.WebDeploymentConfigurationVersion() # WebDeploymentConfigurationVersion | try: # Create a configuration draft api_response = api_instance.post_webdeployments_configurations(configuration_version) pprint(api_response) except ApiException as e: print("Exception when calling WebDeploymentsApi->post_webdeployments_configurations: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/webdeployments/configurations/{configurationId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete all versions of a configuration
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WebDeploymentsApi(); configuration_id = 'configuration_id_example' # str | The configuration version ID try: # Delete all versions of a configuration api_instance.delete_webdeployments_configuration(configuration_id) except ApiException as e: print("Exception when calling WebDeploymentsApi->delete_webdeployments_configuration: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/webdeployments/configurations/{configurationId}/versions Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the versions of a configuration. This returns the 50 most recent versions for this configuration
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WebDeploymentsApi(); configuration_id = 'configuration_id_example' # str | The configuration version ID try: # Get the versions of a configuration api_response = api_instance.get_webdeployments_configuration_versions(configuration_id) pprint(api_response) except ApiException as e: print("Exception when calling WebDeploymentsApi->get_webdeployments_configuration_versions: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/webdeployments/configurations/{configurationId}/versions/draft Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the configuration draft
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WebDeploymentsApi(); configuration_id = 'configuration_id_example' # str | The configuration version ID try: # Get the configuration draft api_response = api_instance.get_webdeployments_configuration_versions_draft(configuration_id) pprint(api_response) except ApiException as e: print("Exception when calling WebDeploymentsApi->get_webdeployments_configuration_versions_draft: %s\n" % e)```