instruction
stringlengths
81
221
input
stringlengths
50
1.19k
output
stringlengths
525
3.61k
Provide a Python example that uses the PUT /api/v2/workforcemanagement/managementunits/{managementUnitId}/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(); 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 set values for body = PureCloudPlatformClientV2.SetTimeOffLimitValuesRequest() # SetTimeOffLimitValuesRequest | body (optional) try: # Sets daily values for a date range of time off limit object api_response = api_instance.put_workforcemanagement_managementunit_timeofflimit_values(management_unit_id, time_off_limit_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->put_workforcemanagement_managementunit_timeofflimit_values: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/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(); management_unit_id = 'management_unit_id_example' # str | The ID of the management unit try: # Gets a list of time off plans api_response = api_instance.get_workforcemanagement_managementunit_timeoffplans(management_unit_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_timeoffplans: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/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(); management_unit_id = 'management_unit_id_example' # str | The ID of the management unit body = PureCloudPlatformClientV2.CreateTimeOffPlanRequest() # CreateTimeOffPlanRequest | body (optional) try: # Creates a new time off plan api_response = api_instance.post_workforcemanagement_managementunit_timeoffplans(management_unit_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_timeoffplans: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/workforcemanagement/managementunits/{managementUnitId}/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(); management_unit_id = 'management_unit_id_example' # str | The ID of the management 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_managementunit_timeoffplan(management_unit_id, time_off_plan_id) except ApiException as e: print("Exception when calling WorkforceManagementApi->delete_workforcemanagement_managementunit_timeoffplan: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/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(); management_unit_id = 'management_unit_id_example' # str | The ID of the management 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_managementunit_timeoffplan(management_unit_id, time_off_plan_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_timeoffplan: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/workforcemanagement/managementunits/{managementUnitId}/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(); management_unit_id = 'management_unit_id_example' # str | The ID of the management unit time_off_plan_id = 'time_off_plan_id_example' # str | The ID of the time off plan to update body = PureCloudPlatformClientV2.UpdateTimeOffPlanRequest() # UpdateTimeOffPlanRequest | body (optional) try: # Updates a time off plan api_response = api_instance.patch_workforcemanagement_managementunit_timeoffplan(management_unit_id, time_off_plan_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->patch_workforcemanagement_managementunit_timeoffplan: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/timeoffrequests Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create a new time off request
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.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.CreateAdminTimeOffRequest() # CreateAdminTimeOffRequest | body (optional) try: # Create a new time off request api_response = api_instance.post_workforcemanagement_managementunit_timeoffrequests(management_unit_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_timeoffrequests: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/timeoffrequests/integrationstatus/query Genesys Cloud Python SDK.
Genesys describes this as an API used to: Retrieves integration statuses for a list of time off 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. body = PureCloudPlatformClientV2.QueryTimeOffIntegrationStatusRequest() # QueryTimeOffIntegrationStatusRequest | body (optional) try: # Retrieves integration statuses for a list of time off requests api_response = api_instance.post_workforcemanagement_managementunit_timeoffrequests_integrationstatus_query(management_unit_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_timeoffrequests_integrationstatus_query: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/timeoffrequests/query Genesys Cloud Python SDK.
Genesys describes this as an API used to: Fetches time off requests matching the conditions specified in the request body. Request body requires one of the following: User ID is specified, statuses == [Pending] or date range to be specified and less than or equal to 33 days. All other fields are 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, or 'mine' for the management unit of the logged-in user. 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.TimeOffRequestQueryBody() # TimeOffRequestQueryBody | body (optional) try: # Fetches time off requests matching the conditions specified in the request body api_response = api_instance.post_workforcemanagement_managementunit_timeoffrequests_query(management_unit_id, force_download_service=force_download_service, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_timeoffrequests_query: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/timeoffrequests/waitlistpositions/query Genesys Cloud Python SDK.
Genesys describes this as an API used to: Retrieves daily waitlist position for a list of time off 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. body = PureCloudPlatformClientV2.QueryWaitlistPositionsRequest() # QueryWaitlistPositionsRequest | body (optional) try: # Retrieves daily waitlist position for a list of time off requests api_response = api_instance.post_workforcemanagement_managementunit_timeoffrequests_waitlistpositions_query(management_unit_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_timeoffrequests_waitlistpositions_query: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/workforcemanagement/managementunits/{managementUnitId}/timeoffrequests/{timeOffRequestId}/users/{userId}/integrationstatus Genesys Cloud Python SDK.
Genesys describes this as an API used to: Set integration status for a time off request.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); management_unit_id = 'management_unit_id_example' # str | The ID of the management unit. time_off_request_id = 'time_off_request_id_example' # str | The ID of the time off request. user_id = 'user_id_example' # str | The ID of user to whom the time off request belongs. body = PureCloudPlatformClientV2.SetTimeOffIntegrationStatusRequest() # SetTimeOffIntegrationStatusRequest | body (optional) try: # Set integration status for a time off request. api_response = api_instance.patch_workforcemanagement_managementunit_timeoffrequest_user_integrationstatus(management_unit_id, time_off_request_id, user_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->patch_workforcemanagement_managementunit_timeoffrequest_user_integrationstatus: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/users Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get users 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. try: # Get users in the management unit api_response = api_instance.get_workforcemanagement_managementunit_users(management_unit_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_users: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/users/{userId}/timeoffbalance/jobs Genesys Cloud Python SDK.
Genesys describes this as an API used to: Query time off balances for a given user for specified activity code and dates
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_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 user_id = 'user_id_example' # str | The ID of the user body = PureCloudPlatformClientV2.TimeOffBalanceRequest() # TimeOffBalanceRequest | The request body try: # Query time off balances for a given user for specified activity code and dates api_response = api_instance.post_workforcemanagement_managementunit_user_timeoffbalance_jobs(management_unit_id, user_id, body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_user_timeoffbalance_jobs: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/users/{userId}/timeoffrequests Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a list of time off requests for a given 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(); 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. user_id = 'user_id_example' # str | The userId to whom the Time Off Request applies. recently_reviewed = False # bool | Limit results to requests that have been reviewed within the preceding 30 days (optional) (default to False) try: # Get a list of time off requests for a given user api_response = api_instance.get_workforcemanagement_managementunit_user_timeoffrequests(management_unit_id, user_id, recently_reviewed=recently_reviewed) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_user_timeoffrequests: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/users/{userId}/timeoffrequests/estimate Genesys Cloud Python SDK.
Genesys describes this as an API used to: Estimates available time off for an 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 user_id = 'user_id_example' # str | The id of the user for whom the time off request estimate is requested body = PureCloudPlatformClientV2.EstimateAvailableTimeOffRequest() # EstimateAvailableTimeOffRequest | body (optional) try: # Estimates available time off for an agent api_response = api_instance.post_workforcemanagement_managementunit_user_timeoffrequests_estimate(management_unit_id, user_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_user_timeoffrequests_estimate: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/users/{userId}/timeoffrequests/{timeOffRequestId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a time off request
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.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. user_id = 'user_id_example' # str | The userId to whom the Time Off Request applies. time_off_request_id = 'time_off_request_id_example' # str | Time Off Request Id try: # Get a time off request api_response = api_instance.get_workforcemanagement_managementunit_user_timeoffrequest(management_unit_id, user_id, time_off_request_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_user_timeoffrequest: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/workforcemanagement/managementunits/{managementUnitId}/users/{userId}/timeoffrequests/{timeOffRequestId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a time off request
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.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. user_id = 'user_id_example' # str | The id of the user the requested time off request belongs to time_off_request_id = 'time_off_request_id_example' # str | The id of the time off request to update body = PureCloudPlatformClientV2.AdminTimeOffRequestPatch() # AdminTimeOffRequestPatch | body (optional) try: # Update a time off request api_response = api_instance.patch_workforcemanagement_managementunit_user_timeoffrequest(management_unit_id, user_id, time_off_request_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->patch_workforcemanagement_managementunit_user_timeoffrequest: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/users/{userId}/timeoffrequests/{timeOffRequestId}/timeoffbalance/jobs Genesys Cloud Python SDK.
Genesys describes this as an API used to: Query time off balances for dates spanned by a given time off request
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); management_unit_id = 'management_unit_id_example' # str | The ID of the management unit. user_id = 'user_id_example' # str | The userId to whom the time off request applies. time_off_request_id = 'time_off_request_id_example' # str | The time off request id. try: # Query time off balances for dates spanned by a given time off request api_response = api_instance.post_workforcemanagement_managementunit_user_timeoffrequest_timeoffbalance_jobs(management_unit_id, user_id, time_off_request_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_user_timeoffrequest_timeoffbalance_jobs: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/users/{userId}/timeoffrequests/{timeOffRequestId}/timeofflimits Genesys Cloud Python SDK.
Genesys describes this as an API used to: Retrieves time off limit, allocated and waitlisted values according to specific time off request
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); management_unit_id = 'management_unit_id_example' # str | The ID of the management unit. user_id = 'user_id_example' # str | The userId to whom the time off request applies. time_off_request_id = 'time_off_request_id_example' # str | The ID of the time off request, which dates and activityCodeId determine limit values to retrieve try: # Retrieves time off limit, allocated and waitlisted values according to specific time off request api_response = api_instance.get_workforcemanagement_managementunit_user_timeoffrequest_timeofflimits(management_unit_id, user_id, time_off_request_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_user_timeoffrequest_timeofflimits: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shifttrades Genesys Cloud Python SDK.
Genesys describes this as an API used to: Gets all the shift trades for a given 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(); 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. week_date_id = '2013-10-20' # date | The start date of the week schedule in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd evaluate_matches = True # bool | Whether to evaluate the matches for violations (optional) (default to True) 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 all the shift trades for a given week api_response = api_instance.get_workforcemanagement_managementunit_week_shifttrades(management_unit_id, week_date_id, evaluate_matches=evaluate_matches, force_download_service=force_download_service) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_week_shifttrades: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shifttrades Genesys Cloud Python SDK.
Genesys describes this as an API used to: Adds a shift trade
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_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. week_date_id = '2013-10-20' # date | The start date of the week schedule in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd body = PureCloudPlatformClientV2.AddShiftTradeRequest() # AddShiftTradeRequest | body try: # Adds a shift trade api_response = api_instance.post_workforcemanagement_managementunit_week_shifttrades(management_unit_id, week_date_id, body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_week_shifttrades: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shifttrades/search Genesys Cloud Python SDK.
Genesys describes this as an API used to: Searches for potential shift trade matches for the current 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. week_date_id = '2013-10-20' # date | The start date of the week schedule in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd body = PureCloudPlatformClientV2.SearchShiftTradesRequest() # SearchShiftTradesRequest | body force_download_service = True # bool | Force the result of this operation to be sent via download service. For testing/app development purposes (optional) try: # Searches for potential shift trade matches for the current agent api_response = api_instance.post_workforcemanagement_managementunit_week_shifttrades_search(management_unit_id, week_date_id, body, force_download_service=force_download_service) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_week_shifttrades_search: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shifttrades/state/bulk Genesys Cloud Python SDK.
Genesys describes this as an API used to: Updates the state of a batch of shift trades. Admin functionality is not supported with "mine".
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_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. week_date_id = '2013-10-20' # date | The start date of the week schedule in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd body = PureCloudPlatformClientV2.BulkShiftTradeStateUpdateRequest() # BulkShiftTradeStateUpdateRequest | body force_async = True # bool | Force the result of this operation to be sent asynchronously via notification. For testing/app development purposes (optional) try: # Updates the state of a batch of shift trades api_response = api_instance.post_workforcemanagement_managementunit_week_shifttrades_state_bulk(management_unit_id, week_date_id, body, force_async=force_async) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_week_shifttrades_state_bulk: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shifttrades/{tradeId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Updates a shift trade. This route can only be called by the initiating 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. week_date_id = '2013-10-20' # date | The start date of the week schedule in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd trade_id = 'trade_id_example' # str | The ID of the shift trade to update body = PureCloudPlatformClientV2.PatchShiftTradeRequest() # PatchShiftTradeRequest | body try: # Updates a shift trade. This route can only be called by the initiating agent api_response = api_instance.patch_workforcemanagement_managementunit_week_shifttrade(management_unit_id, week_date_id, trade_id, body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->patch_workforcemanagement_managementunit_week_shifttrade: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/weeks/{weekDateId}/shifttrades/{tradeId}/match Genesys Cloud Python SDK.
Genesys describes this as an API used to: Matches a shift trade. This route can only be called by the receiving 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. week_date_id = '2013-10-20' # date | The start date of the week schedule in yyyy-MM-dd format. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd trade_id = 'trade_id_example' # str | The ID of the shift trade to update body = PureCloudPlatformClientV2.MatchShiftTradeRequest() # MatchShiftTradeRequest | body try: # Matches a shift trade. This route can only be called by the receiving agent api_response = api_instance.post_workforcemanagement_managementunit_week_shifttrade_match(management_unit_id, week_date_id, trade_id, body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_week_shifttrade_match: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/workplanrotations Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get work plan rotations
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_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 work plan rotations api_response = api_instance.get_workforcemanagement_managementunit_workplanrotations(management_unit_id, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_workplanrotations: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/workplanrotations Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create a new work plan rotation
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_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.AddWorkPlanRotationRequest() # AddWorkPlanRotationRequest | body (optional) try: # Create a new work plan rotation api_response = api_instance.post_workforcemanagement_managementunit_workplanrotations(management_unit_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_workplanrotations: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/workforcemanagement/managementunits/{managementUnitId}/workplanrotations/{workPlanRotationId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete a work plan rotation
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_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. work_plan_rotation_id = 'work_plan_rotation_id_example' # str | The ID of the work plan rotation to be deleted try: # Delete a work plan rotation api_instance.delete_workforcemanagement_managementunit_workplanrotation(management_unit_id, work_plan_rotation_id) except ApiException as e: print("Exception when calling WorkforceManagementApi->delete_workforcemanagement_managementunit_workplanrotation: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/workplanrotations/{workPlanRotationId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a work plan rotation
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_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. work_plan_rotation_id = 'work_plan_rotation_id_example' # str | The ID of the work plan rotation to fetch try: # Get a work plan rotation api_response = api_instance.get_workforcemanagement_managementunit_workplanrotation(management_unit_id, work_plan_rotation_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_workplanrotation: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/workforcemanagement/managementunits/{managementUnitId}/workplanrotations/{workPlanRotationId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a work plan rotation
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_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. work_plan_rotation_id = 'work_plan_rotation_id_example' # str | The ID of the work plan rotation to update body = PureCloudPlatformClientV2.UpdateWorkPlanRotationRequest() # UpdateWorkPlanRotationRequest | body (optional) try: # Update a work plan rotation api_response = api_instance.patch_workforcemanagement_managementunit_workplanrotation(management_unit_id, work_plan_rotation_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->patch_workforcemanagement_managementunit_workplanrotation: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/workplanrotations/{workPlanRotationId}/copy Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create a copy of work plan rotation
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_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. work_plan_rotation_id = 'work_plan_rotation_id_example' # str | The ID of the work plan rotation to create a copy body = PureCloudPlatformClientV2.CopyWorkPlanRotationRequest() # CopyWorkPlanRotationRequest | body (optional) try: # Create a copy of work plan rotation api_response = api_instance.post_workforcemanagement_managementunit_workplanrotation_copy(management_unit_id, work_plan_rotation_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_workplanrotation_copy: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/workplans Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get work plans. "expand=details" is deprecated
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_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] | Include to access additional data on the work plans (optional) exclude = ['exclude_example'] # list[str] | Exclude specific data on the work plans from the response (optional) try: # Get work plans api_response = api_instance.get_workforcemanagement_managementunit_workplans(management_unit_id, expand=expand, exclude=exclude) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_workplans: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/workplans Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create a new work 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(); 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. validation_mode = 'validation_mode_example' # str | Allows to create work plan even if the validation result is invalid (optional) body = PureCloudPlatformClientV2.CreateWorkPlan() # CreateWorkPlan | body (optional) try: # Create a new work plan api_response = api_instance.post_workforcemanagement_managementunit_workplans(management_unit_id, validation_mode=validation_mode, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_workplans: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/workforcemanagement/managementunits/{managementUnitId}/workplans/{workPlanId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete a work 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(); 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. work_plan_id = 'work_plan_id_example' # str | The ID of the work plan to delete try: # Delete a work plan api_instance.delete_workforcemanagement_managementunit_workplan(management_unit_id, work_plan_id) except ApiException as e: print("Exception when calling WorkforceManagementApi->delete_workforcemanagement_managementunit_workplan: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/workplans/{workPlanId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a work 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(); 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. work_plan_id = 'work_plan_id_example' # str | The ID of the work plan to fetch include_only = ['include_only_example'] # list[str] | limit response to the specified fields (optional) try: # Get a work plan api_response = api_instance.get_workforcemanagement_managementunit_workplan(management_unit_id, work_plan_id, include_only=include_only) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_managementunit_workplan: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/workforcemanagement/managementunits/{managementUnitId}/workplans/{workPlanId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a work 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(); 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. work_plan_id = 'work_plan_id_example' # str | The ID of the work plan to update validation_mode = 'validation_mode_example' # str | Allows to update work plan even if validation result is invalid (optional) body = PureCloudPlatformClientV2.WorkPlan() # WorkPlan | body (optional) try: # Update a work plan api_response = api_instance.patch_workforcemanagement_managementunit_workplan(management_unit_id, work_plan_id, validation_mode=validation_mode, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->patch_workforcemanagement_managementunit_workplan: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/workplans/{workPlanId}/copy Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create a copy of work 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(); 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. work_plan_id = 'work_plan_id_example' # str | The ID of the work plan to create a copy body = PureCloudPlatformClientV2.CopyWorkPlan() # CopyWorkPlan | body (optional) try: # Create a copy of work plan api_response = api_instance.post_workforcemanagement_managementunit_workplan_copy(management_unit_id, work_plan_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_workplan_copy: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/managementunits/{managementUnitId}/workplans/{workPlanId}/validate Genesys Cloud Python SDK.
Genesys describes this as an API used to: Validate Work 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(); 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. work_plan_id = 'work_plan_id_example' # str | The ID of the work plan to validate. For new work plan, use the word 'new' for the ID. expand = ['expand_example'] # list[str] | (optional) body = PureCloudPlatformClientV2.WorkPlanValidationRequest() # WorkPlanValidationRequest | body (optional) try: # Validate Work Plan api_response = api_instance.post_workforcemanagement_managementunit_workplan_validate(management_unit_id, work_plan_id, expand=expand, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_managementunit_workplan_validate: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/notifications Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a list of notifications for the current user. Notifications are only initially sent if you have the relevant Notify and Edit permissions
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); try: # Get a list of notifications for the current user api_response = api_instance.get_workforcemanagement_notifications() pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_notifications: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/notifications/update Genesys Cloud Python SDK.
Genesys describes this as an API used to: Mark a list of notifications as read or unread
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_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.UpdateNotificationsRequest() # UpdateNotificationsRequest | body (optional) try: # Mark a list of notifications as read or unread api_response = api_instance.post_workforcemanagement_notifications_update(body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_notifications_update: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/schedulingjobs/{jobId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get status of the scheduling 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 scheduling job try: # Get status of the scheduling job api_response = api_instance.get_workforcemanagement_schedulingjob(job_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_schedulingjob: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/shifttrades Genesys Cloud Python SDK.
Genesys describes this as an API used to: Gets all of my shift trades
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_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: # Gets all of my shift trades api_response = api_instance.get_workforcemanagement_shifttrades() pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_shifttrades: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/shrinkage/jobs/{jobId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Request to fetch the status of the historical shrinkage query
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_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 | jobId try: # Request to fetch the status of the historical shrinkage query api_response = api_instance.get_workforcemanagement_shrinkage_job(job_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_shrinkage_job: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/teams/{teamId}/adherence/historical Genesys Cloud Python SDK.
Genesys describes this as an API used to: Request a teams 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(); team_id = 'team_id_example' # str | The ID of the team body = PureCloudPlatformClientV2.WfmHistoricalAdherenceQueryForTeams() # WfmHistoricalAdherenceQueryForTeams | body (optional) try: # Request a teams historical adherence report api_response = api_instance.post_workforcemanagement_team_adherence_historical(team_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_team_adherence_historical: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/teams/{teamId}/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
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_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(); team_id = 'team_id_example' # str | The ID of the team body = PureCloudPlatformClientV2.WfmHistoricalShrinkageTeamsRequest() # WfmHistoricalShrinkageTeamsRequest | body (optional) try: # Request a historical shrinkage report api_response = api_instance.post_workforcemanagement_team_shrinkage_jobs(team_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_team_shrinkage_jobs: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/timeoffbalance/jobs Genesys Cloud Python SDK.
Genesys describes this as an API used to: Query time off balances for the current user for specified activity code and dates
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_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.TimeOffBalanceRequest() # TimeOffBalanceRequest | The request body try: # Query time off balances for the current user for specified activity code and dates api_response = api_instance.post_workforcemanagement_timeoffbalance_jobs(body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_timeoffbalance_jobs: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/timeoffbalance/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_timeoffbalance_job(job_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_timeoffbalance_job: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/timeofflimits/available/query Genesys Cloud Python SDK.
Genesys describes this as an API used to: Queries available time off 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(); body = PureCloudPlatformClientV2.AvailableTimeOffRequest() # AvailableTimeOffRequest | body (optional) try: # Queries available time off for the current user api_response = api_instance.post_workforcemanagement_timeofflimits_available_query(body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_timeofflimits_available_query: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/timeoffrequests Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a list of time off requests 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(); recently_reviewed = False # bool | Limit results to requests that have been reviewed within the preceding 30 days (optional) (default to False) try: # Get a list of time off requests for the current user api_response = api_instance.get_workforcemanagement_timeoffrequests(recently_reviewed=recently_reviewed) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_timeoffrequests: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/timeoffrequests Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create a time off request 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(); body = PureCloudPlatformClientV2.CreateAgentTimeOffRequest() # CreateAgentTimeOffRequest | body (optional) try: # Create a time off request for the current user api_response = api_instance.post_workforcemanagement_timeoffrequests(body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_timeoffrequests: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/timeoffrequests/estimate Genesys Cloud Python SDK.
Genesys describes this as an API used to: Estimates available time off for 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(); body = PureCloudPlatformClientV2.EstimateAvailableTimeOffRequest() # EstimateAvailableTimeOffRequest | body (optional) try: # Estimates available time off for current user api_response = api_instance.post_workforcemanagement_timeoffrequests_estimate(body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_timeoffrequests_estimate: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/workforcemanagement/timeoffrequests/integrationstatus/query Genesys Cloud Python SDK.
Genesys describes this as an API used to: Retrieves integration statuses for a list of current user time off 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(); body = PureCloudPlatformClientV2.CurrentUserTimeOffIntegrationStatusRequest() # CurrentUserTimeOffIntegrationStatusRequest | body (optional) try: # Retrieves integration statuses for a list of current user time off requests api_response = api_instance.post_workforcemanagement_timeoffrequests_integrationstatus_query(body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_timeoffrequests_integrationstatus_query: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/timeoffrequests/{timeOffRequestId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a time off request 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(); time_off_request_id = 'time_off_request_id_example' # str | The ID of the time off request try: # Get a time off request for the current user api_response = api_instance.get_workforcemanagement_timeoffrequest(time_off_request_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_timeoffrequest: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/workforcemanagement/timeoffrequests/{timeOffRequestId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a time off request 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(); time_off_request_id = 'time_off_request_id_example' # str | The ID of the time off request body = PureCloudPlatformClientV2.AgentTimeOffRequestPatch() # AgentTimeOffRequestPatch | body (optional) try: # Update a time off request for the current user api_response = api_instance.patch_workforcemanagement_timeoffrequest(time_off_request_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->patch_workforcemanagement_timeoffrequest: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/timeoffrequests/{timeOffRequestId}/waitlistpositions Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the daily waitlist positions of a time off request 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(); time_off_request_id = 'time_off_request_id_example' # str | The ID of the time off request try: # Get the daily waitlist positions of a time off request for the current user api_response = api_instance.get_workforcemanagement_timeoffrequest_waitlistpositions(time_off_request_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_timeoffrequest_waitlistpositions: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/workforcemanagement/users/workplanbidranks/bulk Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update bulk work plan bid ranks on users. Max 50 users can be updated at a time.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); body = [PureCloudPlatformClientV2.WorkPlanBidRanks()] # list[WorkPlanBidRanks] | Users try: # Update bulk work plan bid ranks on users. Max 50 users can be updated at a time. api_response = api_instance.patch_workforcemanagement_users_workplanbidranks_bulk(body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->patch_workforcemanagement_users_workplanbidranks_bulk: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/users/{userId}/workplanbidranks Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get work plan bid ranks for a user
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); user_id = 'user_id_example' # str | The userId to whom the work plan bid ranks apply. try: # Get work plan bid ranks for a user api_response = api_instance.get_workforcemanagement_user_workplanbidranks(user_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_user_workplanbidranks: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/workforcemanagement/users/{userId}/workplanbidranks Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update work plan bid ranks for a user
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.WorkforceManagementApi(); user_id = 'user_id_example' # str | The userId to whom the work plan bid ranks apply. body = PureCloudPlatformClientV2.WorkPlanBidRanks() # WorkPlanBidRanks | body (optional) try: # Update work plan bid ranks for a user api_response = api_instance.patch_workforcemanagement_user_workplanbidranks(user_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->patch_workforcemanagement_user_workplanbidranks: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/workplanbids Genesys Cloud Python SDK.
Genesys describes this as an API used to: Gets the list of work plan bids that belong to an 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(); try: # Gets the list of work plan bids that belong to an agent api_response = api_instance.get_workforcemanagement_workplanbids() pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_workplanbids: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/workplanbids/{bidId}/preferences Genesys Cloud Python SDK.
Genesys describes this as an API used to: Gets an agent's work plan bidding preference
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_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(); bid_id = 'bid_id_example' # str | The ID of the work plan bid try: # Gets an agent's work plan bidding preference api_response = api_instance.get_workforcemanagement_workplanbid_preferences(bid_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_workplanbid_preferences: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/workforcemanagement/workplanbids/{bidId}/preferences Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update an agent's work plan bidding preference
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_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(); bid_id = 'bid_id_example' # str | The ID of the work plan bid body = PureCloudPlatformClientV2.UpdateAgentWorkPlanBiddingPreference() # UpdateAgentWorkPlanBiddingPreference | body (optional) try: # Update an agent's work plan bidding preference api_response = api_instance.patch_workforcemanagement_workplanbid_preferences(bid_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->patch_workforcemanagement_workplanbid_preferences: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/workforcemanagement/workplanbids/{bidId}/workplans Genesys Cloud Python SDK.
Genesys describes this as an API used to: Gets an agent's work plans for a 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(); bid_id = 'bid_id_example' # str | The ID of the work plan bid try: # Gets an agent's work plans for a bid api_response = api_instance.get_workforcemanagement_workplanbid_workplans(bid_id) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->get_workforcemanagement_workplanbid_workplans: %s\n" % e)```