### post_guides_jobs Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/AIStudioApi.md Starts a guide content generation job. ```APIDOC ## post_guides_jobs ### Description Start a guide content generation job. ### Method POST ### Endpoint /api/v2/guides/jobs ### Request Body - **body** (object) - Required - The guide job to create ### Return Type [GuideJob](GuideJob) ``` -------------------------------- ### Start Guide Version Publishing Job Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/AIStudioApi.md Initiates the publishing process for a specific guide version. Requires 'aiStudio:guideVersionJob:add' permission. ```python import 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' # create an instance of the API class api_instance = PureCloudPlatformClientV2.AIStudioApi() guide_id = 'guide_id_example' # str | Guide ID version_id = 'version_id_example' # str | Version ID body = PureCloudPlatformClientV2.GuideVersionPublishJobRequest() # GuideVersionPublishJobRequest | try: # Start the publishing of a guide version. api_response = api_instance.post_guide_version_jobs(guide_id, version_id, body) pprint(api_response) except ApiException as e: print("Exception when calling AIStudioApi->post_guide_version_jobs: %s\n" % e) ``` -------------------------------- ### Start Guide Content Generation Job Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/AIStudioApi.md Initiates a job to generate content for a guide. Requires 'aiStudio:guideJob:add' permission. ```python import 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' # create an instance of the API class api_instance = PureCloudPlatformClientV2.AIStudioApi() body = PureCloudPlatformClientV2.GenerateGuideContentRequest() # GenerateGuideContentRequest | try: # Start a guide content generation job. api_response = api_instance.post_guides_jobs(body) pprint(api_response) except ApiException as e: print("Exception when calling AIStudioApi->post_guides_jobs: %s\n" % e) ``` -------------------------------- ### Get All Guides Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/AIStudioApi.md Fetches a list of guides with optional filtering by name, name contains, status, and sorting options. Supports pagination. ```python import 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' # create an instance of the API class api_instance = PureCloudPlatformClientV2.AIStudioApi() name = 'name_example' # str | Filter by matching name - case insensitive. (optional) name_contains = 'name_contains_example' # str | Filter by name contains - case insensitive. (optional) status = 'status_example' # str | Filter by status. (optional) sort_by = ''dateModified'' # str | Sort by. Default value dateModified. (optional) (default to 'dateModified') sort_order = ''desc'' # str | Sort Order. Default value desc. (optional) (default to 'desc') page_number = 1 # int | Page number. (optional) (default to 1) page_size = 25 # int | Page size. The maximum page size is 100. (optional) (default to 25) try: # Get all guides. api_response = api_instance.get_guides(name=name, name_contains=name_contains, status=status, sort_by=sort_by, sort_order=sort_order, page_number=page_number, page_size=page_size) pprint(api_response) except ApiException as e: print("Exception when calling AIStudioApi->get_guides: %s\n" % e) ``` -------------------------------- ### post_guide_version_jobs Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/AIStudioApi.md Starts the publishing process for a specific guide version. ```APIDOC ## post_guide_version_jobs ### Description Start the publishing of a guide version. ### Method POST ### Endpoint /api/v2/guides/{guideId}/versions/{versionId}/jobs ### Parameters #### Path Parameters - **guide_id** (str) - Required - Guide ID - **version_id** (str) - Required - Version ID ### Return Type [GuideVersionJob](GuideVersionJob) ``` -------------------------------- ### Get All Guides Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/AIStudioApi.md Retrieves a list of guides, with options for filtering by name, name containment, status, sorting, and pagination. ```APIDOC ## GET /api/v2/guides ### Description Retrieves a list of guides, with options for filtering by name, name containment, status, sorting, and pagination. ### Method GET ### Endpoint /api/v2/guides ### Parameters #### Query Parameters - **name** (str) - Filter by matching name - case insensitive. [optional] - **name_contains** (str) - Filter by name contains - case insensitive. [optional] - **status** (str) - Filter by status. [optional] Values: Published, Draft - **sort_by** (str) - Sort by. Default value dateModified. [optional] Values: dateModified, name, status - **sort_order** (str) - Sort Order. Default value desc. [optional] Values: asc, desc - **page_number** (int) - Page number. [optional] [default to 1] - **page_size** (int) - Page size. The maximum page size is 100. [optional] [default to 25] ### Response #### Success Response (200) - **guides** (GuideEntityListing) - A list of guides. #### Response Example { "example": "GuideEntityListing" } ``` -------------------------------- ### Create Guide Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/AIStudioApi.md Creates a new guide. Requires 'aiStudio:guide:add' permission. ```python import 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' # create an instance of the API class api_instance = PureCloudPlatformClientV2.AIStudioApi() body = PureCloudPlatformClientV2.CreateGuide() # CreateGuide | try: # Create a guide. api_response = api_instance.post_guides(body) pprint(api_response) except ApiException as e: print("Exception when calling AIStudioApi->post_guides: %s\n" % e) ``` -------------------------------- ### Get Guide Version Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/AIStudioApi.md Retrieves a specific version of a guide. This is useful for accessing historical or specific states of a guide. ```python import 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' # create an instance of the API class api_instance = PureCloudPlatformClientV2.AIStudioApi() guide_id = 'guide_id_example' # str | Guide ID version_id = 'version_id_example' # str | Version ID try: # Get a guide version. api_response = api_instance.get_guide_version(guide_id, version_id) pprint(api_response) except ApiException as e: print("Exception when calling AIStudioApi->get_guide_version: %s\n" % e) ``` -------------------------------- ### post_guides_jobs Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/AIStudioApi.md Starts a guide content generation job. This operation wraps the POST /api/v2/guides/jobs endpoint and requires the aiStudio:guideJob:add permission. ```APIDOC ## POST /api/v2/guides/jobs ### Description Start a guide content generation job. ### Method POST ### Endpoint /api/v2/guides/jobs ### Parameters #### Request Body - **body** (GenerateGuideContentRequest) - Required - ### Response #### Success Response (200) - **GuideContentGenerationJob** (GuideContentGenerationJob) - Description of the returned object ### Permissions Requires ALL permissions: * aiStudio:guideJob:add ``` -------------------------------- ### Install PureCloudPlatformClientV2 SDK Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/README.md Install the SDK using pip. Ensure the maximum path length limitation is removed on Windows prior to installation. ```bash pip install PureCloudPlatformClientV2 ``` -------------------------------- ### Instantiate API and Get User Info Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/README.md Example of instantiating the UsersApi and calling the get_users_me method to retrieve authenticated user information. ```python usersApi = PureCloudPlatformClientV2.UsersApi() print(usersApi.get_users_me()) ``` -------------------------------- ### Start Guide Deletion Job Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/AIStudioApi.md Initiates the deletion process for a guide. Requires aiStudio:guideJob:add permission. Returns a GuideJob object. ```python import 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' # create an instance of the API class api_instance = PureCloudPlatformClientV2.AIStudioApi() guide_id = 'guide_id_example' # str | Guide ID try: # Start the deletion of a guide. api_response = api_instance.delete_guide_jobs(guide_id) pprint(api_response) except ApiException as e: print("Exception when calling AIStudioApi->delete_guide_jobs: %s\n" % e) ``` -------------------------------- ### Start Campaign Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/OutboundApi.md Starts a campaign. Requires the outbound:campaign:start permission. ```python import 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' # create an instance of the API class api_instance = PureCloudPlatformClientV2.OutboundApi() campaign_id = 'campaign_id_example' # str | Campaign ID try: # Start the campaign api_instance.post_outbound_campaign_start(campaign_id) except ApiException as e: print("Exception when calling OutboundApi->post_outbound_campaign_start: %s\n" % e) ``` -------------------------------- ### Generate Upload URL for Guide Content Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/AIStudioApi.md Generates a presigned URL for uploading file content to create a guide. Requires aiStudio:guide:upload permission. ```python import 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' # create an instance of the API class api_instance = PureCloudPlatformClientV2.AIStudioApi() body = PureCloudPlatformClientV2.UploadUrlRequest() # UploadUrlRequest | query try: # Generate presigned URL for uploading a file content to generate guide api_response = api_instance.post_guides_uploads(body) pprint(api_response) except ApiException as e: print("Exception when calling AIStudioApi->post_guides_uploads: %s\n" % e) ``` -------------------------------- ### Create Site - Python Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/TelephonyProvidersEdgeApi.md This example shows how to create a new site. It requires the PureCloud Platform Client SDK and proper OAuth2 authentication. The 'Site' object should be populated with the necessary details. ```python import 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' # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi() body = PureCloudPlatformClientV2.Site() # Site | Site try: # Create a Site. api_response = api_instance.post_telephony_providers_edges_sites(body) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->post_telephony_providers_edges_sites: %s\n" % e) ``` -------------------------------- ### Get Learning Assignments for Current User Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/LearningApi.md Retrieves a list of learning assignments for the currently authenticated user. This example demonstrates basic setup and how to initiate the API call. ```python import 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' # Instantiate the API instance api_instance = PureCloudPlatformClientV2.LearningApi() try: # Call the API to get learning assignments # Example with default parameters (no filters applied) result = api_instance.get_learning_assignments_me() pprint(result) except ApiException as e: print(f"Exception when calling LearningApi->get_learning_assignments_me: {e}") ``` -------------------------------- ### Get User Points Trends Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/GamificationApi.md Retrieves the points trend for a user over a specified date range. This example shows basic setup and API call, with optional day_of_week parameter. ```python import 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' # create an instance of the API class api_instance = PureCloudPlatformClientV2.GamificationApi() ``` -------------------------------- ### Create Guide Version Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/AIStudioApi.md Creates a new version for an existing guide. Requires 'aiStudio:guideVersion:add' permission. ```python import 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' # create an instance of the API class api_instance = PureCloudPlatformClientV2.AIStudioApi() guide_id = 'guide_id_example' # str | Guide ID body = PureCloudPlatformClientV2.CreateGuideVersion() # CreateGuideVersion | (optional) try: # Create a guide version. api_response = api_instance.post_guide_versions(guide_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling AIStudioApi->post_guide_versions: %s\n" % e) ``` -------------------------------- ### Get a Specific Guide Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/AIStudioApi.md Retrieves details for a specific guide using its unique ID. This operation requires the 'aiStudio:guide:view' permission. ```python import 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' # create an instance of the API class api_instance = PureCloudPlatformClientV2.AIStudioApi() guide_id = 'guide_id_example' # str | Guide ID try: # Get guide. api_response = api_instance.get_guide(guide_id) pprint(api_response) except ApiException as e: print("Exception when calling AIStudioApi->get_guide: %s\n" % e) ``` -------------------------------- ### Get Guide Version Publish Job Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/AIStudioApi.md Retrieves the status of a publishing job for a specific guide version. Use this to monitor the progress of guide version publications. ```python import 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' # create an instance of the API class api_instance = PureCloudPlatformClientV2.AIStudioApi() guide_id = 'guide_id_example' # str | Guide ID version_id = 'version_id_example' # str | Version ID job_id = 'job_id_example' # str | jobId try: # Get the status of the publishing job for this guide version. api_response = api_instance.get_guide_version_job(guide_id, version_id, job_id) pprint(api_response) except ApiException as e: print("Exception when calling AIStudioApi->get_guide_version_job: %s\n" % e) ``` -------------------------------- ### JSON Configuration File Example Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/README.md Example of a configuration file in JSON format for logging, reauthentication, and general settings. ```json { "logging": { "log_level": "trace", "log_format": "text", "log_to_console": false, "log_file_path": "/var/log/pythonsdk.log", "log_response_body": false, "log_request_body": false }, "reauthentication": { "refresh_access_token": true, "refresh_token_wait_max": 10 }, "general": { "live_reload_config": true, "host": "https://api.mypurecloud.com" } } ``` -------------------------------- ### Start Importing Short Term Forecast Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/WorkforceManagementApi.md Starts importing an uploaded short term forecast. Requires the business unit ID, week date ID, and a WfmProcessUploadRequest body. ```python import 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' # 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) ``` -------------------------------- ### Get Guide Deletion Job Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/AIStudioApi.md Retrieves the status of a specified guide deletion job. Use this when you need to check the progress or outcome of a guide deletion operation. ```python import 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' # create an instance of the API class api_instance = PureCloudPlatformClientV2.AIStudioApi() guide_id = 'guide_id_example' # str | Guide ID job_id = 'job_id_example' # str | jobId try: # Get the specified guide deletion job. api_response = api_instance.get_guide_job(guide_id, job_id) pprint(api_response) except ApiException as e: print("Exception when calling AIStudioApi->get_guide_job: %s\n" % e) ``` -------------------------------- ### post_guides Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/AIStudioApi.md Creates a new guide. ```APIDOC ## post_guides ### Description Create a guide. ### Method POST ### Endpoint /api/v2/guides ### Request Body - **body** (object) - Required - The guide to create ### Return Type [Guide](Guide) ``` -------------------------------- ### Create a Campaign Sequence Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/OutboundApi.md This example shows how to create a new campaign sequence. It requires the PureCloud Platform Client SDK and a valid access token. ```python import 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' # create an instance of the API class api_instance = PureCloudPlatformClientV2.OutboundApi() body = PureCloudPlatformClientV2.CampaignSequence() # CampaignSequence | Organization try: # Create a new campaign sequence. api_response = api_instance.post_outbound_sequences(body) pprint(api_response) except ApiException as e: print("Exception when calling OutboundApi->post_outbound_sequences: %s\n" % e) ``` -------------------------------- ### Get Email Setup Configuration Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/RoutingApi.md Retrieves the general email setup configuration for the account. This endpoint requires no parameters. ```python import 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' # create an instance of the API class api_instance = PureCloudPlatformClientV2.RoutingApi() try: # Get email setup api_response = api_instance.get_routing_email_setup() pprint(api_response) except ApiException as e: print("Exception when calling RoutingApi->get_routing_email_setup: %s\n" % e) ``` -------------------------------- ### Get Guides Job Status Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/AIStudioApi.md Retrieves the status of a guide content generation job using its unique job ID. ```APIDOC ## GET /api/v2/guides/jobs/{jobId} ### Description Retrieves the status of a guide content generation job using its unique job ID. ### Method GET ### Endpoint /api/v2/guides/jobs/{jobId} ### Parameters #### Path Parameters - **jobId** (str) - The ID of the job to retrieve status for. ### Response #### Success Response (200) - **guideContentGenerationJob** (GuideContentGenerationJob) - The status of the guide content generation job. #### Response Example { "example": "GuideContentGenerationJob" } ``` -------------------------------- ### get_guides Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/AIStudioApi.md Retrieves all guides. ```APIDOC ## get_guides ### Description Get all guides. ### Method GET ### Endpoint /api/v2/guides ### Return Type [Guide](Guide) ``` -------------------------------- ### get_telephony_providers_edge_setuppackage Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/TelephonyProvidersEdgeApi.md Get the setup package for a locally deployed edge device. This is needed to complete the setup process for the virtual edge. ```APIDOC ## GET /api/v2/telephony/providers/edges/{edgeId}/setuppackage ### Description Get the setup package for a locally deployed edge device. This is needed to complete the setup process for the virtual edge. ### Method GET ### Endpoint /api/v2/telephony/providers/edges/{edgeId}/setuppackage ``` -------------------------------- ### Get a Guide Deletion Job Status Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/AIStudioApi.md Checks the status of a specific guide deletion job. This requires both the guide ID and the job ID, and the 'aiStudio:guideJob:view' permission. ```python import 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' ``` -------------------------------- ### get_workforcemanagement_businessunit_capacityplan Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/WorkforceManagementApi.md Get a capacity plan. ```APIDOC ## GET /workforcemanagement/businessunit/capacityplan ### Description Get a capacity plan. ### Method GET ### Endpoint /workforcemanagement/businessunit/capacityplan ``` -------------------------------- ### get_workforcemanagement_businessunit_activityplan Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/WorkforceManagementApi.md Get an activity plan. ```APIDOC ## GET /workforcemanagement/businessunit/activityplan ### Description Get an activity plan. ### Method GET ### Endpoint /workforcemanagement/businessunit/activityplan ``` -------------------------------- ### get_workforcemanagement_businessunit_activityplans Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/WorkforceManagementApi.md Get activity plans. ```APIDOC ## GET /workforcemanagement/businessunit/activityplans ### Description Get activity plans. ### Method GET ### Endpoint /workforcemanagement/businessunit/activityplans ``` -------------------------------- ### get_workforcemanagement_managementunit_workplan Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/WorkforceManagementApi.md Get a work plan. ```APIDOC ## GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/workplans/{workPlanId} ### Description Get a work plan. ### Method GET ### Endpoint /api/v2/workforcemanagement/managementunits/{managementUnitId}/workplans/{workPlanId} ``` -------------------------------- ### Create Trunk Base Settings - Python Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/TelephonyProvidersEdgeApi.md This example demonstrates how to create a Trunk Base Settings object. It requires the 'TrunkBase' object to be properly initialized and passed as the body. Make sure your OAuth2 access token is set. ```python import 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' # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi() body = PureCloudPlatformClientV2.TrunkBase() # TrunkBase | Trunk base settings try: # Create a Trunk Base Settings object api_response = api_instance.post_telephony_providers_edges_trunkbasesettings(body) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->post_telephony_providers_edges_trunkbasesettings: %s\n" % e) ``` -------------------------------- ### Get Edge Setup Package Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/TelephonyProvidersEdgeApi.md Retrieve the setup package for a locally deployed edge device, which is necessary for completing the virtual edge setup process. This operation requires appropriate permissions. ```APIDOC ## GET /api/v2/telephony/providers/edges/{edgeId}/setuppackage ### Description Get the setup package for a locally deployed edge device. This is needed to complete the setup process for the virtual edge. ### Method GET ### Endpoint /api/v2/telephony/providers/edges/{edgeId}/setuppackage ### Parameters #### Path Parameters - **edgeId** (str) - Required - Edge ID ### Response #### Success Response (200) - **VmPairingInfo** - Information required for pairing the virtual edge. ### Permissions Requires ANY permissions: * telephony:plugin:all ``` -------------------------------- ### JSON Gateway Configuration Example Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/README.md Example of a JSON configuration file including gateway settings for host, protocol, port, and path parameters. ```json { "logging": { "log_level": "trace", "log_format": "text", "log_to_console": false, "log_file_path": "/var/log/pythonsdk.log", "log_response_body": false, "log_request_body": false }, "reauthentication": { "refresh_access_token": true, "refresh_token_wait_max": 10 }, "general": { "live_reload_config": true, "host": "https://api.mypurecloud.com" }, "gateway": { "host": "mygateway.mydomain.myextension", "protocol": "https", "port": 1443, "path_params_login": "myadditionalpathforlogin", "path_params_api": "myadditionalpathforapi", "username": "username", "password": "password" } } ``` -------------------------------- ### INI Configuration File Example Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/README.md Example of a configuration file in INI format for logging, reauthentication, and general settings. ```ini [logging] log_level = trace log_format = text log_to_console = false log_file_path = /var/log/pythonsdk.log log_response_body = false log_request_body = false [reauthentication] refresh_access_token = true refresh_token_wait_max = 10 [general] live_reload_config = true host = https://api.mypurecloud.com ``` -------------------------------- ### Get Email Setup Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/RoutingApi.md Retrieves the global email setup configuration for the account. This includes settings relevant to email routing and management. ```APIDOC ## GET /api/v2/routing/email/setup ### Description Retrieves the global email setup configuration for the account. This includes settings relevant to email routing and management. ### Method GET ### Endpoint /api/v2/routing/email/setup ### Parameters This endpoint does not require any parameters. ### Response #### Success Response (200) - **id** (string) - The unique identifier for the email setup configuration. - **defaultFromAddress** (object) - The default email address used for outgoing emails. - **defaultFromDisplayName** (string) - The display name associated with the default from address. - **signature** (object) - The default email signature. - **IMAPSettings** (object) - IMAP server settings for incoming email. - **SMTPErrorAction** (string) - Action to take when an SMTP error occurs. - **selfUri** (string) - The URI for this email setup resource. ### Response Example { "id": "string", "defaultFromAddress": { "address": "string", "displayName": "string" }, "defaultFromDisplayName": "string", "signature": { "text": "string", "html": "string" }, "IMAPSettings": { "username": "string", "password": "string", "host": "string", "port": 0, "sslEnabled": true }, "SMTPErrorAction": "string", "selfUri": "string" } ``` -------------------------------- ### get_workforcemanagement_businessunit_minimumstaffing_settings Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/WorkforceManagementApi.md Get the minimum staffing settings for a business unit. ```APIDOC ## GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/minimumstaffing/settings ### Description Retrieves the minimum staffing settings configured for a specific business unit. ### Method GET ### Endpoint /api/v2/workforcemanagement/businessunits/{businessUnitId}/minimumstaffing/settings ### Parameters #### Path Parameters - **businessUnitId** (string) - Required - The ID of the business unit. ### Response #### Success Response (200) - **granularity** (string) - The granularity of the minimum staffing settings (e.g., 'PT15M', 'PT30M'). - **defaultIntervalLengthMinutes** (integer) - The default length of intervals in minutes. - **defaultIntervals** (integer) - The default number of intervals. - **enabled** (boolean) - Whether minimum staffing is enabled. ``` -------------------------------- ### get_workforcemanagement_managementunit_workplans Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/WorkforceManagementApi.md Get work plans. ```APIDOC ## GET /api/v2/workforcemanagement/managementunits/{managementUnitId}/workplans ### Description Get work plans. ### Method GET ### Endpoint /api/v2/workforcemanagement/managementunits/{managementUnitId}/workplans ``` -------------------------------- ### Get Telephony Providers Edge Setup Package Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/TelephonyProvidersEdgeApi.md Retrieves the setup package for a locally deployed edge device, necessary for virtual edge setup completion. Requires telephony:plugin:all permissions. ```python import 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' # create an instance of the API class api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi() edge_id = 'edge_id_example' # str | Edge ID try: # Get the setup package for a locally deployed edge device. This is needed to complete the setup process for the virtual edge. api_response = api_instance.get_telephony_providers_edge_setuppackage(edge_id) pprint(api_response) except ApiException as e: print("Exception when calling TelephonyProvidersEdgeApi->get_telephony_providers_edge_setuppackage: %s\n" % e) ``` -------------------------------- ### post_recording_keyconfigurations Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/RecordingApi.md Setup configurations for encryption key creation. ```APIDOC ## POST /recording/keyconfigurations ### Description Setup configurations for encryption key creation. ### Method POST ### Endpoint /recording/keyconfigurations ``` -------------------------------- ### Setup MTLS for Gateway using File Paths Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/README.md Use this method when MTLS certificates and keys are available as files on the filesystem. It configures the client to use these files for secure gateway communication. ```python MTLS_CERT_DIR = "mtls-certs" CA_CERT_FILENAME = "ca-chain.cert.pem" CLIENT_CERT_FILENAME = "localhost.cert.pem" CLIENT_KEY_FILENAME = "localhost.key.pem" base_dir = os.path.dirname(__file__) ca_cert_path = os.path.join(base_dir, MTLS_CERT_DIR, CA_CERT_FILENAME) client_cert_path = os.path.join(base_dir, MTLS_CERT_DIR, CLIENT_CERT_FILENAME) client_key_path = os.path.join(base_dir, MTLS_CERT_DIR, CLIENT_KEY_FILENAME) PureCloudPlatformClientV2.configuration.set_mtls_certificates(client_cert_path, client_key_path, ca_cert_path) apiclient_mtls = PureCloudPlatformClientV2.api_client.ApiClient() apiclient_mtls.set_gateway( hostname="mygateway.mydomain.myextension", scheme="https", port=4027, login_path="login", api_path="api" ) ``` -------------------------------- ### post_architect_systemprompt_resource_uploads Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/ArchitectApi.md Creates a presigned URL for uploading a system prompt file. This is a preview method and is subject to change. It wraps POST /api/v2/architect/systemprompts/{promptId}/resources/{languageCode}/uploads and requires the 'architect:systemPrompt:edit' permission. ```APIDOC ## POST /api/v2/architect/systemprompts/{promptId}/resources/{languageCode}/uploads ### Description Creates a presigned URL for uploading a system prompt file. This is a preview method and is subject to change. ### Method POST ### Endpoint /api/v2/architect/systemprompts/{promptId}/resources/{languageCode}/uploads ### Parameters #### Path Parameters - **prompt_id** (str) - Required - Prompt ID - **language_code** (str) - Required - Language ### Permissions Requires ALL permissions: architect:systemPrompt:edit ### Return type [**PromptAssetUpload**](PromptAssetUpload) ### Example ```python import PureCloudPlatformClientV2 api_instance = PureCloudPlatformClientV2.ArchitectApi() prompt_id = 'prompt_id_example' language_code = 'language_code_example' try: api_response = api_instance.post_architect_systemprompt_resource_uploads(prompt_id, language_code) print(api_response) except ApiException as e: print(f"Exception when calling ArchitectApi->post_architect_systemprompt_resource_uploads: {e}") ``` ``` -------------------------------- ### get_workforcemanagement_businessunit_workplanbid Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/WorkforceManagementApi.md Get a work plan bid. ```APIDOC ## GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/workplanbids/{workPlanBidId} ### Description Get a work plan bid. ### Method GET ### Endpoint /api/v2/workforcemanagement/businessunits/{businessUnitId}/workplanbids/{workPlanBidId} ### Parameters #### Path Parameters - **businessUnitId** (string) - Required - The ID of the business unit - **workPlanBidId** (string) - Required - The work plan bid ID ``` -------------------------------- ### Get Guide Content Generation Job Status Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/AIStudioApi.md Retrieves the status of a guide content generation job using its unique job ID. Requires 'aiStudio:guideJob:view' permission. ```python import 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' # create an instance of the API class api_instance = PureCloudPlatformClientV2.AIStudioApi() job_id = 'job_id_example' # str | jobId try: # Get the status of the guide content generation job. api_response = api_instance.get_guides_job(job_id) pprint(api_response) except ApiException as e: print("Exception when calling AIStudioApi->get_guides_job: %s\n" % e) ``` -------------------------------- ### Query Opportunities within a Date Range Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/WorkforceManagementApi.md This example shows how to query for opportunities within a specified date range. The `force_download_service` parameter can be used for testing purposes. ```python import 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' # 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.QueryOpportunitiesRequest() # QueryOpportunitiesRequest | 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: # Query opportunities within the specified date range api_response = api_instance.post_workforcemanagement_businessunit_opportunities_query(business_unit_id, body, force_download_service=force_download_service) pprint(api_response) except ApiException as e: print("Exception when calling WorkforceManagementApi->post_workforcemanagement_businessunit_opportunities_query: %s\n" % e) ``` -------------------------------- ### get_telephony_providers_edge_softwareversions Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/TelephonyProvidersEdgeApi.md Gets all the available software versions for this edge. This lists the different software versions that can be installed or are available for the edge device. ```APIDOC ## GET /api/v2/telephony/providers/edges/{edgeId}/softwareversions ### Description Gets all the available software versions for this edge. ### Method GET ### Endpoint /api/v2/telephony/providers/edges/{edgeId}/softwareversions ``` -------------------------------- ### post_guide_versions Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/AIStudioApi.md Creates a new version for a guide. ```APIDOC ## post_guide_versions ### Description Create a guide version. ### Method POST ### Endpoint /api/v2/guides/{guideId}/versions ### Parameters #### Path Parameters - **guide_id** (str) - Required - Guide ID ### Request Body - **body** (object) - Required - The guide version to create ### Return Type [GuideVersion](GuideVersion) ``` -------------------------------- ### get_flows_execution Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/ArchitectApi.md Get a flow execution's details. Flow execution details are available for several days after the flow is started. ```APIDOC ## GET /api/v2/flows/execution/{executionId} ### Description Retrieves the details of a specific flow execution. Execution details are retained for a limited period after the flow has started. ### Method GET ### Endpoint /api/v2/flows/execution/{executionId} ### Parameters #### Path Parameters - **executionId** (string) - Required - The ID of the flow execution to retrieve. ``` -------------------------------- ### get_telephony_providers_edge_softwareversions Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/TelephonyProvidersEdgeApi.md Gets all the available software versions for this edge. This method retrieves a list of all software versions that can be installed on a specified edge device. ```APIDOC ## GET /api/v2/telephony/providers/edges/{edgeId}/softwareversions ### Description Gets all the available software versions for this edge. ### Method GET ### Endpoint /api/v2/telephony/providers/edges/{edgeId}/softwareversions ### Parameters #### Path Parameters - **edge_id** (str) - Required - Edge ID ### Response #### Success Response (200) - **DomainEdgeSoftwareVersionDtoEntityListing** - A list of available software versions for the edge. ``` -------------------------------- ### post_guides Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/AIStudioApi.md Creates a new guide. This operation is a wrapper for the POST /api/v2/guides endpoint and requires the aiStudio:guide:add permission. ```APIDOC ## POST /api/v2/guides ### Description Create a guide. ### Method POST ### Endpoint /api/v2/guides ### Parameters #### Request Body - **body** (CreateGuide) - Required - ### Response #### Success Response (200) - **Guide** (Guide) - Description of the returned object ### Permissions Requires ALL permissions: * aiStudio:guide:add ``` -------------------------------- ### INI Gateway Configuration Example Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/README.md Example of an INI configuration file including gateway settings for host, protocol, port, and path parameters. ```ini [logging] log_level = trace log_format = text log_to_console = false log_file_path = /var/log/pythonsdk.log log_response_body = false log_request_body = false [reauthentication] refresh_access_token = true refresh_token_wait_max = 10 [general] live_reload_config = true host = https://api.mypurecloud.com [gateway] host = mygateway.mydomain.myextension protocol = https port = 1443 path_params_login = myadditionalpathforlogin path_params_api = myadditionalpathforapi username = username password = password ``` -------------------------------- ### Get Telephony Settings Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/TelephonyApi.md Retrieves the current telephony settings configuration. This endpoint allows users to fetch the details of their telephony setup. ```APIDOC ## GET /api/v2/telephony/settings ### Description Retrieves the current telephony settings configuration. ### Method GET ### Endpoint /api/v2/telephony/settings ### Response #### Success Response (200) - **settings** (TelephonySettings) - The current telephony settings. ``` -------------------------------- ### Create Presigned URL for System Prompt Resource Upload Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/ArchitectApi.md This preview method creates a presigned URL for uploading a system prompt file. It requires the 'architect:systemPrompt:edit' permission. Note that this method is subject to change. ```python import 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' # create an instance of the API class api_instance = PureCloudPlatformClientV2.ArchitectApi() prompt_id = 'prompt_id_example' # str | Prompt ID language_code = 'language_code_example' # str | Language try: # Creates a presigned URL for uploading a system prompt file api_response = api_instance.post_architect_systemprompt_resource_uploads(prompt_id, language_code) pprint(api_response) except ApiException as e: print("Exception when calling ArchitectApi->post_architect_systemprompt_resource_uploads: %s\n" % e) ``` -------------------------------- ### get_workforcemanagement_businessunit_workplanbids Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/WorkforceManagementApi.md Get list of work plan bids. ```APIDOC ## GET /api/v2/workforcemanagement/businessunits/{businessUnitId}/workplanbids ### Description Get list of work plan bids. ### Method GET ### Endpoint /api/v2/workforcemanagement/businessunits/{businessUnitId}/workplanbids ### Parameters #### Path Parameters - **businessUnitId** (string) - Required - The ID of the business unit ``` -------------------------------- ### Create a Workbin Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/TaskManagementApi.md Creates a new workbin. Ensure you have the necessary permissions and have configured the API client with your access token. ```python import 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' # create an instance of the API class api_instance = PureCloudPlatformClientV2.TaskManagementApi() body = PureCloudPlatformClientV2.WorkbinCreate() # WorkbinCreate | Workbin try: # Create a workbin api_response = api_instance.post_taskmanagement_workbins(body) pprint(api_response) except ApiException as e: print("Exception when calling TaskManagementApi->post_taskmanagement_workbins: %s\n" % e) ``` -------------------------------- ### Create Knowledge Document Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/KnowledgeApi.md This example shows how to create a new document within a knowledge base. The 'knowledge:document:add' permission is required. ```python import 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' # create an instance of the API class api_instance = PureCloudPlatformClientV2.KnowledgeApi() knowledge_base_id = 'knowledge_base_id_example' # str | Knowledge base ID body = PureCloudPlatformClientV2.KnowledgeDocumentCreateRequest() # KnowledgeDocumentCreateRequest | try: # Create document. api_response = api_instance.post_knowledge_knowledgebase_documents(knowledge_base_id, body) pprint(api_response) except ApiException as e: print("Exception when calling KnowledgeApi->post_knowledge_knowledgebase_documents: %s\n" % e) ``` -------------------------------- ### Get Flows Execution Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/ArchitectApi.md Retrieves the details of a specific flow execution. Flow execution details are retained for several days after the flow has started. ```APIDOC ## GET /api/v2/flows/executions/{flowExecutionId} ### Description Get a flow execution's details. Flow execution details are available for several days after the flow is started. ### Method GET ### Endpoint /api/v2/flows/executions/{flowExecutionId} ### Parameters #### Path Parameters - **flow_execution_id** (str) - Required - flow execution ID ### Response #### Success Response (200) - **FlowRuntimeExecution** - Details of the flow execution. ### Request Example ```python { "flow_execution_id": "flow_execution_id_example" } ``` ``` -------------------------------- ### delete_guide_jobs Source: https://github.com/mypurecloud/platform-client-sdk-python/blob/master/build/docs/AIStudioApi.md Starts the deletion process for a guide. This operation returns a GuideJob object representing the status of the deletion. Requires the 'aiStudio:guideJob:add' permission. ```APIDOC ## delete_guide_jobs ### Description Start the deletion of a guide. ### Method DELETE ### Endpoint /api/v2/guides/{guideId}/jobs ### Parameters #### Path Parameters - **guide_id** (str) - Required - Guide ID ### Return Type [GuideJob](GuideJob) ```