instruction
stringlengths
81
221
input
stringlengths
50
1.19k
output
stringlengths
525
3.61k
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/scheduling/runs/{runId}/result Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the result of a rescheduling operation
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit run_id = 'run_id_example' # str | The ID of the schedule run management_unit_ids = ['management_unit_ids_example'] # list[str] | The IDs of the management units for which to fetch the reschedule results expand = ['expand_example'] # list[str] | The fields to expand. Omitting will return an empty response try: # Get the result of a rescheduling operation api_response = api_instance.get_workforcemanagement_businessunit_scheduling_run_result(business_unit_id, run_id, management_unit_ids, expand) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_scheduling_run_result: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/servicegoaltemplates Genesys Cloud Python SDK.
Genesys describes this as an API used to: Gets list of service goal templates
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit. expand = ['expand_example'] # list[str] | Include to access additional data on the service goal template (optional) try: # Gets list of service goal templates api_response = api_instance.get_workforcemanagement_businessunit_servicegoaltemplates(business_unit_id, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_servicegoaltemplates: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/servicegoaltemplates Genesys Cloud Python SDK.
Genesys describes this as an API used to: Adds a new service goal template
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit. body = PureCloudPlatformClientV2.CreateServiceGoalTemplate() # CreateServiceGoalTemplate | body (optional) try: # Adds a new service goal template api_response = api_instance.post_workforcemanagement_businessunit_servicegoaltemplates(business_unit_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_servicegoaltemplates: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/workforcemanagement/businessunits/{businessUnitId}/servicegoaltemplates/{serviceGoalTemplateId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete a service goal template
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit. service_goal_template_id = 'service_goal_template_id_example' # str | The ID of the service goal template to delete try: # Delete a service goal template api_instance.delete_workforcemanagement_businessunit_servicegoaltemplate(business_unit_id, service_goal_template_id) except ApiException as e: print("Exception when calling WorkforceManagementApi->delete_workforcemanagement_businessunit_servicegoaltemplate: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/servicegoaltemplates/{serviceGoalTemplateId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a service goal template
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit. service_goal_template_id = 'service_goal_template_id_example' # str | The ID of a service goal template to fetch expand = ['expand_example'] # list[str] | Include to access additional data on the service goal template (optional) try: # Get a service goal template api_response = api_instance.get_workforcemanagement_businessunit_servicegoaltemplate(business_unit_id, service_goal_template_id, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_servicegoaltemplate: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/workforcemanagement/businessunits/{businessUnitId}/servicegoaltemplates/{serviceGoalTemplateId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Updates a service goal template
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit. service_goal_template_id = 'service_goal_template_id_example' # str | The ID of a service goal template to update body = PureCloudPlatformClientV2.UpdateServiceGoalTemplate() # UpdateServiceGoalTemplate | body (optional) try: # Updates a service goal template api_response = api_instance.patch_workforcemanagement_businessunit_servicegoaltemplate(business_unit_id, service_goal_template_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->patch_workforcemanagement_businessunit_servicegoaltemplate: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/staffinggroups Genesys Cloud Python SDK.
Genesys describes this as an API used to: Gets a list of staffing 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.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit management_unit_id = 'management_unit_id_example' # str | The ID of the management unit to get management unit specific staffing groups (optional) try: # Gets a list of staffing groups api_response = api_instance.get_workforcemanagement_businessunit_staffinggroups(business_unit_id, management_unit_id=management_unit_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_staffinggroups: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/staffinggroups Genesys Cloud Python SDK.
Genesys describes this as an API used to: Creates a new staffing 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.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit body = PureCloudPlatformClientV2.CreateStaffingGroupRequest() # CreateStaffingGroupRequest | body (optional) try: # Creates a new staffing group api_response = api_instance.post_workforcemanagement_businessunit_staffinggroups(business_unit_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_staffinggroups: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/staffinggroups/query Genesys Cloud Python SDK.
Genesys describes this as an API used to: Gets staffing group associations for a list of user IDs
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit body = PureCloudPlatformClientV2.QueryUserStaffingGroupListRequest() # QueryUserStaffingGroupListRequest | body (optional) try: # Gets staffing group associations for a list of user IDs api_response = api_instance.post_workforcemanagement_businessunit_staffinggroups_query(business_unit_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_staffinggroups_query: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/workforcemanagement/businessunits/{businessUnitId}/staffinggroups/{staffingGroupId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Deletes a staffing 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.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit staffing_group_id = 'staffing_group_id_example' # str | The ID of the staffing group to delete try: # Deletes a staffing group api_instance.delete_workforcemanagement_businessunit_staffinggroup(business_unit_id, staffing_group_id) except ApiException as e: print("Exception when calling WorkforceManagementApi->delete_workforcemanagement_businessunit_staffinggroup: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/staffinggroups/{staffingGroupId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Gets a staffing 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.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit staffing_group_id = 'staffing_group_id_example' # str | The ID of the staffing group to fetch try: # Gets a staffing group api_response = api_instance.get_workforcemanagement_businessunit_staffinggroup(business_unit_id, staffing_group_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_staffinggroup: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/workforcemanagement/businessunits/{businessUnitId}/staffinggroups/{staffingGroupId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Updates a staffing 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.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit staffing_group_id = 'staffing_group_id_example' # str | The ID of the staffing group to update body = PureCloudPlatformClientV2.UpdateStaffingGroupRequest() # UpdateStaffingGroupRequest | body (optional) try: # Updates a staffing group api_response = api_instance.patch_workforcemanagement_businessunit_staffinggroup(business_unit_id, staffing_group_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->patch_workforcemanagement_businessunit_staffinggroup: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/timeofflimits Genesys Cloud Python SDK.
Genesys describes this as an API used to: Gets a list of time-off limit objects
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit management_unit_id = 'management_unit_id_example' # str | The ID of the management unit to get management unit specific time-off limit objects (optional) try: # Gets a list of time-off limit objects api_response = api_instance.get_workforcemanagement_businessunit_timeofflimits(business_unit_id, management_unit_id=management_unit_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_timeofflimits: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/timeofflimits Genesys Cloud Python SDK.
Genesys describes this as an API used to: Creates a new time-off limit object
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit body = PureCloudPlatformClientV2.BuCreateTimeOffLimitRequest() # BuCreateTimeOffLimitRequest | body (optional) try: # Creates a new time-off limit object api_response = api_instance.post_workforcemanagement_businessunit_timeofflimits(business_unit_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_timeofflimits: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/timeofflimits/values/query Genesys Cloud Python SDK.
Genesys describes this as an API used to: Retrieves time-off limit related values based on a given set of filters.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit body = PureCloudPlatformClientV2.QueryTimeOffLimitValuesRequest() # QueryTimeOffLimitValuesRequest | body (optional) try: # Retrieves time-off limit related values based on a given set of filters. api_response = api_instance.post_workforcemanagement_businessunit_timeofflimits_values_query(business_unit_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_timeofflimits_values_query: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/workforcemanagement/businessunits/{businessUnitId}/timeofflimits/{timeOffLimitId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Deletes a time-off limit object
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit time_off_limit_id = 'time_off_limit_id_example' # str | The ID of the time-off limit object to delete try: # Deletes a time-off limit object api_instance.delete_workforcemanagement_businessunit_timeofflimit(business_unit_id, time_off_limit_id) except ApiException as e: print("Exception when calling WorkforceManagementApi->delete_workforcemanagement_businessunit_timeofflimit: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/timeofflimits/{timeOffLimitId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Gets a time-off limit object. Returns properties of time-off limit object, but not daily values
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit time_off_limit_id = 'time_off_limit_id_example' # str | The ID of the time-off limit to fetch try: # Gets a time-off limit object api_response = api_instance.get_workforcemanagement_businessunit_timeofflimit(business_unit_id, time_off_limit_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_timeofflimit: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/workforcemanagement/businessunits/{businessUnitId}/timeofflimits/{timeOffLimitId}/values Genesys Cloud Python SDK.
Genesys describes this as an API used to: Sets daily values for a date range of time-off limit object. Note that only limit daily values can be set through API, allocated and waitlisted values are read-only for time-off limit API
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit time_off_limit_id = 'time_off_limit_id_example' # str | The ID of the time-off limit object to set values for body = PureCloudPlatformClientV2.BuSetTimeOffLimitValuesRequest() # BuSetTimeOffLimitValuesRequest | body (optional) try: # Sets daily values for a date range of time-off limit object api_response = api_instance.put_workforcemanagement_businessunit_timeofflimit_values(business_unit_id, time_off_limit_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->put_workforcemanagement_businessunit_timeofflimit_values: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/timeoffplans Genesys Cloud Python SDK.
Genesys describes this as an API used to: Gets a list of time-off plans
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit management_unit_id = 'management_unit_id_example' # str | The ID of the management unit to get management unit specific staffing groups (optional) force_download_service = True # bool | Force the result of this operation to be sent via download service. For testing/app development purposes (optional) try: # Gets a list of time-off plans api_response = api_instance.get_workforcemanagement_businessunit_timeoffplans(business_unit_id, management_unit_id=management_unit_id, force_download_service=force_download_service) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_timeoffplans: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/timeoffplans Genesys Cloud Python SDK.
Genesys describes this as an API used to: Creates a new time-off plan
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit body = PureCloudPlatformClientV2.BuCreateTimeOffPlanRequest() # BuCreateTimeOffPlanRequest | body (optional) try: # Creates a new time-off plan api_response = api_instance.post_workforcemanagement_businessunit_timeoffplans(business_unit_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_timeoffplans: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/workforcemanagement/businessunits/{businessUnitId}/timeoffplans/{timeOffPlanId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Deletes a time-off plan
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit time_off_plan_id = 'time_off_plan_id_example' # str | The ID of the time-off plan to delete try: # Deletes a time-off plan api_instance.delete_workforcemanagement_businessunit_timeoffplan(business_unit_id, time_off_plan_id) except ApiException as e: print("Exception when calling WorkforceManagementApi->delete_workforcemanagement_businessunit_timeoffplan: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/timeoffplans/{timeOffPlanId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Gets a time-off plan
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit time_off_plan_id = 'time_off_plan_id_example' # str | The ID of the time-off plan to fetch try: # Gets a time-off plan api_response = api_instance.get_workforcemanagement_businessunit_timeoffplan(business_unit_id, time_off_plan_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_timeoffplan: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/workforcemanagement/businessunits/{businessUnitId}/timeoffplans/{timeOffPlanId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Updates a time-off plan
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit time_off_plan_id = 'time_off_plan_id_example' # str | The ID of the time-off plan to update body = PureCloudPlatformClientV2.BuUpdateTimeOffPlanRequest() # BuUpdateTimeOffPlanRequest | body (optional) try: # Updates a time-off plan api_response = api_instance.patch_workforcemanagement_businessunit_timeoffplan(business_unit_id, time_off_plan_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->patch_workforcemanagement_businessunit_timeoffplan: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekDateId}/shorttermforecasts Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get short term forecasts. Use "recent" (without quotes) for the `weekDateId` path parameter to fetch all forecasts for +/- 26 weeks from the current date. Response will include any forecast which spans the specified week
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit to which the forecast belongs week_date_id = 'week_date_id_example' # str | The week start date of the forecast in yyyy-MM-dd format or 'recent' (without quotes) to fetch recent forecasts try: # Get short term forecasts api_response = api_instance.get_workforcemanagement_businessunit_week_shorttermforecasts(business_unit_id, week_date_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_week_shorttermforecasts: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekDateId}/shorttermforecasts/generate Genesys Cloud Python SDK.
Genesys describes this as an API used to: Generate a short term forecast
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit to which the forecast belongs week_date_id = '2013-10-20' # date | The week start date of the forecast in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd body = PureCloudPlatformClientV2.GenerateBuForecastRequest() # GenerateBuForecastRequest | body force_async = True # bool | Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes (optional) try: # Generate a short term forecast api_response = api_instance.post_workforcemanagement_businessunit_week_shorttermforecasts_generate(business_unit_id, week_date_id, body, force_async=force_async) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_week_shorttermforecasts_generate: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekDateId}/shorttermforecasts/import Genesys Cloud Python SDK.
Genesys describes this as an API used to: Starts importing the uploaded short term forecast. Call after uploading the forecast data to the url supplied by the /import/uploadurl route
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit to which the forecast belongs week_date_id = '2013-10-20' # date | First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd body = PureCloudPlatformClientV2.WfmProcessUploadRequest() # WfmProcessUploadRequest | body try: # Starts importing the uploaded short term forecast api_response = api_instance.post_workforcemanagement_businessunit_week_shorttermforecasts_import(business_unit_id, week_date_id, body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_week_shorttermforecasts_import: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekDateId}/shorttermforecasts/import/uploadurl Genesys Cloud Python SDK.
Genesys describes this as an API used to: Creates a signed upload URL for importing a short term forecast. Once the upload is complete, call the /import route to start the short term forecast import process
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit to which the forecast belongs week_date_id = '2013-10-20' # date | First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd body = PureCloudPlatformClientV2.UploadUrlRequestBody() # UploadUrlRequestBody | body try: # Creates a signed upload URL for importing a short term forecast api_response = api_instance.post_workforcemanagement_businessunit_week_shorttermforecasts_import_uploadurl(business_unit_id, week_date_id, body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_week_shorttermforecasts_import_uploadurl: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekDateId}/shorttermforecasts/{forecastId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete a short term forecast. Must not be tied to any schedules
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit to which the forecast belongs week_date_id = '2013-10-20' # date | The week start date of the forecast in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd forecast_id = 'forecast_id_example' # str | The ID of the forecast try: # Delete a short term forecast api_instance.delete_workforcemanagement_businessunit_week_shorttermforecast(business_unit_id, week_date_id, forecast_id) except ApiException as e: print("Exception when calling WorkforceManagementApi->delete_workforcemanagement_businessunit_week_shorttermforecast: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekDateId}/shorttermforecasts/{forecastId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a short term forecast
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit to which the forecast belongs week_date_id = '2013-10-20' # date | The week start date of the forecast in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd forecast_id = 'forecast_id_example' # str | The ID of the forecast expand = ['expand_example'] # list[str] | Include to access additional data on the forecast (optional) try: # Get a short term forecast api_response = api_instance.get_workforcemanagement_businessunit_week_shorttermforecast(business_unit_id, week_date_id, forecast_id, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_week_shorttermforecast: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekDateId}/shorttermforecasts/{forecastId}/copy Genesys Cloud Python SDK.
Genesys describes this as an API used to: Copy a short term forecast
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit to which the forecast belongs week_date_id = '2013-10-20' # date | The week start date of the forecast in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd forecast_id = 'forecast_id_example' # str | The ID of the forecast to copy body = PureCloudPlatformClientV2.CopyBuForecastRequest() # CopyBuForecastRequest | body force_async = True # bool | Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes (optional) try: # Copy a short term forecast api_response = api_instance.post_workforcemanagement_businessunit_week_shorttermforecast_copy(business_unit_id, week_date_id, forecast_id, body, force_async=force_async) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_week_shorttermforecast_copy: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekDateId}/shorttermforecasts/{forecastId}/data Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the result of a short term forecast calculation. Includes modifications unless you pass the doNotApplyModifications query parameter
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit to which the forecast belongs week_date_id = '2013-10-20' # date | The week start date of the forecast in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd forecast_id = 'forecast_id_example' # str | The ID of the forecast week_number = 56 # int | The week number to fetch (for multi-week forecasts) (optional) force_download_service = True # bool | Force the result of this operation to be sent via download service. For testing/app development purposes (optional) try: # Get the result of a short term forecast calculation api_response = api_instance.get_workforcemanagement_businessunit_week_shorttermforecast_data(business_unit_id, week_date_id, forecast_id, week_number=week_number, force_download_service=force_download_service) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_week_shorttermforecast_data: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekDateId}/shorttermforecasts/{forecastId}/generationresults Genesys Cloud Python SDK.
Genesys describes this as an API used to: Gets the forecast generation results
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit to which the forecast belongs week_date_id = '2013-10-20' # date | The week start date of the forecast in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd forecast_id = 'forecast_id_example' # str | The ID of the forecast try: # Gets the forecast generation results api_response = api_instance.get_workforcemanagement_businessunit_week_shorttermforecast_generationresults(business_unit_id, week_date_id, forecast_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_week_shorttermforecast_generationresults: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekDateId}/shorttermforecasts/{forecastId}/longtermforecastdata Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the result of a long term forecast calculation. Includes modifications unless you pass the doNotApplyModifications query parameter
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit to which the forecast belongs week_date_id = '2013-10-20' # date | The week start date of the forecast in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd forecast_id = 'forecast_id_example' # str | The ID of the forecast force_download_service = True # bool | Force the result of this operation to be sent via download service. For testing/app development purposes (optional) try: # Get the result of a long term forecast calculation api_response = api_instance.get_workforcemanagement_businessunit_week_shorttermforecast_longtermforecastdata(business_unit_id, week_date_id, forecast_id, force_download_service=force_download_service) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_week_shorttermforecast_longtermforecastdata: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekDateId}/shorttermforecasts/{forecastId}/planninggroups Genesys Cloud Python SDK.
Genesys describes this as an API used to: Gets the forecast planning group snapshot
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit to which the forecast belongs week_date_id = '2013-10-20' # date | The week start date of the forecast in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd forecast_id = 'forecast_id_example' # str | The ID of the forecast try: # Gets the forecast planning group snapshot api_response = api_instance.get_workforcemanagement_businessunit_week_shorttermforecast_planninggroups(business_unit_id, week_date_id, forecast_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_week_shorttermforecast_planninggroups: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekDateId}/shorttermforecasts/{forecastId}/staffingrequirement Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the staffing requirement by planning group for a forecast
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit to which the forecast belongs week_date_id = '2013-10-20' # date | The week start date of the forecast in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd forecast_id = 'forecast_id_example' # str | The ID of the forecast week_numbers = ['week_numbers_example'] # list[str] | The week numbers to fetch (for multi-week forecasts) staffing requirements. Returns all week data if the list is not specified (optional) try: # Get the staffing requirement by planning group for a forecast api_response = api_instance.get_workforcemanagement_businessunit_week_shorttermforecast_staffingrequirement(business_unit_id, week_date_id, forecast_id, week_numbers=week_numbers) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_week_shorttermforecast_staffingrequirement: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekId}/schedules Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the list of week schedules for the specified week. Use "recent" (without quotes) for the `weekId` path parameter to fetch all forecasts for +/- 26 weeks from the current date. Response will include any schedule which spans the specified week
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit week_id = 'week_id_example' # str | First day of schedule week in yyyy-MM-dd format, or 'recent' (without quotes) to get recent schedules include_only_published = True # bool | includeOnlyPublished (optional) expand = 'expand_example' # str | expand (optional) try: # Get the list of week schedules for the specified week api_response = api_instance.get_workforcemanagement_businessunit_week_schedules(business_unit_id, week_id, include_only_published=include_only_published, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_week_schedules: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekId}/schedules Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create a blank schedule
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit week_id = '2013-10-20' # date | First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd body = PureCloudPlatformClientV2.BuCreateBlankScheduleRequest() # BuCreateBlankScheduleRequest | body try: # Create a blank schedule api_response = api_instance.post_workforcemanagement_businessunit_week_schedules(business_unit_id, week_id, body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_week_schedules: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekId}/schedules/generate Genesys Cloud Python SDK.
Genesys describes this as an API used to: Generate a schedule
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit week_id = '2013-10-20' # date | First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd body = PureCloudPlatformClientV2.BuGenerateScheduleRequest() # BuGenerateScheduleRequest | body try: # Generate a schedule api_response = api_instance.post_workforcemanagement_businessunit_week_schedules_generate(business_unit_id, week_id, body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_week_schedules_generate: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekId}/schedules/import Genesys Cloud Python SDK.
Genesys describes this as an API used to: Starts processing a schedule import. Call after uploading the schedule data to the url supplied by the /import/uploadurl route
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit week_id = '2013-10-20' # date | First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd body = PureCloudPlatformClientV2.WfmProcessUploadRequest() # WfmProcessUploadRequest | try: # Starts processing a schedule import api_response = api_instance.post_workforcemanagement_businessunit_week_schedules_import(business_unit_id, week_id, body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_week_schedules_import: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekId}/schedules/import/uploadurl Genesys Cloud Python SDK.
Genesys describes this as an API used to: Creates a signed upload URL for importing a schedule. Once the upload is complete, call the /import route to start the schedule import process
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit week_id = '2013-10-20' # date | First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd body = PureCloudPlatformClientV2.UploadUrlRequestBody() # UploadUrlRequestBody | body try: # Creates a signed upload URL for importing a schedule api_response = api_instance.post_workforcemanagement_businessunit_week_schedules_import_uploadurl(business_unit_id, week_id, body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_week_schedules_import_uploadurl: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekId}/schedules/{scheduleId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete a schedule
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit week_id = '2013-10-20' # date | First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd schedule_id = 'schedule_id_example' # str | The ID of the schedule try: # Delete a schedule api_response = api_instance.delete_workforcemanagement_businessunit_week_schedule(business_unit_id, week_id, schedule_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->delete_workforcemanagement_businessunit_week_schedule: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekId}/schedules/{scheduleId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the metadata for the schedule, describing which management units and agents are in the scheduleSchedule data can then be loaded with the query route
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit week_id = '2013-10-20' # date | First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd schedule_id = 'schedule_id_example' # str | The ID of the schedule expand = 'expand_example' # str | expand (optional) try: # Get the metadata for the schedule, describing which management units and agents are in the scheduleSchedule data can then be loaded with the query route api_response = api_instance.get_workforcemanagement_businessunit_week_schedule(business_unit_id, week_id, schedule_id, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_week_schedule: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekId}/schedules/{scheduleId}/agentschedules/query Genesys Cloud Python SDK.
Genesys describes this as an API used to: Loads agent schedule data from the schedule. Used in combination with the metadata route
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit week_id = '2013-10-20' # date | First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd schedule_id = 'schedule_id_example' # str | The ID of the schedule body = PureCloudPlatformClientV2.BuQueryAgentSchedulesRequest() # BuQueryAgentSchedulesRequest | body force_async = True # bool | Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes (optional) force_download_service = True # bool | Force the result of this operation to be sent via download service. For testing/app development purposes (optional) try: # Loads agent schedule data from the schedule. Used in combination with the metadata route api_response = api_instance.post_workforcemanagement_businessunit_week_schedule_agentschedules_query(business_unit_id, week_id, schedule_id, body, force_async=force_async, force_download_service=force_download_service) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_week_schedule_agentschedules_query: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekId}/schedules/{scheduleId}/copy Genesys Cloud Python SDK.
Genesys describes this as an API used to: Copy a schedule
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit week_id = '2013-10-20' # date | First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd schedule_id = 'schedule_id_example' # str | The ID of the schedule to copy body = PureCloudPlatformClientV2.BuCopyScheduleRequest() # BuCopyScheduleRequest | body try: # Copy a schedule api_response = api_instance.post_workforcemanagement_businessunit_week_schedule_copy(business_unit_id, week_id, schedule_id, body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_week_schedule_copy: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekId}/schedules/{scheduleId}/generationresults Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the generation results for a generated schedule
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit week_id = '2013-10-20' # date | First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd schedule_id = 'schedule_id_example' # str | The ID of the schedule try: # Get the generation results for a generated schedule api_response = api_instance.get_workforcemanagement_businessunit_week_schedule_generationresults(business_unit_id, week_id, schedule_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_week_schedule_generationresults: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekId}/schedules/{scheduleId}/headcountforecast Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the headcount forecast by planning group for the schedule
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit week_id = '2013-10-20' # date | First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd schedule_id = 'schedule_id_example' # str | The ID of the schedule force_download = True # bool | Whether to force the result to come via download url. For testing purposes only (optional) try: # Get the headcount forecast by planning group for the schedule api_response = api_instance.get_workforcemanagement_businessunit_week_schedule_headcountforecast(business_unit_id, week_id, schedule_id, force_download=force_download) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_week_schedule_headcountforecast: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekId}/schedules/{scheduleId}/history/agents/{agentId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Loads agent's schedule history.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit week_id = '2013-10-20' # date | First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd schedule_id = 'schedule_id_example' # str | The ID of the schedule agent_id = 'agent_id_example' # str | THe ID of the agent try: # Loads agent's schedule history. api_response = api_instance.get_workforcemanagement_businessunit_week_schedule_history_agent(business_unit_id, week_id, schedule_id, agent_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_week_schedule_history_agent: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekId}/schedules/{scheduleId}/performancepredictions Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the performance prediction for the associated schedule
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit to which the performance prediction belongs week_id = 'week_id_example' # str | First day of schedule week in yyyy-MM-dd format schedule_id = 'schedule_id_example' # str | The ID of the schedule the performance prediction belongs to try: # Get the performance prediction for the associated schedule api_response = api_instance.get_workforcemanagement_businessunit_week_schedule_performancepredictions(business_unit_id, week_id, schedule_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_week_schedule_performancepredictions: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekId}/schedules/{scheduleId}/performancepredictions/recalculations Genesys Cloud Python SDK.
Genesys describes this as an API used to: Request a daily recalculation of the performance prediction for the associated schedule
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit to which the performance prediction belongs week_id = 'week_id_example' # str | First day of schedule week in yyyy-MM-dd format schedule_id = 'schedule_id_example' # str | The ID of the schedule the performance prediction belongs to body = PureCloudPlatformClientV2.WfmProcessUploadRequest() # WfmProcessUploadRequest | body (optional) try: # Request a daily recalculation of the performance prediction for the associated schedule api_response = api_instance.post_workforcemanagement_businessunit_week_schedule_performancepredictions_recalculations(business_unit_id, week_id, schedule_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_week_schedule_performancepredictions_recalculations: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekId}/schedules/{scheduleId}/performancepredictions/recalculations/uploadurl Genesys Cloud Python SDK.
Genesys describes this as an API used to: Upload daily activity changes to be able to request a performance prediction recalculation
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit to which the performance prediction belongs week_id = 'week_id_example' # str | First day of schedule week in yyyy-MM-dd format schedule_id = 'schedule_id_example' # str | The ID of the schedule the performance prediction belongs to body = PureCloudPlatformClientV2.UploadUrlRequestBody() # UploadUrlRequestBody | body (optional) try: # Upload daily activity changes to be able to request a performance prediction recalculation api_response = api_instance.post_workforcemanagement_businessunit_week_schedule_performancepredictions_recalculations_uploadurl(business_unit_id, week_id, schedule_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_week_schedule_performancepredictions_recalculations_uploadurl: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekId}/schedules/{scheduleId}/performancepredictions/recalculations/{recalculationId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get recalculated performance prediction result
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit to which the performance prediction belongs week_id = 'week_id_example' # str | First day of schedule week in yyyy-MM-dd format schedule_id = 'schedule_id_example' # str | The ID of the schedule the recalculation belongs to recalculation_id = 'recalculation_id_example' # str | The ID of the recalculation request try: # Get recalculated performance prediction result api_response = api_instance.get_workforcemanagement_businessunit_week_schedule_performancepredictions_recalculation(business_unit_id, week_id, schedule_id, recalculation_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_week_schedule_performancepredictions_recalculation: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekId}/schedules/{scheduleId}/reschedule Genesys Cloud Python SDK.
Genesys describes this as an API used to: Start a rescheduling run
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit week_id = '2013-10-20' # date | First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd schedule_id = 'schedule_id_example' # str | The ID of the schedule body = PureCloudPlatformClientV2.BuRescheduleRequest() # BuRescheduleRequest | body try: # Start a rescheduling run api_response = api_instance.post_workforcemanagement_businessunit_week_schedule_reschedule(business_unit_id, week_id, schedule_id, body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_week_schedule_reschedule: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekId}/schedules/{scheduleId}/update Genesys Cloud Python SDK.
Genesys describes this as an API used to: Starts processing a schedule update. Call after uploading the schedule data to the url supplied by the /update/uploadurl route
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit week_id = '2013-10-20' # date | First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd schedule_id = 'schedule_id_example' # str | The ID of the schedule body = PureCloudPlatformClientV2.ProcessScheduleUpdateUploadRequest() # ProcessScheduleUpdateUploadRequest | body try: # Starts processing a schedule update api_response = api_instance.post_workforcemanagement_businessunit_week_schedule_update(business_unit_id, week_id, schedule_id, body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_week_schedule_update: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/weeks/{weekId}/schedules/{scheduleId}/update/uploadurl Genesys Cloud Python SDK.
Genesys describes this as an API used to: Creates a signed upload URL for updating a schedule. Once the upload is complete, call the /{scheduleId}/update route to start the schedule update process
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit week_id = '2013-10-20' # date | First day of schedule week in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd schedule_id = 'schedule_id_example' # str | The ID of the schedule body = PureCloudPlatformClientV2.UploadUrlRequestBody() # UploadUrlRequestBody | body try: # Creates a signed upload URL for updating a schedule api_response = api_instance.post_workforcemanagement_businessunit_week_schedule_update_uploadurl(business_unit_id, week_id, schedule_id, body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_week_schedule_update_uploadurl: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/workplanbids Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get list of work plan bids
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit try: # Get list of work plan bids api_response = api_instance.get_workforcemanagement_businessunit_workplanbids(business_unit_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_workplanbids: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/workplanbids Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create a new work plan bid
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit body = PureCloudPlatformClientV2.CreateWorkPlanBid() # CreateWorkPlanBid | The work plan bid to be created (optional) try: # Create a new work plan bid api_response = api_instance.post_workforcemanagement_businessunit_workplanbids(business_unit_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_workplanbids: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/workforcemanagement/businessunits/{businessUnitId}/workplanbids/{bidId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete a work plan bid
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit bid_id = 'bid_id_example' # str | The ID of the work plan bid try: # Delete a work plan bid api_instance.delete_workforcemanagement_businessunit_workplanbid(business_unit_id, bid_id) except ApiException as e: print("Exception when calling WorkforceManagementApi->delete_workforcemanagement_businessunit_workplanbid: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/workplanbids/{bidId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a work plan bid
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit bid_id = 'bid_id_example' # str | The id of the workplanbid try: # Get a work plan bid api_response = api_instance.get_workforcemanagement_businessunit_workplanbid(business_unit_id, bid_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_workplanbid: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/workforcemanagement/businessunits/{businessUnitId}/workplanbids/{bidId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update work plan bid
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit bid_id = 'bid_id_example' # str | The id of the workplanbid body = PureCloudPlatformClientV2.UpdateWorkPlanBid() # UpdateWorkPlanBid | The work plan bid to be updated try: # Update work plan bid api_response = api_instance.patch_workforcemanagement_businessunit_workplanbid(business_unit_id, bid_id, body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->patch_workforcemanagement_businessunit_workplanbid: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/workplanbids/{bidId}/copy Genesys Cloud Python SDK.
Genesys describes this as an API used to: Copy a work plan bid
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit bid_id = 'bid_id_example' # str | The ID of the work plan bid to copy body = PureCloudPlatformClientV2.CopyWorkPlanBid() # CopyWorkPlanBid | body (optional) try: # Copy a work plan bid api_response = api_instance.post_workforcemanagement_businessunit_workplanbid_copy(business_unit_id, bid_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_workplanbid_copy: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/businessunits/{businessUnitId}/workplanbids/{bidId}/groups Genesys Cloud Python SDK.
Genesys describes this as an API used to: Add a bid group in a given work plan bid
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit bid_id = 'bid_id_example' # str | The work plan bid id of the bid groups body = PureCloudPlatformClientV2.WorkPlanBidGroupCreate() # WorkPlanBidGroupCreate | body (optional) try: # Add a bid group in a given work plan bid api_response = api_instance.post_workforcemanagement_businessunit_workplanbid_groups(business_unit_id, bid_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_workplanbid_groups: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/workplanbids/{bidId}/groups/summary Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get summary of bid groups that belong to a work plan bid
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit bid_id = 'bid_id_example' # str | The work plan bid id of the bid groups try: # Get summary of bid groups that belong to a work plan bid api_response = api_instance.get_workforcemanagement_businessunit_workplanbid_groups_summary(business_unit_id, bid_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_workplanbid_groups_summary: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/workforcemanagement/businessunits/{businessUnitId}/workplanbids/{bidId}/groups/{bidGroupId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete a bid group by bid group Id
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit bid_id = 'bid_id_example' # str | The work plan bid id of the bid groups bid_group_id = 'bid_group_id_example' # str | Work Plan Bid Group id try: # Delete a bid group by bid group Id api_instance.delete_workforcemanagement_businessunit_workplanbid_group(business_unit_id, bid_id, bid_group_id) except ApiException as e: print("Exception when calling WorkforceManagementApi->delete_workforcemanagement_businessunit_workplanbid_group: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/workplanbids/{bidId}/groups/{bidGroupId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a bid group by bid group Id
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit bid_id = 'bid_id_example' # str | The work plan bid id of the bid groups bid_group_id = 'bid_group_id_example' # str | Work Plan Bid Group id try: # Get a bid group by bid group Id api_response = api_instance.get_workforcemanagement_businessunit_workplanbid_group(business_unit_id, bid_id, bid_group_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_workplanbid_group: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/workforcemanagement/businessunits/{businessUnitId}/workplanbids/{bidId}/groups/{bidGroupId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a bid group by bid group Id
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit bid_id = 'bid_id_example' # str | The work plan bid id of the bid groups bid_group_id = 'bid_group_id_example' # str | Work Plan Bid Group id body = PureCloudPlatformClientV2.WorkPlanBidGroupUpdate() # WorkPlanBidGroupUpdate | body (optional) try: # Update a bid group by bid group Id api_response = api_instance.patch_workforcemanagement_businessunit_workplanbid_group(business_unit_id, bid_id, bid_group_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->patch_workforcemanagement_businessunit_workplanbid_group: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/workplanbids/{bidId}/groups/{bidGroupId}/preferences Genesys Cloud Python SDK.
Genesys describes this as an API used to: Gets the work plan preferences of all the agents in the work plan bid 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.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit bid_id = 'bid_id_example' # str | The work plan bid id of the bid groups bid_group_id = 'bid_group_id_example' # str | The ID of the work plan bid group try: # Gets the work plan preferences of all the agents in the work plan bid group api_response = api_instance.get_workforcemanagement_businessunit_workplanbid_group_preferences(business_unit_id, bid_id, bid_group_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_businessunit_workplanbid_group_preferences: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/workforcemanagement/businessunits/{businessUnitId}/workplanbids/{bidId}/groups/{bidGroupId}/preferences Genesys Cloud Python SDK.
Genesys describes this as an API used to: Overrides the assigned work plan for the specified agents
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); business_unit_id = 'business_unit_id_example' # str | The ID of the business unit bid_id = 'bid_id_example' # str | The work plan bid id of the bid groups bid_group_id = 'bid_group_id_example' # str | The ID of the work plan bid group body = PureCloudPlatformClientV2.AgentsBidAssignedWorkPlanOverrideRequest() # AgentsBidAssignedWorkPlanOverrideRequest | body (optional) try: # Overrides the assigned work plan for the specified agents api_response = api_instance.patch_workforcemanagement_businessunit_workplanbid_group_preferences(business_unit_id, bid_id, bid_group_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->patch_workforcemanagement_businessunit_workplanbid_group_preferences: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/calendar/data/ics Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get ics formatted calendar based on shareable link
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); calendar_id = 'calendar_id_example' # str | The id of the ics-formatted calendar try: # Get ics formatted calendar based on shareable link api_response = api_instance.get_workforcemanagement_calendar_data_ics(calendar_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_calendar_data_ics: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/workforcemanagement/calendar/url/ics Genesys Cloud Python SDK.
Genesys describes this as an API used to: Disable generated calendar link for the current 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.WorkforceManagementApi(); try: # Disable generated calendar link for the current user api_instance.delete_workforcemanagement_calendar_url_ics() except ApiException as e: print("Exception when calling WorkforceManagementApi->delete_workforcemanagement_calendar_url_ics: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/calendar/url/ics Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get existing calendar link for the current 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.WorkforceManagementApi(); try: # Get existing calendar link for the current user api_response = api_instance.get_workforcemanagement_calendar_url_ics() pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_calendar_url_ics: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/calendar/url/ics Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create a newly generated calendar link for the current user; if the current user has previously generated one, the generated link will be 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.WorkforceManagementApi(); language = ''en-US'' # str | A language tag (which is sometimes referred to as a \"locale identifier\") to use to localize default activity code names in the ics-formatted calendar (optional) (default to 'en-US') try: # Create a newly generated calendar link for the current user; if the current user has previously generated one, the generated link will be returned api_response = api_instance.post_workforcemanagement_calendar_url_ics(language=language) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_calendar_url_ics: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/historicaldata/deletejob Genesys Cloud Python SDK.
Genesys describes this as an API used to: Retrieves delete job status for historical data imports of the organization
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); try: # Retrieves delete job status for historical data imports of the organization api_response = api_instance.get_workforcemanagement_historicaldata_deletejob() pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_historicaldata_deletejob: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/historicaldata/deletejob Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete the entries of the historical data imports in the organization
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); try: # Delete the entries of the historical data imports in the organization api_response = api_instance.post_workforcemanagement_historicaldata_deletejob() pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_historicaldata_deletejob: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/historicaldata/importstatus Genesys Cloud Python SDK.
Genesys describes this as an API used to: Retrieves status of the historical data imports of the organization
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); try: # Retrieves status of the historical data imports of the organization api_response = api_instance.get_workforcemanagement_historicaldata_importstatus() pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_historicaldata_importstatus: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/historicaldata/validate Genesys Cloud Python SDK.
Genesys describes this as an API used to: Trigger validation process for historical import
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); body = PureCloudPlatformClientV2.ValidationServiceRequest() # ValidationServiceRequest | body (optional) try: # Trigger validation process for historical import api_instance.post_workforcemanagement_historicaldata_validate(body=body) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_historicaldata_validate: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/integrations/hris Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get integrations
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); try: # Get integrations api_response = api_instance.get_workforcemanagement_integrations_hris() pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_integrations_hris: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/integrations/hris/timeofftypes/jobs/{jobId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Query the results of time off types job
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); job_id = 'job_id_example' # str | The ID of the job. try: # Query the results of time off types job api_response = api_instance.get_workforcemanagement_integrations_hris_timeofftypes_job(job_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_integrations_hris_timeofftypes_job: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/integrations/hris/{hrisIntegrationId}/timeofftypes/jobs Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get list of time off types configured in integration
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); hris_integration_id = 'hris_integration_id_example' # str | The ID of the HRIS integration for which time off types are queried. try: # Get list of time off types configured in integration api_response = api_instance.post_workforcemanagement_integrations_hri_timeofftypes_jobs(hris_integration_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_integrations_hri_timeofftypes_jobs: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/managementunits Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get management units
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); page_size = 56 # int | Deprecated, paging is not supported (optional) page_number = 56 # int | Deprecated, paging is not supported (optional) expand = 'expand_example' # str | Deprecated, expand settings on the single MU route (optional) feature = 'feature_example' # str | If specified, the list of management units for which the user is authorized to use the requested feature will be returned (optional) division_id = 'division_id_example' # str | If specified, the list of management units belonging to the specified division will be returned (optional) try: # Get management units api_response = api_instance.get_workforcemanagement_managementunits(page_size=page_size, page_number=page_number, expand=expand, feature=feature, division_id=division_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunits: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/managementunits Genesys Cloud Python SDK.
Genesys describes this as an API used to: Add a management unit. It may take a minute or two for a new management unit to be available for api operations
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); body = PureCloudPlatformClientV2.CreateManagementUnitApiRequest() # CreateManagementUnitApiRequest | body (optional) try: # Add a management unit api_response = api_instance.post_workforcemanagement_managementunits(body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunits: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/managementunits/divisionviews Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get management units across divisions
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); division_id = ['division_id_example'] # list[str] | The divisionIds to filter by. If omitted, will return all divisions (optional) try: # Get management units across divisions api_response = api_instance.get_workforcemanagement_managementunits_divisionviews(division_id=division_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunits_divisionviews: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/workforcemanagement/managementunits/{managementUnitId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete management unit
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); management_unit_id = 'management_unit_id_example' # str | The ID of the management unit, or 'mine' for the management unit of the logged-in user. try: # Delete management unit api_instance.delete_workforcemanagement_managementunit(management_unit_id) except ApiException as e: print("Exception when calling WorkforceManagementApi->delete_workforcemanagement_managementunit: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/managementunits/{managementUnitId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get management unit. settings.shortTermForecasting is deprecated and now lives on the business unit
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); management_unit_id = 'management_unit_id_example' # str | The ID of the management unit, or 'mine' for the management unit of the logged-in user. expand = ['expand_example'] # list[str] | (optional) try: # Get management unit api_response = api_instance.get_workforcemanagement_managementunit(management_unit_id, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/workforcemanagement/managementunits/{managementUnitId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update the requested management unit
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); management_unit_id = 'management_unit_id_example' # str | The ID of the management unit, or 'mine' for the management unit of the logged-in user. body = PureCloudPlatformClientV2.UpdateManagementUnitRequest() # UpdateManagementUnitRequest | body (optional) try: # Update the requested management unit api_response = api_instance.patch_workforcemanagement_managementunit(management_unit_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->patch_workforcemanagement_managementunit: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/adherence Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a list of user schedule adherence records for the requested management unit
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); management_unit_id = 'management_unit_id_example' # str | The ID of the management unit force_download_service = True # bool | Force the result of this operation to be sent via download service. For testing/app development purposes (optional) try: # Get a list of user schedule adherence records for the requested management unit api_response = api_instance.get_workforcemanagement_managementunit_adherence(management_unit_id, force_download_service=force_download_service) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_adherence: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/workforcemanagement/managementunits/{managementUnitId}/agents Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update agent configurations
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); management_unit_id = 'management_unit_id_example' # str | The ID of the management unit, or 'mine' for the management unit of the logged-in user. body = PureCloudPlatformClientV2.UpdateMuAgentsRequest() # UpdateMuAgentsRequest | body (optional) try: # Update agent configurations api_instance.patch_workforcemanagement_managementunit_agents(management_unit_id, body=body) except ApiException as e: print("Exception when calling WorkforceManagementApi->patch_workforcemanagement_managementunit_agents: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/agents/{agentId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get data for agent in the management unit
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); management_unit_id = 'management_unit_id_example' # str | The ID of the management unit, or 'mine' for the management unit of the logged-in user. agent_id = 'agent_id_example' # str | The agent id exclude_capabilities = True # bool | Excludes all capabilities of the agent such as queues, languages, and skills (optional) expand = ['expand_example'] # list[str] | (optional) try: # Get data for agent in the management unit api_response = api_instance.get_workforcemanagement_managementunit_agent(management_unit_id, agent_id, exclude_capabilities=exclude_capabilities, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_agent: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/agents/{agentId}/shifttrades Genesys Cloud Python SDK.
Genesys describes this as an API used to: Gets all the shift trades for a given agent
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); management_unit_id = 'management_unit_id_example' # str | The ID of the management unit, or 'mine' for the management unit of the logged-in user. agent_id = 'agent_id_example' # str | The agent id try: # Gets all the shift trades for a given agent api_response = api_instance.get_workforcemanagement_managementunit_agent_shifttrades(management_unit_id, agent_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_agent_shifttrades: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/agentschedules/search Genesys Cloud Python SDK.
Genesys describes this as an API used to: Query published schedules for given given time range for set of users
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); management_unit_id = 'management_unit_id_example' # str | The ID of the management unit, or 'mine' for the management unit of the logged-in user. force_async = True # bool | Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes (optional) force_download_service = True # bool | Force the result of this operation to be sent via download service. For testing/app development purposes (optional) body = PureCloudPlatformClientV2.BuSearchAgentSchedulesRequest() # BuSearchAgentSchedulesRequest | body (optional) try: # Query published schedules for given given time range for set of users api_response = api_instance.post_workforcemanagement_managementunit_agentschedules_search(management_unit_id, force_async=force_async, force_download_service=force_download_service, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_agentschedules_search: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/historicaladherencequery Genesys Cloud Python SDK.
Genesys describes this as an API used to: Request a historical adherence report. The maximum supported range for historical adherence queries is 31 days, or 7 days with includeExceptions = true
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); management_unit_id = 'management_unit_id_example' # str | The ID of the management unit body = PureCloudPlatformClientV2.WfmHistoricalAdherenceQuery() # WfmHistoricalAdherenceQuery | body (optional) try: # Request a historical adherence report api_response = api_instance.post_workforcemanagement_managementunit_historicaladherencequery(management_unit_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_historicaladherencequery: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/move Genesys Cloud Python SDK.
Genesys describes this as an API used to: Move the requested management unit to a new business unit. Returns status 200 if the management unit is already in the requested business unit
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); management_unit_id = 'management_unit_id_example' # str | The ID of the management unit, or 'mine' for the management unit of the logged-in user. body = PureCloudPlatformClientV2.MoveManagementUnitRequest() # MoveManagementUnitRequest | body (optional) try: # Move the requested management unit to a new business unit api_response = api_instance.post_workforcemanagement_managementunit_move(management_unit_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_move: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/shifttrades/matched Genesys Cloud Python SDK.
Genesys describes this as an API used to: Gets a summary of all shift trades in the matched 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.WorkforceManagementApi(); management_unit_id = 'management_unit_id_example' # str | The ID of the management unit, or 'mine' for the management unit of the logged-in user. try: # Gets a summary of all shift trades in the matched state api_response = api_instance.get_workforcemanagement_managementunit_shifttrades_matched(management_unit_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_shifttrades_matched: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/shifttrades/users Genesys Cloud Python SDK.
Genesys describes this as an API used to: Gets list of users available for whom you can send direct shift trade requests
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); management_unit_id = 'management_unit_id_example' # str | The ID of the management unit, or 'mine' for the management unit of the logged-in user. try: # Gets list of users available for whom you can send direct shift trade requests api_response = api_instance.get_workforcemanagement_managementunit_shifttrades_users(management_unit_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_shifttrades_users: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/shrinkage/jobs Genesys Cloud Python SDK.
Genesys describes this as an API used to: Request a historical shrinkage report. The maximum supported range for historical shrinkage queries is up to 32 days. Historical Shrinkage for a given date range can be queried in two modes - granular and aggregated. To see granular shrinkage information, provide granularity in the request body.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); management_unit_id = 'management_unit_id_example' # str | The ID of the management unit body = PureCloudPlatformClientV2.WfmHistoricalShrinkageRequest() # WfmHistoricalShrinkageRequest | body (optional) try: # Request a historical shrinkage report api_response = api_instance.post_workforcemanagement_managementunit_shrinkage_jobs(management_unit_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_shrinkage_jobs: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/timeofflimits Genesys Cloud Python SDK.
Genesys describes this as an API used to: Gets a list of time off limit objects under management unit. Currently only one time off limit object is allowed under management unit, so the list contains either 0 or 1 element.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); management_unit_id = 'management_unit_id_example' # str | The ID of the management unit. try: # Gets a list of time off limit objects under management unit. api_response = api_instance.get_workforcemanagement_managementunit_timeofflimits(management_unit_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_timeofflimits: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/timeofflimits Genesys Cloud Python SDK.
Genesys describes this as an API used to: Creates a new time off limit object under management unit. Only one limit object is allowed under management unit, so an attempt to create second object will fail.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); management_unit_id = 'management_unit_id_example' # str | The ID of the management unit. body = PureCloudPlatformClientV2.CreateTimeOffLimitRequest() # CreateTimeOffLimitRequest | body (optional) try: # Creates a new time off limit object under management unit. api_response = api_instance.post_workforcemanagement_managementunit_timeofflimits(management_unit_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_timeofflimits: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/timeofflimits/values/query Genesys Cloud Python SDK.
Genesys describes this as an API used to: Retrieves time off limit related values based on a given set of filters.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); management_unit_id = 'management_unit_id_example' # str | The ID of the management unit. body = PureCloudPlatformClientV2.QueryTimeOffLimitValuesRequest() # QueryTimeOffLimitValuesRequest | body (optional) try: # Retrieves time off limit related values based on a given set of filters. api_response = api_instance.post_workforcemanagement_managementunit_timeofflimits_values_query(management_unit_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_timeofflimits_values_query: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/workforcemanagement/managementunits/{managementUnitId}/timeofflimits/{timeOffLimitId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Deletes a time off limit object
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); management_unit_id = 'management_unit_id_example' # str | The ID of the management unit. time_off_limit_id = 'time_off_limit_id_example' # str | The ID of the time off limit object to delete try: # Deletes a time off limit object api_instance.delete_workforcemanagement_managementunit_timeofflimit(management_unit_id, time_off_limit_id) except ApiException as e: print("Exception when calling WorkforceManagementApi->delete_workforcemanagement_managementunit_timeofflimit: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/timeofflimits/{timeOffLimitId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Gets a time off limit object. Returns properties of time off limit object, but not daily values.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); management_unit_id = 'management_unit_id_example' # str | The ID of the management unit. time_off_limit_id = 'time_off_limit_id_example' # str | The ID of the time off limit to fetch try: # Gets a time off limit object api_response = api_instance.get_workforcemanagement_managementunit_timeofflimit(management_unit_id, time_off_limit_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_timeofflimit: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/workforcemanagement/managementunits/{managementUnitId}/timeofflimits/{timeOffLimitId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Updates a time off limit object. Updates time off limit object properties, but not daily values.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); management_unit_id = 'management_unit_id_example' # str | The ID of the management unit. time_off_limit_id = 'time_off_limit_id_example' # str | The id of time off limit object to update body = PureCloudPlatformClientV2.UpdateTimeOffLimitRequest() # UpdateTimeOffLimitRequest | body (optional) try: # Updates a time off limit object. api_response = api_instance.patch_workforcemanagement_managementunit_timeofflimit(management_unit_id, time_off_limit_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->patch_workforcemanagement_managementunit_timeofflimit: %s\n" % e)```