instruction
stringlengths
81
221
input
stringlengths
50
1.19k
output
stringlengths
525
3.61k
Provide a Python example that uses the GET /api/v2/knowledge/knowledgebases/{knowledgeBaseId}/labels/{labelId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get label
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.KnowledgeApi(); knowledge_base_id = 'knowledge_base_id_example' # str | Knowledge base ID label_id = 'label_id_example' # str | Label ID try: # Get label api_response = api_instance.get_knowledge_knowledgebase_label(knowledge_base_id, label_id) pprint(api_response) except ApiException as e: print("Exception when calling KnowledgeApi->get_knowledge_knowledgebase_label: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/knowledge/knowledgebases/{knowledgeBaseId}/labels/{labelId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update label
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.KnowledgeApi(); knowledge_base_id = 'knowledge_base_id_example' # str | Knowledge base ID label_id = 'label_id_example' # str | Label ID body = PureCloudPlatformClientV2.LabelUpdateRequest() # LabelUpdateRequest | try: # Update label api_response = api_instance.patch_knowledge_knowledgebase_label(knowledge_base_id, label_id, body) pprint(api_response) except ApiException as e: print("Exception when calling KnowledgeApi->patch_knowledge_knowledgebase_label: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/knowledge/knowledgebases/{knowledgeBaseId}/unanswered/groups Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get knowledge base unanswered groups
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.KnowledgeApi(); knowledge_base_id = 'knowledge_base_id_example' # str | Knowledge base ID app = 'app_example' # str | The app value to be used for filtering phrases. (optional) date_start = '2013-10-20' # date | The start date to be used for filtering phrases. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd (optional) date_end = '2013-10-20' # date | The end date to be used for filtering phrases. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd (optional) try: # Get knowledge base unanswered groups api_response = api_instance.get_knowledge_knowledgebase_unanswered_groups(knowledge_base_id, app=app, date_start=date_start, date_end=date_end) pprint(api_response) except ApiException as e: print("Exception when calling KnowledgeApi->get_knowledge_knowledgebase_unanswered_groups: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/knowledge/knowledgebases/{knowledgeBaseId}/unanswered/groups/{groupId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get knowledge base unanswered group for a particular groupId
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.KnowledgeApi(); knowledge_base_id = 'knowledge_base_id_example' # str | Knowledge base ID group_id = 'group_id_example' # str | The ID of the group to be retrieved. app = 'app_example' # str | The app value to be used for filtering phrases. (optional) date_start = '2013-10-20' # date | The start date to be used for filtering phrases. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd (optional) date_end = '2013-10-20' # date | The end date to be used for filtering phrases. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd (optional) try: # Get knowledge base unanswered group for a particular groupId api_response = api_instance.get_knowledge_knowledgebase_unanswered_group(knowledge_base_id, group_id, app=app, date_start=date_start, date_end=date_end) pprint(api_response) except ApiException as e: print("Exception when calling KnowledgeApi->get_knowledge_knowledgebase_unanswered_group: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/knowledge/knowledgebases/{knowledgeBaseId}/unanswered/groups/{groupId}/phrasegroups/{phraseGroupId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get knowledge base unanswered phrase group for a particular phraseGroupId
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.KnowledgeApi(); knowledge_base_id = 'knowledge_base_id_example' # str | Knowledge base ID group_id = 'group_id_example' # str | The ID of the group to be retrieved. phrase_group_id = 'phrase_group_id_example' # str | The ID of the phraseGroup to be retrieved. app = 'app_example' # str | The app value to be used for filtering phrases. (optional) date_start = '2013-10-20' # date | The start date to be used for filtering phrases. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd (optional) date_end = '2013-10-20' # date | The end date to be used for filtering phrases. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd (optional) try: # Get knowledge base unanswered phrase group for a particular phraseGroupId api_response = api_instance.get_knowledge_knowledgebase_unanswered_group_phrasegroup(knowledge_base_id, group_id, phrase_group_id, app=app, date_start=date_start, date_end=date_end) pprint(api_response) except ApiException as e: print("Exception when calling KnowledgeApi->get_knowledge_knowledgebase_unanswered_group_phrasegroup: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/knowledge/knowledgebases/{knowledgeBaseId}/unanswered/groups/{groupId}/phrasegroups/{phraseGroupId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a Knowledge base unanswered phrase group
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.KnowledgeApi(); knowledge_base_id = 'knowledge_base_id_example' # str | Knowledge base ID group_id = 'group_id_example' # str | The ID of the group to be updated. phrase_group_id = 'phrase_group_id_example' # str | The ID of the phraseGroup to be updated. body = PureCloudPlatformClientV2.UnansweredPhraseGroupPatchRequestBody() # UnansweredPhraseGroupPatchRequestBody | Request body of the update unanswered group endpoint. try: # Update a Knowledge base unanswered phrase group api_response = api_instance.patch_knowledge_knowledgebase_unanswered_group_phrasegroup(knowledge_base_id, group_id, phrase_group_id, body) pprint(api_response) except ApiException as e: print("Exception when calling KnowledgeApi->patch_knowledge_knowledgebase_unanswered_group_phrasegroup: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/languageunderstanding/domains Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get all NLU Domains.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); page_number = 1 # int | Page number (optional) (default to 1) page_size = 25 # int | Page size (optional) (default to 25) try: # Get all NLU Domains. api_response = api_instance.get_languageunderstanding_domains(page_number=page_number, page_size=page_size) pprint(api_response) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->get_languageunderstanding_domains: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/languageunderstanding/domains Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create an NLU Domain.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); body = PureCloudPlatformClientV2.NluDomain() # NluDomain | The NLU Domain to create. try: # Create an NLU Domain. api_response = api_instance.post_languageunderstanding_domains(body) pprint(api_response) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->post_languageunderstanding_domains: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/languageunderstanding/domains/{domainId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete an NLU Domain.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); domain_id = 'domain_id_example' # str | ID of the NLU domain. try: # Delete an NLU Domain. api_instance.delete_languageunderstanding_domain(domain_id) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->delete_languageunderstanding_domain: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/languageunderstanding/domains/{domainId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Find an NLU Domain.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); domain_id = 'domain_id_example' # str | ID of the NLU domain. try: # Find an NLU Domain. api_response = api_instance.get_languageunderstanding_domain(domain_id) pprint(api_response) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->get_languageunderstanding_domain: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/languageunderstanding/domains/{domainId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update an NLU Domain.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); domain_id = 'domain_id_example' # str | ID of the NLU domain. body = PureCloudPlatformClientV2.NluDomain() # NluDomain | The updated NLU Domain. try: # Update an NLU Domain. api_response = api_instance.patch_languageunderstanding_domain(domain_id, body) pprint(api_response) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->patch_languageunderstanding_domain: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/languageunderstanding/domains/{domainId}/feedback Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get all feedback in the given NLU Domain Version.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); domain_id = 'domain_id_example' # str | ID of the NLU domain. intent_name = 'intent_name_example' # str | The top intent name to retrieve feedback for. (optional) assessment = 'assessment_example' # str | The top assessment to retrieve feedback for. (optional) date_start = '2013-10-20' # date | Begin of time window as ISO-8601 date. (optional) date_end = '2013-10-20' # date | End of time window as ISO-8601 date. (optional) include_deleted = True # bool | Whether to include soft-deleted items in the result. (optional) language = 'language_example' # str | Whether to filter response based on the language, e.g. en-us, pt-br. (optional) page_number = 1 # int | Page number (optional) (default to 1) page_size = 25 # int | Page size (optional) (default to 25) enable_cursor_pagination = False # bool | Enable Cursor Pagination (optional) (default to False) include_training_utterances = True # bool | Include Training Utterances. By default they're included. (optional) (default to True) after = 'after_example' # str | The cursor that points to the end of the set of entities that has been returned. This is considered only when enableCursorPagination=true (optional) fields = ['fields_example'] # list[str] | Fields and properties to get, comma-separated (optional) try: # Get all feedback in the given NLU Domain Version. api_response = api_instance.get_languageunderstanding_domain_feedback(domain_id, intent_name=intent_name, assessment=assessment, date_start=date_start, date_end=date_end, include_deleted=include_deleted, language=language, page_number=page_number, page_size=page_size, enable_cursor_pagination=enable_cursor_pagination, include_training_utterances=include_training_utterances, after=after, fields=fields) pprint(api_response) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->get_languageunderstanding_domain_feedback: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/languageunderstanding/domains/{domainId}/feedback Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create feedback for the NLU Domain Version.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); domain_id = 'domain_id_example' # str | ID of the NLU domain. body = PureCloudPlatformClientV2.NluFeedbackRequest() # NluFeedbackRequest | The Feedback to create. try: # Create feedback for the NLU Domain Version. api_response = api_instance.post_languageunderstanding_domain_feedback(domain_id, body) pprint(api_response) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->post_languageunderstanding_domain_feedback: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/languageunderstanding/domains/{domainId}/feedback/{feedbackId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete the feedback on the NLU Domain Version.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); domain_id = 'domain_id_example' # str | ID of the NLU domain. feedback_id = 'feedback_id_example' # str | ID of the Feedback try: # Delete the feedback on the NLU Domain Version. api_instance.delete_languageunderstanding_domain_feedback_feedback_id(domain_id, feedback_id) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->delete_languageunderstanding_domain_feedback_feedback_id: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/languageunderstanding/domains/{domainId}/feedback/{feedbackId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Find a Feedback
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); domain_id = 'domain_id_example' # str | ID of the NLU domain. feedback_id = 'feedback_id_example' # str | ID of the Feedback fields = ['fields_example'] # list[str] | Fields and properties to get, comma-separated (optional) try: # Find a Feedback api_response = api_instance.get_languageunderstanding_domain_feedback_feedback_id(domain_id, feedback_id, fields=fields) pprint(api_response) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->get_languageunderstanding_domain_feedback_feedback_id: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/languageunderstanding/domains/{domainId}/versions Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get all NLU Domain Versions for a given Domain.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); domain_id = 'domain_id_example' # str | ID of the NLU domain. include_utterances = True # bool | Whether utterances for intent definition should be included when marshalling response. (optional) page_number = 1 # int | Page number (optional) (default to 1) page_size = 25 # int | Page size (optional) (default to 25) try: # Get all NLU Domain Versions for a given Domain. api_response = api_instance.get_languageunderstanding_domain_versions(domain_id, include_utterances=include_utterances, page_number=page_number, page_size=page_size) pprint(api_response) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->get_languageunderstanding_domain_versions: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/languageunderstanding/domains/{domainId}/versions Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create an NLU Domain Version.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); domain_id = 'domain_id_example' # str | ID of the NLU domain. body = PureCloudPlatformClientV2.NluDomainVersion() # NluDomainVersion | The NLU Domain Version to create. include_utterances = True # bool | Whether utterances for intent definition should be included when marshalling response. (optional) try: # Create an NLU Domain Version. api_response = api_instance.post_languageunderstanding_domain_versions(domain_id, body, include_utterances=include_utterances) pprint(api_response) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->post_languageunderstanding_domain_versions: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/languageunderstanding/domains/{domainId}/versions/{domainVersionId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete an NLU Domain Version
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); domain_id = 'domain_id_example' # str | ID of the NLU domain. domain_version_id = 'domain_version_id_example' # str | ID of the NLU domain version. try: # Delete an NLU Domain Version api_instance.delete_languageunderstanding_domain_version(domain_id, domain_version_id) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->delete_languageunderstanding_domain_version: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/languageunderstanding/domains/{domainId}/versions/{domainVersionId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Find an NLU Domain Version.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); domain_id = 'domain_id_example' # str | ID of the NLU domain. domain_version_id = 'domain_version_id_example' # str | ID of the NLU domain version. include_utterances = True # bool | Whether utterances for intent definition should be included when marshalling response. (optional) try: # Find an NLU Domain Version. api_response = api_instance.get_languageunderstanding_domain_version(domain_id, domain_version_id, include_utterances=include_utterances) pprint(api_response) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->get_languageunderstanding_domain_version: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/languageunderstanding/domains/{domainId}/versions/{domainVersionId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update an NLU Domain Version.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); domain_id = 'domain_id_example' # str | ID of the NLU domain. domain_version_id = 'domain_version_id_example' # str | ID of the NLU domain version. body = PureCloudPlatformClientV2.NluDomainVersion() # NluDomainVersion | The updated NLU Domain Version. try: # Update an NLU Domain Version. api_response = api_instance.put_languageunderstanding_domain_version(domain_id, domain_version_id, body) pprint(api_response) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->put_languageunderstanding_domain_version: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/languageunderstanding/domains/{domainId}/versions/{domainVersionId}/detect Genesys Cloud Python SDK.
Genesys describes this as an API used to: Detect intent, entities, etc. in the submitted text using the specified NLU domain version.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); domain_id = 'domain_id_example' # str | ID of the NLU domain. domain_version_id = 'domain_version_id_example' # str | ID of the NLU domain version. body = PureCloudPlatformClientV2.NluDetectionRequest() # NluDetectionRequest | The input data to perform detection on. try: # Detect intent, entities, etc. in the submitted text using the specified NLU domain version. api_response = api_instance.post_languageunderstanding_domain_version_detect(domain_id, domain_version_id, body) pprint(api_response) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->post_languageunderstanding_domain_version_detect: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/languageunderstanding/domains/{domainId}/versions/{domainVersionId}/publish Genesys Cloud Python SDK.
Genesys describes this as an API used to: Publish the draft NLU Domain Version.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); domain_id = 'domain_id_example' # str | ID of the NLU domain. domain_version_id = 'domain_version_id_example' # str | ID of the NLU domain version. try: # Publish the draft NLU Domain Version. api_response = api_instance.post_languageunderstanding_domain_version_publish(domain_id, domain_version_id) pprint(api_response) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->post_languageunderstanding_domain_version_publish: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/languageunderstanding/domains/{domainId}/versions/{domainVersionId}/report Genesys Cloud Python SDK.
Genesys describes this as an API used to: Retrieved quality report for the specified NLU Domain Version
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); domain_id = 'domain_id_example' # str | ID of the NLU domain. domain_version_id = 'domain_version_id_example' # str | ID of the NLU domain version. try: # Retrieved quality report for the specified NLU Domain Version api_response = api_instance.get_languageunderstanding_domain_version_report(domain_id, domain_version_id) pprint(api_response) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->get_languageunderstanding_domain_version_report: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/languageunderstanding/domains/{domainId}/versions/{domainVersionId}/train Genesys Cloud Python SDK.
Genesys describes this as an API used to: Train the draft NLU Domain Version.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); domain_id = 'domain_id_example' # str | ID of the NLU domain. domain_version_id = 'domain_version_id_example' # str | ID of the NLU domain version. try: # Train the draft NLU Domain Version. api_response = api_instance.post_languageunderstanding_domain_version_train(domain_id, domain_version_id) pprint(api_response) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->post_languageunderstanding_domain_version_train: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/languageunderstanding/miners Genesys Cloud Python SDK.
Genesys describes this as an API used to: Retrieve the list of miners created.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); miner_type = 'miner_type_example' # str | Type of miner, either intent or topic (optional) try: # Retrieve the list of miners created. api_response = api_instance.get_languageunderstanding_miners(miner_type=miner_type) pprint(api_response) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->get_languageunderstanding_miners: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/languageunderstanding/miners Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create a unique miner.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); body = PureCloudPlatformClientV2.Miner() # Miner | Details for creating a new miner resource. try: # Create a unique miner. api_response = api_instance.post_languageunderstanding_miners(body) pprint(api_response) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->post_languageunderstanding_miners: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/languageunderstanding/miners/{minerId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete a miner.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); miner_id = 'miner_id_example' # str | Miner ID try: # Delete a miner. api_instance.delete_languageunderstanding_miner(miner_id) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->delete_languageunderstanding_miner: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/languageunderstanding/miners/{minerId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get information about a miner.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); miner_id = 'miner_id_example' # str | Miner ID try: # Get information about a miner. api_response = api_instance.get_languageunderstanding_miner(miner_id) pprint(api_response) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->get_languageunderstanding_miner: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/languageunderstanding/miners/{minerId}/drafts Genesys Cloud Python SDK.
Genesys describes this as an API used to: Retrieve the list of drafts created.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); miner_id = 'miner_id_example' # str | Miner ID try: # Retrieve the list of drafts created. api_response = api_instance.get_languageunderstanding_miner_drafts(miner_id) pprint(api_response) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->get_languageunderstanding_miner_drafts: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/languageunderstanding/miners/{minerId}/drafts Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create a new draft resource.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); miner_id = 'miner_id_example' # str | Miner ID body = PureCloudPlatformClientV2.Draft() # Draft | Details for creating draft resource try: # Create a new draft resource. api_response = api_instance.post_languageunderstanding_miner_drafts(miner_id, body) pprint(api_response) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->post_languageunderstanding_miner_drafts: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/languageunderstanding/miners/{minerId}/drafts/{draftId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete a draft
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); miner_id = 'miner_id_example' # str | Miner ID draft_id = 'draft_id_example' # str | Draft ID try: # Delete a draft api_instance.delete_languageunderstanding_miner_draft(miner_id, draft_id) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->delete_languageunderstanding_miner_draft: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/languageunderstanding/miners/{minerId}/drafts/{draftId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get information about a draft.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); miner_id = 'miner_id_example' # str | Miner ID draft_id = 'draft_id_example' # str | Draft ID draft_intent_id = 'draft_intent_id_example' # str | Parameter to filter a specific intent. (optional) draft_topic_id = 'draft_topic_id_example' # str | Parameter to filter a specific topic. (optional) try: # Get information about a draft. api_response = api_instance.get_languageunderstanding_miner_draft(miner_id, draft_id, draft_intent_id=draft_intent_id, draft_topic_id=draft_topic_id) pprint(api_response) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->get_languageunderstanding_miner_draft: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/languageunderstanding/miners/{minerId}/drafts/{draftId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Save information for the draft. Either topic draft or intent draft should be sent.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); miner_id = 'miner_id_example' # str | Miner ID draft_id = 'draft_id_example' # str | Draft ID body = PureCloudPlatformClientV2.DraftRequest() # DraftRequest | (optional) try: # Save information for the draft. Either topic draft or intent draft should be sent. api_response = api_instance.patch_languageunderstanding_miner_draft(miner_id, draft_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->patch_languageunderstanding_miner_draft: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/languageunderstanding/miners/{minerId}/execute Genesys Cloud Python SDK.
Genesys describes this as an API used to: Start the mining process. Specify date range pair with mediaType, queueIds, participantType for mining data from Genesys Cloud. Specify only uploadKey for mining through an external file.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); miner_id = 'miner_id_example' # str | Miner ID body = PureCloudPlatformClientV2.MinerExecuteRequest() # MinerExecuteRequest | (optional) try: # Start the mining process. Specify date range pair with mediaType, queueIds, participantType for mining data from Genesys Cloud. Specify only uploadKey for mining through an external file. api_response = api_instance.post_languageunderstanding_miner_execute(miner_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->post_languageunderstanding_miner_execute: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/languageunderstanding/miners/{minerId}/intents Genesys Cloud Python SDK.
Genesys describes this as an API used to: Retrieve a list of mined intents.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); miner_id = 'miner_id_example' # str | Miner ID expand = 'expand_example' # str | Option to fetch utterances. (optional) try: # Retrieve a list of mined intents. api_response = api_instance.get_languageunderstanding_miner_intents(miner_id, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->get_languageunderstanding_miner_intents: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/languageunderstanding/miners/{minerId}/intents/{intentId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get information about a mined intent
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); miner_id = 'miner_id_example' # str | Miner ID intent_id = 'intent_id_example' # str | The ID of the intent to be retrieved. expand = 'expand_example' # str | Option to fetch utterances (optional) try: # Get information about a mined intent api_response = api_instance.get_languageunderstanding_miner_intent(miner_id, intent_id, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->get_languageunderstanding_miner_intent: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/languageunderstanding/miners/{minerId}/topics Genesys Cloud Python SDK.
Genesys describes this as an API used to: Retrieve a list of mined topics.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); miner_id = 'miner_id_example' # str | Miner ID try: # Retrieve a list of mined topics. api_response = api_instance.get_languageunderstanding_miner_topics(miner_id) pprint(api_response) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->get_languageunderstanding_miner_topics: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/languageunderstanding/miners/{minerId}/topics/{topicId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Retrieves details of a particular topic.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); miner_id = 'miner_id_example' # str | Miner ID topic_id = 'topic_id_example' # str | The ID of the topic to be retrieved. expand = 'expand_example' # str | Option to fetch phrases (optional) try: # Retrieves details of a particular topic. api_response = api_instance.get_languageunderstanding_miner_topic(miner_id, topic_id, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->get_languageunderstanding_miner_topic: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/languageunderstanding/miners/{minerId}/topics/{topicId}/phrases/{phraseId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Retrieves utterances related to a phrase in a topic.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguageUnderstandingApi(); miner_id = 'miner_id_example' # str | Miner ID topic_id = 'topic_id_example' # str | The ID of the topic to be retrieved. phrase_id = 'phrase_id_example' # str | The ID of the phrase to be retrieved. try: # Retrieves utterances related to a phrase in a topic. api_response = api_instance.get_languageunderstanding_miner_topic_phrase(miner_id, topic_id, phrase_id) pprint(api_response) except ApiException as e: print("Exception when calling LanguageUnderstandingApi->get_languageunderstanding_miner_topic_phrase: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/languages/translations Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get all available languages for translation
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguagesApi(); try: # Get all available languages for translation api_response = api_instance.get_languages_translations() pprint(api_response) except ApiException as e: print("Exception when calling LanguagesApi->get_languages_translations: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/languages/translations/builtin Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the builtin translation for a language
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguagesApi(); language = 'language_example' # str | The language of the builtin translation to retrieve try: # Get the builtin translation for a language api_response = api_instance.get_languages_translations_builtin(language) pprint(api_response) except ApiException as e: print("Exception when calling LanguagesApi->get_languages_translations_builtin: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/languages/translations/organization Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get effective translation for an organization by language
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LanguagesApi(); language = 'language_example' # str | The language of the translation to retrieve for the organization try: # Get effective translation for an organization by language api_response = api_instance.get_languages_translations_organization(language) pprint(api_response) except ApiException as e: print("Exception when calling LanguagesApi->get_languages_translations_organization: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/languages/translations/users/{userId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get effective language translation 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.LanguagesApi(); user_id = 'user_id_example' # str | The user id try: # Get effective language translation for a user api_response = api_instance.get_languages_translations_user(user_id) pprint(api_response) except ApiException as e: print("Exception when calling LanguagesApi->get_languages_translations_user: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/learning/assessments/scoring Genesys Cloud Python SDK.
Genesys describes this as an API used to: Score learning assessment for preview
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LearningApi(); body = PureCloudPlatformClientV2.LearningAssessmentScoringRequest() # LearningAssessmentScoringRequest | Assessment form and answers to score try: # Score learning assessment for preview api_response = api_instance.post_learning_assessments_scoring(body) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->post_learning_assessments_scoring: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/learning/assignments Genesys Cloud Python SDK.
Genesys describes this as an API used to: List of Learning module Assignments. Either moduleId or user value is required
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LearningApi(); module_id = 'module_id_example' # str | Specifies the ID of the learning module. Fetch assignments for learning module ID (optional) interval = 'interval_example' # str | Specifies the range of dueDates to be queried. Milliseconds will be truncated. A maximum of 1 year can be specified in the range. End date is not inclusive. Intervals are represented as an ISO-8601 string. For example: YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss (optional) completion_interval = 'completion_interval_example' # str | Specifies the range of completion dates to be used for filtering. A maximum of 1 year can be specified in the range. End date is not inclusive. Intervals are represented as an ISO-8601 string. For example: YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss (optional) overdue = ''Any'' # str | Specifies if only the non-overdue (overdue is \"False\") or overdue (overdue is \"True\") assignments are returned. If overdue is \"Any\" or if the overdue parameter is not supplied, all assignments are returned (optional) (default to 'Any') page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) pcPass = ''Any'' # str | Specifies if only the failed (pass is \"False\") or passed (pass is \"True\") assignments (completed with assessment)are returned. If pass is \"Any\" or if the pass parameter is not supplied, all assignments are returned (optional) (default to 'Any') min_percentage_score = 3.4 # float | The minimum assessment score for an assignment (completed with assessment) to be included in the results (inclusive) (optional) max_percentage_score = 3.4 # float | The maximum assessment score for an assignment (completed with assessment) to be included in the results (inclusive) (optional) sort_order = ''Desc'' # str | Specifies result set sort order; if not specified, default sort order is descending (Desc) (optional) (default to 'Desc') sort_by = 'sort_by_example' # str | Specifies which field to sort the results by, default sort is by recommendedCompletionDate (optional) user_id = ['user_id_example'] # list[str] | Specifies the list of user IDs to be queried, up to 100 user IDs. (optional) types = ['types_example'] # list[str] | Specifies the module types to filter by. Informational, AssessedContent and Assessment are deprecated (optional) states = ['states_example'] # list[str] | Specifies the assignment states to filter by (optional) expand = ['expand_example'] # list[str] | Specifies the expand option for returning additional information (optional) try: # List of Learning module Assignments api_response = api_instance.get_learning_assignments(module_id=module_id, interval=interval, completion_interval=completion_interval, overdue=overdue, page_size=page_size, page_number=page_number, pcPass=pcPass, min_percentage_score=min_percentage_score, max_percentage_score=max_percentage_score, sort_order=sort_order, sort_by=sort_by, user_id=user_id, types=types, states=states, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->get_learning_assignments: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/learning/assignments Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create Learning Assignment
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LearningApi(); body = PureCloudPlatformClientV2.LearningAssignmentCreate() # LearningAssignmentCreate | The Learning Assignment to be created (optional) try: # Create Learning Assignment api_response = api_instance.post_learning_assignments(body=body) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->post_learning_assignments: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/learning/assignments/aggregates/query Genesys Cloud Python SDK.
Genesys describes this as an API used to: Retrieve aggregated assignment data
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LearningApi(); body = PureCloudPlatformClientV2.LearningAssignmentAggregateParam() # LearningAssignmentAggregateParam | Aggregate Request try: # Retrieve aggregated assignment data api_response = api_instance.post_learning_assignments_aggregates_query(body) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->post_learning_assignments_aggregates_query: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/learning/assignments/bulkadd Genesys Cloud Python SDK.
Genesys describes this as an API used to: Add multiple learning assignments
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LearningApi(); body = [PureCloudPlatformClientV2.LearningAssignmentItem()] # list[LearningAssignmentItem] | The learning assignments to be created (optional) try: # Add multiple learning assignments api_response = api_instance.post_learning_assignments_bulkadd(body=body) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->post_learning_assignments_bulkadd: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/learning/assignments/bulkremove Genesys Cloud Python SDK.
Genesys describes this as an API used to: Remove multiple Learning Assignments
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LearningApi(); body = ['body_example'] # list[str] | The IDs of the learning assignments to be removed (optional) try: # Remove multiple Learning Assignments api_response = api_instance.post_learning_assignments_bulkremove(body=body) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->post_learning_assignments_bulkremove: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/learning/assignments/me Genesys Cloud Python SDK.
Genesys describes this as an API used to: List of Learning Assignments assigned to 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.LearningApi(); module_id = 'module_id_example' # str | Specifies the ID of the learning module. Fetch assignments for learning module ID (optional) interval = 'interval_example' # str | Specifies the range of dueDates to be queried. Milliseconds will be truncated. A maximum of 1 year can be specified in the range. End date is not inclusive. Intervals are represented as an ISO-8601 string. For example: YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss (optional) completion_interval = 'completion_interval_example' # str | Specifies the range of completion dates to be used for filtering. A maximum of 1 year can be specified in the range. End date is not inclusive. Intervals are represented as an ISO-8601 string. For example: YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss (optional) overdue = ''Any'' # str | Specifies if only the non-overdue (overdue is \"False\") or overdue (overdue is \"True\") assignments are returned. If overdue is \"Any\" or if the overdue parameter is not supplied, all assignments are returned (optional) (default to 'Any') page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) pcPass = ''Any'' # str | Specifies if only the failed (pass is \"False\") or passed (pass is \"True\") assignments (completed with assessment)are returned. If pass is \"Any\" or if the pass parameter is not supplied, all assignments are returned (optional) (default to 'Any') min_percentage_score = 3.4 # float | The minimum assessment score for an assignment (completed with assessment) to be included in the results (inclusive) (optional) max_percentage_score = 3.4 # float | The maximum assessment score for an assignment (completed with assessment) to be included in the results (inclusive) (optional) sort_order = ''Desc'' # str | Specifies result set sort order; if not specified, default sort order is descending (Desc) (optional) (default to 'Desc') sort_by = 'sort_by_example' # str | Specifies which field to sort the results by, default sort is by recommendedCompletionDate (optional) types = ['types_example'] # list[str] | Specifies the module types to filter by. Informational, AssessedContent and Assessment are deprecated (optional) states = ['states_example'] # list[str] | Specifies the assignment states to filter by (optional) expand = ['expand_example'] # list[str] | Specifies the expand option for returning additional information (optional) try: # List of Learning Assignments assigned to current user api_response = api_instance.get_learning_assignments_me(module_id=module_id, interval=interval, completion_interval=completion_interval, overdue=overdue, page_size=page_size, page_number=page_number, pcPass=pcPass, min_percentage_score=min_percentage_score, max_percentage_score=max_percentage_score, sort_order=sort_order, sort_by=sort_by, types=types, states=states, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->get_learning_assignments_me: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/learning/assignments/{assignmentId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete a learning assignment
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LearningApi(); assignment_id = 'assignment_id_example' # str | The Learning Assignment ID try: # Delete a learning assignment api_instance.delete_learning_assignment(assignment_id) except ApiException as e: print("Exception when calling LearningApi->delete_learning_assignment: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/learning/assignments/{assignmentId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get Learning Assignment. Permission not required if you are the assigned user of the learning assignment
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LearningApi(); assignment_id = 'assignment_id_example' # str | The ID of Learning Assignment expand = ['expand_example'] # list[str] | Fields to expand in response (optional) try: # Get Learning Assignment api_response = api_instance.get_learning_assignment(assignment_id, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->get_learning_assignment: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/learning/assignments/{assignmentId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update Learning Assignment
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LearningApi(); assignment_id = 'assignment_id_example' # str | The ID of Learning Assignment body = PureCloudPlatformClientV2.LearningAssignmentUpdate() # LearningAssignmentUpdate | The Learning Assignment to be updated (optional) try: # Update Learning Assignment api_response = api_instance.patch_learning_assignment(assignment_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->patch_learning_assignment: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/learning/assignments/{assignmentId}/reassign Genesys Cloud Python SDK.
Genesys describes this as an API used to: Reassign Learning Assignment. This will reassign the state of the assignment to 'Assigned' and update the assignment to the latest version of the module
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LearningApi(); assignment_id = 'assignment_id_example' # str | The Learning Assignment ID try: # Reassign Learning Assignment api_response = api_instance.post_learning_assignment_reassign(assignment_id) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->post_learning_assignment_reassign: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/learning/assignments/{assignmentId}/reschedule Genesys Cloud Python SDK.
Genesys describes this as an API used to: Reschedule Learning Assignment
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LearningApi(); assignment_id = 'assignment_id_example' # str | The ID of Learning Assignment body = PureCloudPlatformClientV2.LearningAssignmentReschedule() # LearningAssignmentReschedule | The Learning assignment reschedule model (optional) try: # Reschedule Learning Assignment api_response = api_instance.patch_learning_assignment_reschedule(assignment_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->patch_learning_assignment_reschedule: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/learning/assignments/{assignmentId}/reset Genesys Cloud Python SDK.
Genesys describes this as an API used to: Reset Learning Assignment. This will reset the state of the assignment to 'Assigned' and remove the version of Learning module associated with the assignment
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LearningApi(); assignment_id = 'assignment_id_example' # str | The Learning Assignment ID try: # Reset Learning Assignment api_response = api_instance.post_learning_assignment_reset(assignment_id) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->post_learning_assignment_reset: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/learning/assignments/{assignmentId}/steps/{stepId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get Learning Assignment Step. Permission not required if you are the assigned user of the learning assignment
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LearningApi(); assignment_id = 'assignment_id_example' # str | The ID of Learning Assignment step_id = 'step_id_example' # str | The ID of Learning Assignment Step shareable_content_object_id = 'shareable_content_object_id_example' # str | The ID of SCO to load (optional) default_shareable_content_object = 'default_shareable_content_object_example' # str | The default SCO to retrieve (optional) expand = ['expand_example'] # list[str] | Fields to expand in response (optional) try: # Get Learning Assignment Step api_response = api_instance.get_learning_assignment_step(assignment_id, step_id, shareable_content_object_id=shareable_content_object_id, default_shareable_content_object=default_shareable_content_object, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->get_learning_assignment_step: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/learning/assignments/{assignmentId}/steps/{stepId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update Learning Assignment Step. Permission not required if you are the assigned user of the learning assignment
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LearningApi(); assignment_id = 'assignment_id_example' # str | The ID of Learning Assignment step_id = 'step_id_example' # str | The ID of Learning Assignment Step body = PureCloudPlatformClientV2.LearningAssignmentStep() # LearningAssignmentStep | The Learning Assignment Step to be updated (optional) try: # Update Learning Assignment Step api_response = api_instance.patch_learning_assignment_step(assignment_id, step_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->patch_learning_assignment_step: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/learning/modules Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get all learning modules of an organization
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LearningApi(); is_archived = False # bool | Archive status (optional) (default to False) types = ['types_example'] # list[str] | Specifies the module types. Informational, AssessedContent and Assessment are deprecated (optional) page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) sort_order = ''ascending'' # str | Sort order (optional) (default to 'ascending') sort_by = ''name'' # str | Sort by (optional) (default to 'name') search_term = 'search_term_example' # str | Search Term (searchable by name) (optional) expand = ['expand_example'] # list[str] | Fields to expand in response(case insensitive) (optional) is_published = ''Any'' # str | Specifies if only the Unpublished (isPublished is \"False\") or Published (isPublished is \"True\") modules are returned. If isPublished is \"Any\" or omitted, both types are returned (optional) (default to 'Any') statuses = ['statuses_example'] # list[str] | Specifies the module statuses to filter by (optional) external_ids = ['external_ids_example'] # list[str] | Specifies the module external IDs to filter by. Only one ID is allowed (optional) try: # Get all learning modules of an organization api_response = api_instance.get_learning_modules(is_archived=is_archived, types=types, page_size=page_size, page_number=page_number, sort_order=sort_order, sort_by=sort_by, search_term=search_term, expand=expand, is_published=is_published, statuses=statuses, external_ids=external_ids) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->get_learning_modules: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/learning/modules Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create a new learning module. This will create a new unpublished learning module with the specified fields.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LearningApi(); body = PureCloudPlatformClientV2.LearningModuleRequest() # LearningModuleRequest | The learning module to be created try: # Create a new learning module api_response = api_instance.post_learning_modules(body) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->post_learning_modules: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/learning/modules/assignments Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get all learning modules of an organization including assignments for a specific 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.LearningApi(); user_ids = ['user_ids_example'] # list[str] | The IDs of the users to include page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) search_term = 'search_term_example' # str | Search Term (searches by name and description) (optional) overdue = ''Any'' # str | Specifies if only modules with overdue/not overdue (overdue is \"True\" or \"False\") assignments are returned. If overdue is \"Any\" or omitted, both are returned and can including modules that are unassigned. (optional) (default to 'Any') assignment_states = ['assignment_states_example'] # list[str] | Specifies the assignment states to return. (optional) expand = ['expand_example'] # list[str] | Fields to expand in response(case insensitive) (optional) try: # Get all learning modules of an organization including assignments for a specific user api_response = api_instance.get_learning_modules_assignments(user_ids, page_size=page_size, page_number=page_number, search_term=search_term, overdue=overdue, assignment_states=assignment_states, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->get_learning_modules_assignments: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/learning/modules/coverart/{coverArtId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a specific Learning Module cover art using ID
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LearningApi(); cover_art_id = 'cover_art_id_example' # str | Key identifier for the cover art try: # Get a specific Learning Module cover art using ID api_response = api_instance.get_learning_modules_coverart_cover_art_id(cover_art_id) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->get_learning_modules_coverart_cover_art_id: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/learning/modules/{moduleId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete a learning module. This will delete a learning module if it is unpublished or it will delete a published and archived learning module
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LearningApi(); module_id = 'module_id_example' # str | The ID of the learning module try: # Delete a learning module api_instance.delete_learning_module(module_id) except ApiException as e: print("Exception when calling LearningApi->delete_learning_module: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/learning/modules/{moduleId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a learning module
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LearningApi(); module_id = 'module_id_example' # str | The ID of the learning module expand = ['expand_example'] # list[str] | Fields to expand in response(case insensitive) (optional) try: # Get a learning module api_response = api_instance.get_learning_module(module_id, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->get_learning_module: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/learning/modules/{moduleId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a learning module. This will update the name, description, completion time in days and inform steps for a learning module
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LearningApi(); module_id = 'module_id_example' # str | The ID of the learning module body = PureCloudPlatformClientV2.LearningModuleRequest() # LearningModuleRequest | The learning module to be updated try: # Update a learning module api_response = api_instance.put_learning_module(module_id, body) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->put_learning_module: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/learning/modules/{moduleId}/jobs Genesys Cloud Python SDK.
Genesys describes this as an API used to: Starts a specified operation on learning module. This will initiate operation specified in the request body for a learning module
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LearningApi(); module_id = 'module_id_example' # str | The ID of the learning module body = PureCloudPlatformClientV2.LearningModuleJobRequest() # LearningModuleJobRequest | The learning module job request try: # Starts a specified operation on learning module api_response = api_instance.post_learning_module_jobs(module_id, body) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->post_learning_module_jobs: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/learning/modules/{moduleId}/jobs/{jobId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a specific Learning Module job status
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LearningApi(); module_id = 'module_id_example' # str | The ID of the learning module job_id = 'job_id_example' # str | The ID of the learning module job try: # Get a specific Learning Module job status api_response = api_instance.get_learning_module_job(module_id, job_id) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->get_learning_module_job: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/learning/modules/{moduleId}/preview Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a learning module preview
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LearningApi(); module_id = 'module_id_example' # str | The ID of the learning module try: # Get a learning module preview api_response = api_instance.get_learning_module_preview(module_id) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->get_learning_module_preview: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/learning/modules/{moduleId}/preview Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a learning module preview. This will update a learning module preview
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LearningApi(); module_id = 'module_id_example' # str | The ID of the learning module body = PureCloudPlatformClientV2.LearningModulePreviewUpdateRequest() # LearningModulePreviewUpdateRequest | The learning module to be updated try: # Update a learning module preview api_response = api_instance.put_learning_module_preview(module_id, body) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->put_learning_module_preview: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/learning/modules/{moduleId}/publish Genesys Cloud Python SDK.
Genesys describes this as an API used to: Publish a Learning module
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LearningApi(); module_id = 'module_id_example' # str | The ID of the learning module body = PureCloudPlatformClientV2.LearningModulePublishRequest() # LearningModulePublishRequest | The request body (optional) try: # Publish a Learning module api_response = api_instance.post_learning_module_publish(module_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->post_learning_module_publish: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/learning/modules/{moduleId}/rule Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a learning module rule
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LearningApi(); module_id = 'module_id_example' # str | The ID of the learning module try: # Get a learning module rule api_response = api_instance.get_learning_module_rule(module_id) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->get_learning_module_rule: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/learning/modules/{moduleId}/rule Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a learning module rule. This will update a learning module rule with the specified fields.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LearningApi(); module_id = 'module_id_example' # str | The ID of the learning module body = PureCloudPlatformClientV2.LearningModuleRule() # LearningModuleRule | The learning module rule to be updated try: # Update a learning module rule api_response = api_instance.put_learning_module_rule(module_id, body) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->put_learning_module_rule: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/learning/modules/{moduleId}/users/{userId}/assignments Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update an external assignment for a specific 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.LearningApi(); module_id = 'module_id_example' # str | Key identifier for the module user_id = 'user_id_example' # str | Key identifier for the user body = PureCloudPlatformClientV2.LearningAssignmentExternalUpdate() # LearningAssignmentExternalUpdate | The learning request for updating the assignment try: # Update an external assignment for a specific user api_response = api_instance.patch_learning_module_user_assignments(module_id, user_id, body) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->patch_learning_module_user_assignments: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/learning/modules/{moduleId}/versions/{versionId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get specific version of a published module
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LearningApi(); module_id = 'module_id_example' # str | The ID of the learning module version_id = 'version_id_example' # str | The version of learning module expand = ['expand_example'] # list[str] | Fields to expand in response(case insensitive) (optional) try: # Get specific version of a published module api_response = api_instance.get_learning_module_version(module_id, version_id, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->get_learning_module_version: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/learning/rules/query Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get users for learning module rule. This will get the users who matches the given rule.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LearningApi(); page_size = 50 # int | Page size (default to 50) page_number = 1 # int | Page number (default to 1) body = PureCloudPlatformClientV2.LearningAssignmentUserQuery() # LearningAssignmentUserQuery | The learning module rule to fetch users try: # Get users for learning module rule api_response = api_instance.post_learning_rules_query(page_size, page_number, body) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->post_learning_rules_query: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/learning/scheduleslots/query Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get list of possible slots where a learning activity can be scheduled.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LearningApi(); body = PureCloudPlatformClientV2.LearningScheduleSlotsQueryRequest() # LearningScheduleSlotsQueryRequest | The slot search request try: # Get list of possible slots where a learning activity can be scheduled. api_response = api_instance.post_learning_scheduleslots_query(body) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->post_learning_scheduleslots_query: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/learning/scorm Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create a SCORM package upload 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.LearningApi(); body = PureCloudPlatformClientV2.LearningScormUploadRequest() # LearningScormUploadRequest | The SCORM package to be uploaded (optional) try: # Create a SCORM package upload request api_response = api_instance.post_learning_scorm(body=body) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->post_learning_scorm: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/learning/scorm/{scormId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get Learning SCORM Result
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LearningApi(); scorm_id = 'scorm_id_example' # str | The ID of the SCORM package try: # Get Learning SCORM Result api_response = api_instance.get_learning_scorm_scorm_id(scorm_id) pprint(api_response) except ApiException as e: print("Exception when calling LearningApi->get_learning_scorm_scorm_id: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/license/definitions Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get all PureCloud license definitions available for the organization.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LicenseApi(); try: # Get all PureCloud license definitions available for the organization. api_response = api_instance.get_license_definitions() pprint(api_response) except ApiException as e: print("Exception when calling LicenseApi->get_license_definitions: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/license/definitions/{licenseId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get PureCloud license definition.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LicenseApi(); license_id = 'license_id_example' # str | ID try: # Get PureCloud license definition. api_response = api_instance.get_license_definition(license_id) pprint(api_response) except ApiException as e: print("Exception when calling LicenseApi->get_license_definition: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/license/infer Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a list of licenses inferred based on a list of roleIds
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LicenseApi(); body = ['body_example'] # list[str] | The roleIds to use while inferring licenses (optional) try: # Get a list of licenses inferred based on a list of roleIds api_response = api_instance.post_license_infer(body=body) pprint(api_response) except ApiException as e: print("Exception when calling LicenseApi->post_license_infer: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/license/organization Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update the organization's license assignments in a batch.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LicenseApi(); body = PureCloudPlatformClientV2.LicenseBatchAssignmentRequest() # LicenseBatchAssignmentRequest | The license assignments to update. (optional) try: # Update the organization's license assignments in a batch. api_response = api_instance.post_license_organization(body=body) pprint(api_response) except ApiException as e: print("Exception when calling LicenseApi->post_license_organization: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/license/toggles/{featureName} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Deprecated - no alternative required. This operation will always return 'true' for requested toggles
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LicenseApi(); feature_name = 'feature_name_example' # str | featureName try: # Deprecated - no alternative required. This operation will always return 'true' for requested toggles api_response = api_instance.get_license_toggle(feature_name) pprint(api_response) except ApiException as e: print("Exception when calling LicenseApi->get_license_toggle: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/license/toggles/{featureName} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Deprecated. No alternative required - this endpoint has no effect
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LicenseApi(); feature_name = 'feature_name_example' # str | featureName try: # Deprecated. No alternative required - this endpoint has no effect api_response = api_instance.post_license_toggle(feature_name) pprint(api_response) except ApiException as e: print("Exception when calling LicenseApi->post_license_toggle: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/license/users Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a page of users and their licenses. Retrieve a page of users in an organization along with the licenses they possess.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LicenseApi(); page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) try: # Get a page of users and their licenses api_response = api_instance.get_license_users(page_size=page_size, page_number=page_number) pprint(api_response) except ApiException as e: print("Exception when calling LicenseApi->get_license_users: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/license/users Genesys Cloud Python SDK.
Genesys describes this as an API used to: Fetch user licenses in a batch.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LicenseApi(); body = ['body_example'] # list[str] | The user IDs to fetch. (optional) try: # Fetch user licenses in a batch. api_response = api_instance.post_license_users(body=body) pprint(api_response) except ApiException as e: print("Exception when calling LicenseApi->post_license_users: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/license/users/{userId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get licenses for specified 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.LicenseApi(); user_id = 'user_id_example' # str | ID try: # Get licenses for specified user. api_response = api_instance.get_license_user(user_id) pprint(api_response) except ApiException as e: print("Exception when calling LicenseApi->get_license_user: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/locations Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a list of all locations.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LocationsApi(); page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) id = ['id_example'] # list[str] | id (optional) sort_order = 'sort_order_example' # str | Sort order (optional) try: # Get a list of all locations. api_response = api_instance.get_locations(page_size=page_size, page_number=page_number, id=id, sort_order=sort_order) pprint(api_response) except ApiException as e: print("Exception when calling LocationsApi->get_locations: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/locations Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create a location
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LocationsApi(); body = PureCloudPlatformClientV2.LocationCreateDefinition() # LocationCreateDefinition | Location try: # Create a location api_response = api_instance.post_locations(body) pprint(api_response) except ApiException as e: print("Exception when calling LocationsApi->post_locations: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/locations/search Genesys Cloud Python SDK.
Genesys describes this as an API used to: Search locations using the q64 value returned from a previous search
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.SearchApi(); q64 = 'q64_example' # str | q64 expand = ['expand_example'] # list[str] | Provides more details about a specified resource (optional) try: # Search locations using the q64 value returned from a previous search api_response = api_instance.get_locations_search(q64, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling SearchApi->get_locations_search: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/locations/search Genesys Cloud Python SDK.
Genesys describes this as an API used to: Search locations
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.SearchApi(); body = PureCloudPlatformClientV2.LocationSearchRequest() # LocationSearchRequest | Search request options try: # Search locations api_response = api_instance.post_locations_search(body) pprint(api_response) except ApiException as e: print("Exception when calling SearchApi->post_locations_search: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/locations/{locationId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete a location
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LocationsApi(); location_id = 'location_id_example' # str | Location ID try: # Delete a location api_instance.delete_location(location_id) except ApiException as e: print("Exception when calling LocationsApi->delete_location: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/locations/{locationId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get Location by ID.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LocationsApi(); location_id = 'location_id_example' # str | Location ID expand = ['expand_example'] # list[str] | Which fields, if any, to expand (optional) try: # Get Location by ID. api_response = api_instance.get_location(location_id, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling LocationsApi->get_location: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/locations/{locationId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a location
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LocationsApi(); location_id = 'location_id_example' # str | Location ID body = PureCloudPlatformClientV2.LocationUpdateDefinition() # LocationUpdateDefinition | Location try: # Update a location api_response = api_instance.patch_location(location_id, body) pprint(api_response) except ApiException as e: print("Exception when calling LocationsApi->patch_location: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/locations/{locationId}/sublocations Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get sublocations for location ID.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LocationsApi(); location_id = 'location_id_example' # str | Location ID try: # Get sublocations for location ID. api_response = api_instance.get_location_sublocations(location_id) pprint(api_response) except ApiException as e: print("Exception when calling LocationsApi->get_location_sublocations: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/diagnostics/logcapture/browser/entries/download/jobs Genesys Cloud Python SDK.
Genesys describes this as an API used to: Creates an async download execution
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LogCaptureApi(); body = PureCloudPlatformClientV2.LogCaptureQueryRequest() # LogCaptureQueryRequest | (optional) try: # Creates an async download execution api_response = api_instance.post_diagnostics_logcapture_browser_entries_download_jobs(body=body) pprint(api_response) except ApiException as e: print("Exception when calling LogCaptureApi->post_diagnostics_logcapture_browser_entries_download_jobs: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/diagnostics/logcapture/browser/entries/download/jobs/{jobId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Gets status of async download execution
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LogCaptureApi(); job_id = 'job_id_example' # str | Job ID try: # Gets status of async download execution api_response = api_instance.get_diagnostics_logcapture_browser_entries_download_job(job_id) pprint(api_response) except ApiException as e: print("Exception when calling LogCaptureApi->get_diagnostics_logcapture_browser_entries_download_job: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/diagnostics/logcapture/browser/entries/query Genesys Cloud Python SDK.
Genesys describes this as an API used to: Query collected log entries. It returns a limited amount of records, to get all records use download endpoint.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LogCaptureApi(); before = 'before_example' # str | The cursor that points to the start of the set of entities that has been returned. (optional) after = 'after_example' # str | The cursor that points to the end of the set of entities that has been returned. (optional) page_size = 'page_size_example' # str | Number of entities to return. Maximum of 200. (optional) body = PureCloudPlatformClientV2.LogCaptureQueryRequest() # LogCaptureQueryRequest | (optional) try: # Query collected log entries. It returns a limited amount of records, to get all records use download endpoint. api_response = api_instance.post_diagnostics_logcapture_browser_entries_query(before=before, after=after, page_size=page_size, body=body) pprint(api_response) except ApiException as e: print("Exception when calling LogCaptureApi->post_diagnostics_logcapture_browser_entries_query: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/diagnostics/logcapture/browser/users Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get all log capture enabled users for an org
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LogCaptureApi(); include_expired = False # bool | Include expired users with log captures still available for search or download (optional) (default to False) try: # Get all log capture enabled users for an org api_response = api_instance.get_diagnostics_logcapture_browser_users(include_expired=include_expired) pprint(api_response) except ApiException as e: print("Exception when calling LogCaptureApi->get_diagnostics_logcapture_browser_users: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/diagnostics/logcapture/browser/users/{userId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Disable browser log capture for the user
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.LogCaptureApi(); user_id = 'user_id_example' # str | The id of the user to disable browser log capture try: # Disable browser log capture for the user api_instance.delete_diagnostics_logcapture_browser_user(user_id) except ApiException as e: print("Exception when calling LogCaptureApi->delete_diagnostics_logcapture_browser_user: %s\n" % e)```