instruction
stringlengths
81
221
input
stringlengths
50
1.19k
output
stringlengths
525
3.61k
Provide a Python example that uses the GET /api/v2/routing/sms/addresses Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a list of Addresses for SMS
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.RoutingApi(); page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) try: # Get a list of Addresses for SMS api_response = api_instance.get_routing_sms_addresses(page_size=page_size, page_number=page_number) pprint(api_response) except ApiException as e: print("Exception when calling RoutingApi->get_routing_sms_addresses: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/routing/sms/addresses Genesys Cloud Python SDK.
Genesys describes this as an API used to: Provision an Address for SMS
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.RoutingApi(); body = PureCloudPlatformClientV2.SmsAddressProvision() # SmsAddressProvision | SmsAddress try: # Provision an Address for SMS api_response = api_instance.post_routing_sms_addresses(body) pprint(api_response) except ApiException as e: print("Exception when calling RoutingApi->post_routing_sms_addresses: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/routing/sms/addresses/{addressId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete an Address by Id for SMS
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.RoutingApi(); address_id = 'address_id_example' # str | Address ID try: # Delete an Address by Id for SMS api_instance.delete_routing_sms_address(address_id) except ApiException as e: print("Exception when calling RoutingApi->delete_routing_sms_address: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/routing/sms/addresses/{addressId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get an Address by Id for SMS
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.RoutingApi(); address_id = 'address_id_example' # str | Address ID try: # Get an Address by Id for SMS api_response = api_instance.get_routing_sms_address(address_id) pprint(api_response) except ApiException as e: print("Exception when calling RoutingApi->get_routing_sms_address: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/routing/sms/availablephonenumbers Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a list of available phone numbers for SMS provisioning. This request will return up to 30 random phone numbers matching the criteria specified. To get additional phone numbers repeat the request.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.RoutingApi(); country_code = 'country_code_example' # str | The ISO 3166-1 alpha-2 country code of the county for which available phone numbers should be returned phone_number_type = 'phone_number_type_example' # str | Type of available phone numbers searched region = 'region_example' # str | Region/province/state that can be used to restrict the numbers returned (optional) city = 'city_example' # str | City that can be used to restrict the numbers returned (optional) area_code = 'area_code_example' # str | Area code that can be used to restrict the numbers returned (optional) pattern = 'pattern_example' # str | A pattern to match phone numbers. Valid characters are '*' and [0-9a-zA-Z]. The '*' character will match any single digit. (optional) address_requirement = 'address_requirement_example' # str | This indicates whether the phone number requires to have an Address registered. (optional) try: # Get a list of available phone numbers for SMS provisioning. api_response = api_instance.get_routing_sms_availablephonenumbers(country_code, phone_number_type, region=region, city=city, area_code=area_code, pattern=pattern, address_requirement=address_requirement) pprint(api_response) except ApiException as e: print("Exception when calling RoutingApi->get_routing_sms_availablephonenumbers: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/routing/sms/phonenumbers Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a list of provisioned phone numbers.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.RoutingApi(); phone_number = 'phone_number_example' # str | Filter on phone number address. Allowable characters are the digits '0-9' and the wild card character '\\*'. If just digits are present, a contains search is done on the address pattern. For example, '317' could be matched anywhere in the address. An '\\*' will match multiple digits. For example, to match a specific area code within the US a pattern like '1317*' could be used. (optional) phone_number_type = ['phone_number_type_example'] # list[str] | Filter on phone number type (optional) phone_number_status = ['phone_number_status_example'] # list[str] | Filter on phone number status (optional) country_code = ['country_code_example'] # list[str] | Filter on country code (optional) page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) sort_by = 'sort_by_example' # str | Optional field to sort results (optional) sort_order = 'sort_order_example' # str | Sort order (optional) language = ''en-US'' # str | A language tag (which is sometimes referred to as a \"locale identifier\") to use to localize country field and sort operations (optional) (default to 'en-US') integration_id = 'integration_id_example' # str | Filter on the Genesys Cloud integration id to which the phone number belongs to (optional) supported_content_id = 'supported_content_id_example' # str | Filter based on the supported content ID (optional) try: # Get a list of provisioned phone numbers. api_response = api_instance.get_routing_sms_phonenumbers(phone_number=phone_number, phone_number_type=phone_number_type, phone_number_status=phone_number_status, country_code=country_code, page_size=page_size, page_number=page_number, sort_by=sort_by, sort_order=sort_order, language=language, integration_id=integration_id, supported_content_id=supported_content_id) pprint(api_response) except ApiException as e: print("Exception when calling RoutingApi->get_routing_sms_phonenumbers: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/routing/sms/phonenumbers Genesys Cloud Python SDK.
Genesys describes this as an API used to: Provision a phone number for SMS
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.RoutingApi(); body = PureCloudPlatformClientV2.SmsPhoneNumberProvision() # SmsPhoneNumberProvision | SmsPhoneNumber try: # Provision a phone number for SMS api_response = api_instance.post_routing_sms_phonenumbers(body) pprint(api_response) except ApiException as e: print("Exception when calling RoutingApi->post_routing_sms_phonenumbers: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/routing/sms/phonenumbers/import Genesys Cloud Python SDK.
Genesys describes this as an API used to: Imports a phone number for SMS
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.RoutingApi(); body = PureCloudPlatformClientV2.SmsPhoneNumberImport() # SmsPhoneNumberImport | SmsPhoneNumber try: # Imports a phone number for SMS api_response = api_instance.post_routing_sms_phonenumbers_import(body) pprint(api_response) except ApiException as e: print("Exception when calling RoutingApi->post_routing_sms_phonenumbers_import: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/routing/sms/phonenumbers/{addressId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete a phone number provisioned for SMS.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.RoutingApi(); address_id = 'address_id_example' # str | Address ID try: # Delete a phone number provisioned for SMS. api_instance.delete_routing_sms_phonenumber(address_id) except ApiException as e: print("Exception when calling RoutingApi->delete_routing_sms_phonenumber: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/routing/sms/phonenumbers/{addressId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a phone number provisioned for SMS.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.RoutingApi(); address_id = 'address_id_example' # str | Address ID expand = 'expand_example' # str | Expand response with additional information (optional) try: # Get a phone number provisioned for SMS. api_response = api_instance.get_routing_sms_phonenumber(address_id, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling RoutingApi->get_routing_sms_phonenumber: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/routing/sms/phonenumbers/{addressId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a phone number provisioned for SMS.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.RoutingApi(); address_id = 'address_id_example' # str | Address ID body = PureCloudPlatformClientV2.SmsPhoneNumber() # SmsPhoneNumber | SmsPhoneNumber try: # Update a phone number provisioned for SMS. api_response = api_instance.put_routing_sms_phonenumber(address_id, body) pprint(api_response) except ApiException as e: print("Exception when calling RoutingApi->put_routing_sms_phonenumber: %s\n" % e)```
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 DELETE /api/v2/routing/utilization Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete the organization-wide max utilization settings and revert to the system 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.RoutingApi(); try: # Delete the organization-wide max utilization settings and revert to the system default. api_instance.delete_routing_utilization() except ApiException as e: print("Exception when calling RoutingApi->delete_routing_utilization: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/routing/utilization Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the organization-wide max utilization 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.RoutingApi(); try: # Get the organization-wide max utilization settings. api_response = api_instance.get_routing_utilization() pprint(api_response) except ApiException as e: print("Exception when calling RoutingApi->get_routing_utilization: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/routing/utilization Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update the organization-wide 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.RoutingApi(); body = PureCloudPlatformClientV2.UtilizationRequest() # UtilizationRequest | utilization try: # Update the organization-wide max utilization settings. Include only those media types requiring custom configuration. api_response = api_instance.put_routing_utilization(body) pprint(api_response) except ApiException as e: print("Exception when calling RoutingApi->put_routing_utilization: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/routing/utilization/labels Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get list of utilization labels
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.RoutingApi(); page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) sort_order = ''ascending'' # str | Sort order by name (optional) (default to 'ascending') name = 'name_example' # str | Utilization label's name (Wildcard is supported, e.g., 'label1*', '*label*' (optional) try: # Get list of utilization labels api_response = api_instance.get_routing_utilization_labels(page_size=page_size, page_number=page_number, sort_order=sort_order, name=name) pprint(api_response) except ApiException as e: print("Exception when calling RoutingApi->get_routing_utilization_labels: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/routing/utilization/labels Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create a utilization label
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.RoutingApi(); body = PureCloudPlatformClientV2.CreateUtilizationLabelRequest() # CreateUtilizationLabelRequest | UtilizationLabel try: # Create a utilization label api_response = api_instance.post_routing_utilization_labels(body) pprint(api_response) except ApiException as e: print("Exception when calling RoutingApi->post_routing_utilization_labels: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/routing/utilization/labels/{labelId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete a utilization label
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.RoutingApi(); label_id = 'label_id_example' # str | Utilization Label ID force_delete = False # bool | Remove all label usages (if found) without warning (optional) (default to False) try: # Delete a utilization label api_instance.delete_routing_utilization_label(label_id, force_delete=force_delete) except ApiException as e: print("Exception when calling RoutingApi->delete_routing_utilization_label: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/routing/utilization/labels/{labelId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get details about this utilization label
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.RoutingApi(); label_id = 'label_id_example' # str | Utilization Label ID try: # Get details about this utilization label api_response = api_instance.get_routing_utilization_label(label_id) pprint(api_response) except ApiException as e: print("Exception when calling RoutingApi->get_routing_utilization_label: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/routing/utilization/labels/{labelId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a utilization label
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.RoutingApi(); label_id = 'label_id_example' # str | Utilization Label ID body = PureCloudPlatformClientV2.UpdateUtilizationLabelRequest() # UpdateUtilizationLabelRequest | UtilizationLabel try: # Update a utilization label api_response = api_instance.put_routing_utilization_label(label_id, body) pprint(api_response) except ApiException as e: print("Exception when calling RoutingApi->put_routing_utilization_label: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/routing/utilization/labels/{labelId}/agents Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get list of agent ids associated with a utilization label
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.RoutingApi(); label_id = 'label_id_example' # str | Utilization Label ID try: # Get list of agent ids associated with a utilization label api_response = api_instance.get_routing_utilization_label_agents(label_id) pprint(api_response) except ApiException as e: print("Exception when calling RoutingApi->get_routing_utilization_label_agents: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/routing/wrapupcodes Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get list of wrapup codes.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.RoutingApi(); page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) sort_by = ''name'' # str | Sort by (optional) (default to 'name') sort_order = ''ascending'' # str | Sort order (optional) (default to 'ascending') name = 'name_example' # str | Wrapup code's name ('Sort by' param is ignored unless this field is provided) (optional) id = ['id_example'] # list[str] | Filter by wrapup code ID(s) (optional) division_id = ['division_id_example'] # list[str] | Filter by division ID(s) (optional) try: # Get list of wrapup codes. api_response = api_instance.get_routing_wrapupcodes(page_size=page_size, page_number=page_number, sort_by=sort_by, sort_order=sort_order, name=name, id=id, division_id=division_id) pprint(api_response) except ApiException as e: print("Exception when calling RoutingApi->get_routing_wrapupcodes: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/routing/wrapupcodes Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create a wrap-up code
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.RoutingApi(); body = PureCloudPlatformClientV2.WrapupCodeRequest() # WrapupCodeRequest | WrapupCode try: # Create a wrap-up code api_response = api_instance.post_routing_wrapupcodes(body) pprint(api_response) except ApiException as e: print("Exception when calling RoutingApi->post_routing_wrapupcodes: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/routing/wrapupcodes/divisionviews Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a paged listing of simplified wrapup code objects, filterable by name, wrapup code ID(s), or division ID(s). Specifying both name and ID parameters is not supported.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.RoutingApi(); page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) name = 'name_example' # str | Name (trailing asterisks allowed) (optional) id = ['id_example'] # list[str] | Wrapup code ID(s) (optional) division_id = ['division_id_example'] # list[str] | Division ID(s) (optional) include_state = 'include_state_example' # str | Wrapup code state(s) to include (optional) try: # Get a paged listing of simplified wrapup code objects, filterable by name, wrapup code ID(s), or division ID(s). api_response = api_instance.get_routing_wrapupcodes_divisionviews(page_size=page_size, page_number=page_number, name=name, id=id, division_id=division_id, include_state=include_state) pprint(api_response) except ApiException as e: print("Exception when calling RoutingApi->get_routing_wrapupcodes_divisionviews: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/routing/wrapupcodes/divisionviews/{codeId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a simplified wrap-up code.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.RoutingApi(); code_id = 'code_id_example' # str | Wrapup Code ID try: # Get a simplified wrap-up code. api_response = api_instance.get_routing_wrapupcodes_divisionview(code_id) pprint(api_response) except ApiException as e: print("Exception when calling RoutingApi->get_routing_wrapupcodes_divisionview: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/routing/wrapupcodes/{codeId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete wrap-up code
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.RoutingApi(); code_id = 'code_id_example' # str | Wrapup Code ID try: # Delete wrap-up code api_instance.delete_routing_wrapupcode(code_id) except ApiException as e: print("Exception when calling RoutingApi->delete_routing_wrapupcode: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/routing/wrapupcodes/{codeId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get details about this wrap-up code.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.RoutingApi(); code_id = 'code_id_example' # str | Wrapup Code ID try: # Get details about this wrap-up code. api_response = api_instance.get_routing_wrapupcode(code_id) pprint(api_response) except ApiException as e: print("Exception when calling RoutingApi->get_routing_wrapupcode: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/routing/wrapupcodes/{codeId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update wrap-up code
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.RoutingApi(); code_id = 'code_id_example' # str | Wrapup Code ID body = PureCloudPlatformClientV2.WrapupCodeRequest() # WrapupCodeRequest | WrapupCode try: # Update wrap-up code api_response = api_instance.put_routing_wrapupcode(code_id, body) pprint(api_response) except ApiException as e: print("Exception when calling RoutingApi->put_routing_wrapupcode: %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}/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/scim/groups Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a list of groups
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.SCIMApi(); start_index = 1 # int | The 1-based index of the first query result. (optional) (default to 1) count = 25 # int | The requested number of items per page. A value of 0 returns \"totalResults\". A page size over 25 may exceed internal resource limits and return a 429 error. For a page size over 25, use the \"excludedAttributes\" or \"attributes\" query parameters to exclude or only include secondary lookup values such as \"externalId\", \"roles\", \"urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User:routingLanguages\", or \"urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User:routingSkills\". (optional) (default to 25) attributes = ['attributes_example'] # list[str] | Indicates which attributes to include. Returns these attributes and the \"id\", \"active\", and \"meta\" attributes. Use \"attributes\" to avoid expensive secondary calls for the default attributes. (optional) excluded_attributes = ['excluded_attributes_example'] # list[str] | Indicates which attributes to exclude. Returns the default attributes minus \"excludedAttributes\". Always returns \"id\", \"active\", and \"meta\" attributes. Use \"excludedAttributes\" to avoid expensive secondary calls for the default attributes. (optional) filter = 'displayName eq groupName' # str | Filters results. If nothing is specified, returns all groups. Examples of valid values: \"id eq 5f4bc742-a019-4e38-8e2a-d39d5bc0b0f3\", \"displayname eq Sales\". (optional) try: # Get a list of groups api_response = api_instance.get_scim_groups(start_index=start_index, count=count, attributes=attributes, excluded_attributes=excluded_attributes, filter=filter) pprint(api_response) except ApiException as e: print("Exception when calling SCIMApi->get_scim_groups: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/scim/groups/{groupId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a 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.SCIMApi(); group_id = 'group_id_example' # str | The ID of a group. Returned with GET /api/v2/scim/groups. attributes = ['attributes_example'] # list[str] | Indicates which attributes to include. Returns these attributes and the \"id\", \"active\", and \"meta\" attributes. Use \"attributes\" to avoid expensive secondary calls for the default attributes. (optional) excluded_attributes = ['excluded_attributes_example'] # list[str] | Indicates which attributes to exclude. Returns the default attributes minus \"excludedAttributes\". Always returns \"id\", \"active\", and \"meta\" attributes. Use \"excludedAttributes\" to avoid expensive secondary calls for the default attributes. (optional) if_none_match = 'if_none_match_example' # str | The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/groups/{groupId}. Example: \"42\". If the ETag is different from the version on the server, returns the current configuration of the resource. If the ETag is current, returns 304 Not Modified. (optional) try: # Get a group api_response = api_instance.get_scim_group(group_id, attributes=attributes, excluded_attributes=excluded_attributes, if_none_match=if_none_match) pprint(api_response) except ApiException as e: print("Exception when calling SCIMApi->get_scim_group: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/scim/groups/{groupId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Modify a 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.SCIMApi(); group_id = 'group_id_example' # str | The ID of a group. Returned with GET /api/v2/scim/groups. body = PureCloudPlatformClientV2.ScimV2PatchRequest() # ScimV2PatchRequest | The information used to modify a group. if_match = 'if_match_example' # str | The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/groups/{groupId}. Example: \"42\". If the ETag is different from the version on the server, returns 400 with a \"scimType\" of \"invalidVers\". (optional) try: # Modify a group api_response = api_instance.patch_scim_group(group_id, body, if_match=if_match) pprint(api_response) except ApiException as e: print("Exception when calling SCIMApi->patch_scim_group: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/scim/groups/{groupId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Replace a 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.SCIMApi(); group_id = 'group_id_example' # str | The ID of a group. Returned with GET /api/v2/scim/groups. body = PureCloudPlatformClientV2.ScimV2Group() # ScimV2Group | The information used to replace a group. if_match = 'if_match_example' # str | The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/groups/{groupId}. Example: \"42\". If the ETag is different from the version on the server, returns 400 with a \"scimType\" of \"invalidVers\". (optional) try: # Replace a group api_response = api_instance.put_scim_group(group_id, body, if_match=if_match) pprint(api_response) except ApiException as e: print("Exception when calling SCIMApi->put_scim_group: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/scim/resourcetypes Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a list of resource types
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.SCIMApi(); try: # Get a list of resource types api_response = api_instance.get_scim_resourcetypes() pprint(api_response) except ApiException as e: print("Exception when calling SCIMApi->get_scim_resourcetypes: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/scim/resourcetypes/{resourceType} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a resource type
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.SCIMApi(); resource_type = 'resource_type_example' # str | The type of resource. Returned with GET /api/v2/scim/resourcetypes. try: # Get a resource type api_response = api_instance.get_scim_resourcetype(resource_type) pprint(api_response) except ApiException as e: print("Exception when calling SCIMApi->get_scim_resourcetype: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/scim/schemas Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a list of SCIM schemas
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.SCIMApi(); filter = 'displayName eq groupName' # str | Filtered results are invalid and return 403 Unauthorized. (optional) try: # Get a list of SCIM schemas api_response = api_instance.get_scim_schemas(filter=filter) pprint(api_response) except ApiException as e: print("Exception when calling SCIMApi->get_scim_schemas: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/scim/schemas/{schemaId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a SCIM schema
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.SCIMApi(); schema_id = 'schema_id_example' # str | The ID of a schema. Returned with GET /api/v2/scim/schemas. try: # Get a SCIM schema api_response = api_instance.get_scim_schema(schema_id) pprint(api_response) except ApiException as e: print("Exception when calling SCIMApi->get_scim_schema: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/scim/serviceproviderconfig Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a service provider's 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.SCIMApi(); if_none_match = 'if_none_match_example' # str | The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/serviceproviderconfig. Example: \"42\". If the ETag is different from the version on the server, returns the current configuration of the resource. If the ETag is current, returns 304 Not Modified. (optional) try: # Get a service provider's configuration api_response = api_instance.get_scim_serviceproviderconfig(if_none_match=if_none_match) pprint(api_response) except ApiException as e: print("Exception when calling SCIMApi->get_scim_serviceproviderconfig: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/scim/users Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a list of users. To return all active users, do not use the filter parameter. To return inactive users, set the filter parameter to "active eq false". By default, returns SCIM attributes "externalId", "enterprise-user:manager", and "roles". To exclude these attributes, set the attributes parameter to "id,active" or the excludeAttributes parameter to "externalId,roles,urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:division".
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.SCIMApi(); start_index = 1 # int | The 1-based index of the first query result. (optional) (default to 1) count = 25 # int | The requested number of items per page. A value of 0 returns \"totalResults\". A page size over 25 may exceed internal resource limits and return a 429 error. For a page size over 25, use the \"excludedAttributes\" or \"attributes\" query parameters to exclude or only include secondary lookup values such as \"externalId\", \"roles\", \"urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User:routingLanguages\", or \"urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User:routingSkills\". (optional) (default to 25) attributes = ['attributes_example'] # list[str] | Indicates which attributes to include. Returns these attributes and the \"id\", \"userName\", \"active\", and \"meta\" attributes. Use \"attributes\" to avoid expensive secondary calls for the default attributes. (optional) excluded_attributes = ['excluded_attributes_example'] # list[str] | Indicates which attributes to exclude. Returns the default attributes minus \"excludedAttributes\". Always returns the \"id\", \"userName\", \"active\", and \"meta\" attributes. Use \"excludedAttributes\" to avoid expensive secondary calls for the default attributes. (optional) filter = 'filter_example' # str | Filters results. If nothing is specified, returns all active users. Examples of valid values: \"id eq 857449b0-d9e7-4cd0-acbf-a6adfb9ef1e9\", \"userName eq [email protected]\", \"manager eq 16e10e2f-1136-43fe-bb84-eac073168a49\", \"email eq [email protected]\", \"division eq divisionName\", \"externalId eq 167844\", \"active eq false\", \"employeeNumber eq 9876543210\". (optional) try: # Get a list of users api_response = api_instance.get_scim_users(start_index=start_index, count=count, attributes=attributes, excluded_attributes=excluded_attributes, filter=filter) pprint(api_response) except ApiException as e: print("Exception when calling SCIMApi->get_scim_users: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/scim/users Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create 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.SCIMApi(); body = PureCloudPlatformClientV2.ScimV2CreateUser() # ScimV2CreateUser | The information used to create a user. try: # Create a user api_response = api_instance.post_scim_users(body) pprint(api_response) except ApiException as e: print("Exception when calling SCIMApi->post_scim_users: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/scim/users/{userId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete 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.SCIMApi(); user_id = 'user_id_example' # str | The ID of a user. Returned with GET /api/v2/scim/users. if_match = 'if_match_example' # str | The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/users/{userId}. Example: \"42\". If the ETag is different from the version on the server, returns 400 with a \"scimType\" of \"invalidVers\". (optional) try: # Delete a user api_response = api_instance.delete_scim_user(user_id, if_match=if_match) pprint(api_response) except ApiException as e: print("Exception when calling SCIMApi->delete_scim_user: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/scim/users/{userId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get 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.SCIMApi(); user_id = 'user_id_example' # str | The ID of a user. Returned with GET /api/v2/scim/users. attributes = ['attributes_example'] # list[str] | Indicates which attributes to include. Returns these attributes and the \"id\", \"userName\", \"active\", and \"meta\" attributes. Use \"attributes\" to avoid expensive secondary calls for the default attributes. (optional) excluded_attributes = ['excluded_attributes_example'] # list[str] | Indicates which attributes to exclude. Returns the default attributes minus \"excludedAttributes\". Always returns the \"id\", \"userName\", \"active\", and \"meta\" attributes. Use \"excludedAttributes\" to avoid expensive secondary calls for the default attributes. (optional) if_none_match = 'if_none_match_example' # str | The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/users/{userId}. Example: \"42\". If the ETag is different from the version on the server, returns the current configuration of the resource. If the ETag is current, returns 304 Not Modified. (optional) try: # Get a user api_response = api_instance.get_scim_user(user_id, attributes=attributes, excluded_attributes=excluded_attributes, if_none_match=if_none_match) pprint(api_response) except ApiException as e: print("Exception when calling SCIMApi->get_scim_user: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/scim/users/{userId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Modify 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.SCIMApi(); user_id = 'user_id_example' # str | The ID of a user. Returned with GET /api/v2/scim/users. body = PureCloudPlatformClientV2.ScimV2PatchRequest() # ScimV2PatchRequest | The information used to modify a user. if_match = 'if_match_example' # str | The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/users/{userId}. Example: \"42\". If the ETag is different from the version on the server, returns 400 with a \"scimType\" of \"invalidVers\". (optional) try: # Modify a user api_response = api_instance.patch_scim_user(user_id, body, if_match=if_match) pprint(api_response) except ApiException as e: print("Exception when calling SCIMApi->patch_scim_user: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/scim/users/{userId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Replace 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.SCIMApi(); user_id = 'user_id_example' # str | The ID of a user. Returned with GET /api/v2/scim/users. body = PureCloudPlatformClientV2.ScimV2User() # ScimV2User | The information used to replace a user. if_match = 'if_match_example' # str | The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/users/{userId}. Example: \"42\". If the ETag is different from the version on the server, returns 400 with a \"scimType\" of \"invalidVers\". (optional) try: # Replace a user api_response = api_instance.put_scim_user(user_id, body, if_match=if_match) pprint(api_response) except ApiException as e: print("Exception when calling SCIMApi->put_scim_user: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/scim/v2/groups Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a list of groups
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.SCIMApi(); filter = 'displayName eq groupName' # str | Filters results. If nothing is specified, returns all groups. Examples of valid values: \"id eq 5f4bc742-a019-4e38-8e2a-d39d5bc0b0f3\", \"displayname eq Sales\". start_index = 1 # int | The 1-based index of the first query result. (optional) (default to 1) count = 25 # int | The requested number of items per page. A value of 0 returns \"totalResults\". A page size over 25 may exceed internal resource limits and return a 429 error. For a page size over 25, use the \"excludedAttributes\" or \"attributes\" query parameters to exclude or only include secondary lookup values such as \"externalId\", \"roles\", \"urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User:routingLanguages\", or \"urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User:routingSkills\". (optional) (default to 25) attributes = ['attributes_example'] # list[str] | Indicates which attributes to include. Returns these attributes and the \"id\", \"active\", and \"meta\" attributes. Use \"attributes\" to avoid expensive secondary calls for the default attributes. (optional) excluded_attributes = ['excluded_attributes_example'] # list[str] | Indicates which attributes to exclude. Returns the default attributes minus \"excludedAttributes\". Always returns \"id\", \"active\", and \"meta\" attributes. Use \"excludedAttributes\" to avoid expensive secondary calls for the default attributes. (optional) try: # Get a list of groups api_response = api_instance.get_scim_v2_groups(filter, start_index=start_index, count=count, attributes=attributes, excluded_attributes=excluded_attributes) pprint(api_response) except ApiException as e: print("Exception when calling SCIMApi->get_scim_v2_groups: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/scim/v2/groups/{groupId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a 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.SCIMApi(); group_id = 'group_id_example' # str | The ID of a group. Returned with GET /api/v2/scim/v2/groups. attributes = ['attributes_example'] # list[str] | Indicates which attributes to include. Returns these attributes and the \"id\", \"active\", and \"meta\" attributes. Use \"attributes\" to avoid expensive secondary calls for the default attributes. (optional) excluded_attributes = ['excluded_attributes_example'] # list[str] | Indicates which attributes to exclude. Returns the default attributes minus \"excludedAttributes\". Always returns \"id\", \"active\", and \"meta\" attributes. Use \"excludedAttributes\" to avoid expensive secondary calls for the default attributes. (optional) if_none_match = 'if_none_match_example' # str | The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/v2/groups/{groupId}. Example: \"42\". If the ETag is different from the version on the server, returns the current configuration of the resource. If the ETag is current, returns 304 Not Modified. (optional) try: # Get a group api_response = api_instance.get_scim_v2_group(group_id, attributes=attributes, excluded_attributes=excluded_attributes, if_none_match=if_none_match) pprint(api_response) except ApiException as e: print("Exception when calling SCIMApi->get_scim_v2_group: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/scim/v2/groups/{groupId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Modify a 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.SCIMApi(); group_id = 'group_id_example' # str | The ID of a group. Returned with GET /api/v2/scim/v2/groups. body = PureCloudPlatformClientV2.ScimV2PatchRequest() # ScimV2PatchRequest | The information used to modify a group. if_match = 'if_match_example' # str | The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/v2/groups/{groupId}. Example: \"42\". If the ETag is different from the version on the server, returns 400 with a \"scimType\" of \"invalidVers\". (optional) try: # Modify a group api_response = api_instance.patch_scim_v2_group(group_id, body, if_match=if_match) pprint(api_response) except ApiException as e: print("Exception when calling SCIMApi->patch_scim_v2_group: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/scim/v2/groups/{groupId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Replace a 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.SCIMApi(); group_id = 'group_id_example' # str | The ID of a group. Returned with GET /api/v2/scim/v2/groups. body = PureCloudPlatformClientV2.ScimV2Group() # ScimV2Group | The information used to replace a group. if_match = 'if_match_example' # str | The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/v2/groups/{groupId}. Example: \"42\". If the ETag is different from the version on the server, returns 400 with a \"scimType\" of \"invalidVers\". (optional) try: # Replace a group api_response = api_instance.put_scim_v2_group(group_id, body, if_match=if_match) pprint(api_response) except ApiException as e: print("Exception when calling SCIMApi->put_scim_v2_group: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/scim/v2/resourcetypes Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a list of resource types
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.SCIMApi(); try: # Get a list of resource types api_response = api_instance.get_scim_v2_resourcetypes() pprint(api_response) except ApiException as e: print("Exception when calling SCIMApi->get_scim_v2_resourcetypes: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/scim/v2/resourcetypes/{resourceType} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a resource type
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.SCIMApi(); resource_type = 'resource_type_example' # str | The type of resource. Returned with GET /api/v2/scim/v2/resourcetypes. try: # Get a resource type api_response = api_instance.get_scim_v2_resourcetype(resource_type) pprint(api_response) except ApiException as e: print("Exception when calling SCIMApi->get_scim_v2_resourcetype: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/scim/v2/schemas Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a list of SCIM schemas
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.SCIMApi(); filter = 'displayName eq groupName' # str | Filtered results are invalid and return 403 Unauthorized. (optional) try: # Get a list of SCIM schemas api_response = api_instance.get_scim_v2_schemas(filter=filter) pprint(api_response) except ApiException as e: print("Exception when calling SCIMApi->get_scim_v2_schemas: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/scim/v2/schemas/{schemaId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a SCIM schema
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.SCIMApi(); schema_id = 'schema_id_example' # str | The ID of a schema. Returned with GET /api/v2/scim/v2/schemas. try: # Get a SCIM schema api_response = api_instance.get_scim_v2_schema(schema_id) pprint(api_response) except ApiException as e: print("Exception when calling SCIMApi->get_scim_v2_schema: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/scim/v2/serviceproviderconfig Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a service provider's 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.SCIMApi(); if_none_match = 'if_none_match_example' # str | The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/v2/serviceproviderconfig. Example: \"42\". If the ETag is different from the version on the server, returns the current configuration of the resource. If the ETag is current, returns 304 Not Modified. (optional) try: # Get a service provider's configuration api_response = api_instance.get_scim_v2_serviceproviderconfig(if_none_match=if_none_match) pprint(api_response) except ApiException as e: print("Exception when calling SCIMApi->get_scim_v2_serviceproviderconfig: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/scim/v2/users Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a list of users. To return all active users, do not use the filter parameter. To return inactive users, set the filter parameter to "active eq false". By default, returns SCIM attributes "externalId", "enterprise-user:manager", and "roles". To exclude these attributes, set the attributes parameter to "id,active" or the excludeAttributes parameter to "externalId,roles,urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:division".
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.SCIMApi(); start_index = 1 # int | The 1-based index of the first query result. (optional) (default to 1) count = 25 # int | The requested number of items per page. A value of 0 returns \"totalResults\". A page size over 25 may exceed internal resource limits and return a 429 error. For a page size over 25, use the \"excludedAttributes\" or \"attributes\" query parameters to exclude or only include secondary lookup values such as \"externalId\", \"roles\", \"urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User:routingLanguages\", or \"urn:ietf:params:scim:schemas:extension:genesys:purecloud:2.0:User:routingSkills\". (optional) (default to 25) attributes = ['attributes_example'] # list[str] | Indicates which attributes to include. Returns these attributes and the \"id\", \"userName\", \"active\", and \"meta\" attributes. Use \"attributes\" to avoid expensive secondary calls for the default attributes. (optional) excluded_attributes = ['excluded_attributes_example'] # list[str] | Indicates which attributes to exclude. Returns the default attributes minus \"excludedAttributes\". Always returns the \"id\", \"userName\", \"active\", and \"meta\" attributes. Use \"excludedAttributes\" to avoid expensive secondary calls for the default attributes. (optional) filter = 'filter_example' # str | Filters results. If nothing is specified, returns all active users. Examples of valid values: \"id eq 857449b0-d9e7-4cd0-acbf-a6adfb9ef1e9\", \"userName eq [email protected]\", \"manager eq 16e10e2f-1136-43fe-bb84-eac073168a49\", \"email eq [email protected]\", \"division eq divisionName\", \"externalId eq 167844\", \"active eq false\", \"employeeNumber eq 9876543210\". (optional) try: # Get a list of users api_response = api_instance.get_scim_v2_users(start_index=start_index, count=count, attributes=attributes, excluded_attributes=excluded_attributes, filter=filter) pprint(api_response) except ApiException as e: print("Exception when calling SCIMApi->get_scim_v2_users: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/scim/v2/users Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create 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.SCIMApi(); body = PureCloudPlatformClientV2.ScimV2CreateUser() # ScimV2CreateUser | The information used to create a user. try: # Create a user api_response = api_instance.post_scim_v2_users(body) pprint(api_response) except ApiException as e: print("Exception when calling SCIMApi->post_scim_v2_users: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/scim/v2/users/{userId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete 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.SCIMApi(); user_id = 'user_id_example' # str | The ID of a user. Returned with GET /api/v2/scim/v2/users. if_match = 'if_match_example' # str | The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/v2/users/{userId}. Example: \"42\". If the ETag is different from the version on the server, returns 400 with a \"scimType\" of \"invalidVers\". (optional) try: # Delete a user api_response = api_instance.delete_scim_v2_user(user_id, if_match=if_match) pprint(api_response) except ApiException as e: print("Exception when calling SCIMApi->delete_scim_v2_user: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/scim/v2/users/{userId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get 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.SCIMApi(); user_id = 'user_id_example' # str | The ID of a user. Returned with GET /api/v2/scim/v2/users. attributes = ['attributes_example'] # list[str] | Indicates which attributes to include. Returns these attributes and the \"id\", \"userName\", \"active\", and \"meta\" attributes. Use \"attributes\" to avoid expensive secondary calls for the default attributes. (optional) excluded_attributes = ['excluded_attributes_example'] # list[str] | Indicates which attributes to exclude. Returns the default attributes minus \"excludedAttributes\". Always returns the \"id\", \"userName\", \"active\", and \"meta\" attributes. Use \"excludedAttributes\" to avoid expensive secondary calls for the default attributes. (optional) if_none_match = 'if_none_match_example' # str | The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/v2/users/{userId}. Example: \"42\". If the ETag is different from the version on the server, returns the current configuration of the resource. If the ETag is current, returns 304 Not Modified. (optional) try: # Get a user api_response = api_instance.get_scim_v2_user(user_id, attributes=attributes, excluded_attributes=excluded_attributes, if_none_match=if_none_match) pprint(api_response) except ApiException as e: print("Exception when calling SCIMApi->get_scim_v2_user: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/scim/v2/users/{userId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Modify 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.SCIMApi(); user_id = 'user_id_example' # str | The ID of a user. Returned with GET /api/v2/scim/v2/users. body = PureCloudPlatformClientV2.ScimV2PatchRequest() # ScimV2PatchRequest | The information used to modify a user. if_match = 'if_match_example' # str | The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/v2/users/{userId}. Example: \"42\". If the ETag is different from the version on the server, returns 400 with a \"scimType\" of \"invalidVers\". (optional) try: # Modify a user api_response = api_instance.patch_scim_v2_user(user_id, body, if_match=if_match) pprint(api_response) except ApiException as e: print("Exception when calling SCIMApi->patch_scim_v2_user: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/scim/v2/users/{userId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Replace 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.SCIMApi(); user_id = 'user_id_example' # str | The ID of a user. Returned with GET /api/v2/scim/v2/users. body = PureCloudPlatformClientV2.ScimV2User() # ScimV2User | The information used to replace a user. if_match = 'if_match_example' # str | The ETag of a resource in double quotes. Returned as header and meta.version with initial call to GET /api/v2/scim/v2/users/{userId}. Example: \"42\". If the ETag is different from the version on the server, returns 400 with a \"scimType\" of \"invalidVers\". (optional) try: # Replace a user api_response = api_instance.put_scim_v2_user(user_id, body, if_match=if_match) pprint(api_response) except ApiException as e: print("Exception when calling SCIMApi->put_scim_v2_user: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/screenrecording/token Genesys Cloud Python SDK.
Genesys describes this as an API used to: Sign identifying information for screen recording
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ScreenRecordingApi(); body = PureCloudPlatformClientV2.ScreenRecordingUserAuthenticatedInfo() # ScreenRecordingUserAuthenticatedInfo | (optional) try: # Sign identifying information for screen recording api_response = api_instance.post_screenrecording_token(body=body) pprint(api_response) except ApiException as e: print("Exception when calling ScreenRecordingApi->post_screenrecording_token: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/scripts Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the list of scripts
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ScriptsApi(); page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) expand = 'expand_example' # str | Expand (optional) name = 'name_example' # str | Name filter (optional) feature = 'feature_example' # str | Feature filter (optional) flow_id = 'flow_id_example' # str | Secure flow id filter (optional) sort_by = 'sort_by_example' # str | SortBy (optional) sort_order = 'sort_order_example' # str | SortOrder (optional) script_data_version = 'script_data_version_example' # str | Advanced usage - controls the data version of the script (optional) division_ids = 'division_ids_example' # str | Filters scripts to requested divisionIds (optional) try: # Get the list of scripts api_response = api_instance.get_scripts(page_size=page_size, page_number=page_number, expand=expand, name=name, feature=feature, flow_id=flow_id, sort_by=sort_by, sort_order=sort_order, script_data_version=script_data_version, division_ids=division_ids) pprint(api_response) except ApiException as e: print("Exception when calling ScriptsApi->get_scripts: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/scripts/divisionviews Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the metadata for a list of scripts
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ScriptsApi(); page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) expand = 'expand_example' # str | Expand (optional) name = 'name_example' # str | Name filter (optional) feature = 'feature_example' # str | Feature filter (optional) flow_id = 'flow_id_example' # str | Secure flow id filter (optional) sort_by = 'sort_by_example' # str | SortBy (optional) sort_order = 'sort_order_example' # str | SortOrder (optional) script_data_version = 'script_data_version_example' # str | Advanced usage - controls the data version of the script (optional) division_ids = 'division_ids_example' # str | Filters scripts to requested divisionIds (optional) try: # Get the metadata for a list of scripts api_response = api_instance.get_scripts_divisionviews(page_size=page_size, page_number=page_number, expand=expand, name=name, feature=feature, flow_id=flow_id, sort_by=sort_by, sort_order=sort_order, script_data_version=script_data_version, division_ids=division_ids) pprint(api_response) except ApiException as e: print("Exception when calling ScriptsApi->get_scripts_divisionviews: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/scripts/published Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the published scripts.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ScriptsApi(); page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) expand = 'expand_example' # str | Expand (optional) name = 'name_example' # str | Name filter (optional) feature = 'feature_example' # str | Feature filter (optional) flow_id = 'flow_id_example' # str | Secure flow id filter (optional) script_data_version = 'script_data_version_example' # str | Advanced usage - controls the data version of the script (optional) division_ids = 'division_ids_example' # str | Filters scripts to requested divisionIds (optional) try: # Get the published scripts. api_response = api_instance.get_scripts_published(page_size=page_size, page_number=page_number, expand=expand, name=name, feature=feature, flow_id=flow_id, script_data_version=script_data_version, division_ids=division_ids) pprint(api_response) except ApiException as e: print("Exception when calling ScriptsApi->get_scripts_published: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/scripts/published Genesys Cloud Python SDK.
Genesys describes this as an API used to: Publish a script.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ScriptsApi(); script_data_version = 'script_data_version_example' # str | Advanced usage - controls the data version of the script (optional) body = PureCloudPlatformClientV2.PublishScriptRequestData() # PublishScriptRequestData | body (optional) try: # Publish a script. api_response = api_instance.post_scripts_published(script_data_version=script_data_version, body=body) pprint(api_response) except ApiException as e: print("Exception when calling ScriptsApi->post_scripts_published: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/scripts/published/divisionviews Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the published scripts metadata.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ScriptsApi(); page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) expand = 'expand_example' # str | Expand (optional) name = 'name_example' # str | Name filter (optional) feature = 'feature_example' # str | Feature filter (optional) flow_id = 'flow_id_example' # str | Secure flow id filter (optional) script_data_version = 'script_data_version_example' # str | Advanced usage - controls the data version of the script (optional) division_ids = 'division_ids_example' # str | Filters scripts to requested divisionIds (optional) try: # Get the published scripts metadata. api_response = api_instance.get_scripts_published_divisionviews(page_size=page_size, page_number=page_number, expand=expand, name=name, feature=feature, flow_id=flow_id, script_data_version=script_data_version, division_ids=division_ids) pprint(api_response) except ApiException as e: print("Exception when calling ScriptsApi->get_scripts_published_divisionviews: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/scripts/published/{scriptId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the published script.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ScriptsApi(); script_id = 'script_id_example' # str | Script ID script_data_version = 'script_data_version_example' # str | Advanced usage - controls the data version of the script (optional) try: # Get the list of published pages api_response = api_instance.get_scripts_published_script_id_pages(script_id, script_data_version=script_data_version) pprint(api_response) except ApiException as e: print("Exception when calling ScriptsApi->get_scripts_published_script_id_pages: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/scripts/published/{scriptId}/pages Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the list of published pages
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ScriptsApi(); script_id = 'script_id_example' # str | Script ID page_id = 'page_id_example' # str | Page ID script_data_version = 'script_data_version_example' # str | Advanced usage - controls the data version of the script (optional) try: # Get the published page. api_response = api_instance.get_scripts_published_script_id_page(script_id, page_id, script_data_version=script_data_version) pprint(api_response) except ApiException as e: print("Exception when calling ScriptsApi->get_scripts_published_script_id_page: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/scripts/published/{scriptId}/pages/{pageId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the published page.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ScriptsApi(); script_id = 'script_id_example' # str | Script ID input = 'input_example' # str | input (optional) output = 'output_example' # str | output (optional) type = 'type_example' # str | type (optional) script_data_version = 'script_data_version_example' # str | Advanced usage - controls the data version of the script (optional) try: # Get the published variables api_response = api_instance.get_scripts_published_script_id_variables(script_id, input=input, output=output, type=type, script_data_version=script_data_version) pprint(api_response) except ApiException as e: print("Exception when calling ScriptsApi->get_scripts_published_script_id_variables: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/scripts/published/{scriptId}/variables Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the published variables
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ScriptsApi(); upload_id = 'upload_id_example' # str | Upload ID long_poll = False # bool | Enable longPolling endpoint (optional) (default to False) try: # Get the upload status of an imported script api_response = api_instance.get_scripts_upload_status(upload_id, long_poll=long_poll) pprint(api_response) except ApiException as e: print("Exception when calling ScriptsApi->get_scripts_upload_status: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/scripts/uploads/{uploadId}/status Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the upload status of an imported script
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ScriptsApi(); script_id = 'script_id_example' # str | Script ID try: # Get a script api_response = api_instance.get_script(script_id) pprint(api_response) except ApiException as e: print("Exception when calling ScriptsApi->get_script: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/scripts/{scriptId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a script
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ScriptsApi(); script_id = 'script_id_example' # str | Script ID body = PureCloudPlatformClientV2.ExportScriptRequest() # ExportScriptRequest | (optional) try: # Export a script via download service. api_response = api_instance.post_script_export(script_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling ScriptsApi->post_script_export: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/scripts/{scriptId}/export Genesys Cloud Python SDK.
Genesys describes this as an API used to: Export a script via download service.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ScriptsApi(); script_id = 'script_id_example' # str | Script ID script_data_version = 'script_data_version_example' # str | Advanced usage - controls the data version of the script (optional) try: # Get the list of pages api_response = api_instance.get_script_pages(script_id, script_data_version=script_data_version) pprint(api_response) except ApiException as e: print("Exception when calling ScriptsApi->get_script_pages: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/scripts/{scriptId}/pages Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the list of pages
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ScriptsApi(); script_id = 'script_id_example' # str | Script ID page_id = 'page_id_example' # str | Page ID script_data_version = 'script_data_version_example' # str | Advanced usage - controls the data version of the script (optional) try: # Get a page api_response = api_instance.get_script_page(script_id, page_id, script_data_version=script_data_version) pprint(api_response) except ApiException as e: print("Exception when calling ScriptsApi->get_script_page: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/analytics/conversations/transcripts/query Genesys Cloud Python SDK.
Genesys describes this as an API used to: Search resources.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.SearchApi(); body = PureCloudPlatformClientV2.TranscriptConversationDetailSearchRequest() # TranscriptConversationDetailSearchRequest | Search request options try: # Search resources. api_response = api_instance.post_analytics_conversations_transcripts_query(body) pprint(api_response) except ApiException as e: print("Exception when calling SearchApi->post_analytics_conversations_transcripts_query: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/participants/attributes/search Genesys Cloud Python SDK.
Genesys describes this as an API used to: Search conversations
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.SearchApi(); body = PureCloudPlatformClientV2.ConversationParticipantSearchRequest() # ConversationParticipantSearchRequest | Search request options try: # Search conversations api_response = api_instance.post_conversations_participants_attributes_search(body) pprint(api_response) except ApiException as e: print("Exception when calling SearchApi->post_conversations_participants_attributes_search: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/documentation/gkn/search Genesys Cloud Python SDK.
Genesys describes this as an API used to: Search gkn documentation using the q64 value returned from a previous search
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # create an instance of the API class api_instance = PureCloudPlatformClientV2.SearchApi(); q64 = 'q64_example' # str | q64 try: # Search gkn documentation using the q64 value returned from a previous search api_response = api_instance.get_documentation_gkn_search(q64) pprint(api_response) except ApiException as e: print("Exception when calling SearchApi->get_documentation_gkn_search: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/documentation/gkn/search Genesys Cloud Python SDK.
Genesys describes this as an API used to: Search gkn documentation
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # create an instance of the API class api_instance = PureCloudPlatformClientV2.SearchApi(); body = PureCloudPlatformClientV2.GKNDocumentationSearchRequest() # GKNDocumentationSearchRequest | Search request options try: # Search gkn documentation api_response = api_instance.post_documentation_gkn_search(body) pprint(api_response) except ApiException as e: print("Exception when calling SearchApi->post_documentation_gkn_search: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/documentation/search Genesys Cloud Python SDK.
Genesys describes this as an API used to: Search documentation using the q64 value returned from a previous search
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # create an instance of the API class api_instance = PureCloudPlatformClientV2.SearchApi(); q64 = 'q64_example' # str | q64 try: # Search documentation using the q64 value returned from a previous search api_response = api_instance.get_documentation_search(q64) pprint(api_response) except ApiException as e: print("Exception when calling SearchApi->get_documentation_search: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/documentation/search Genesys Cloud Python SDK.
Genesys describes this as an API used to: Search documentation
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # create an instance of the API class api_instance = PureCloudPlatformClientV2.SearchApi(); body = PureCloudPlatformClientV2.DocumentationSearchRequest() # DocumentationSearchRequest | Search request options try: # Search documentation api_response = api_instance.post_documentation_search(body) pprint(api_response) except ApiException as e: print("Exception when calling SearchApi->post_documentation_search: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/groups/search Genesys Cloud Python SDK.
Genesys describes this as an API used to: Search groups 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.SearchApi(); q64 = 'q64_example' # str | q64 expand = ['expand_example'] # list[str] | expand (optional) try: # Search groups using the q64 value returned from a previous search api_response = api_instance.get_groups_search(q64, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling SearchApi->get_groups_search: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/groups/search Genesys Cloud Python SDK.
Genesys describes this as an API used to: Search groups
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.SearchApi(); body = PureCloudPlatformClientV2.GroupSearchRequest() # GroupSearchRequest | Search request options try: # Search groups api_response = api_instance.post_groups_search(body) pprint(api_response) except ApiException as e: print("Exception when calling SearchApi->post_groups_search: %s\n" % e)```