instruction
stringlengths 81
221
| input
stringlengths 50
1.19k
| output
stringlengths 525
3.61k
|
---|---|---|
Provide a Python example that uses the POST /api/v2/externalcontacts/bulk/relationships Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Bulk fetch relationships
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
body = PureCloudPlatformClientV2.BulkIdsRequest() # BulkIdsRequest | Relationships ids
try:
# Bulk fetch relationships
api_response = api_instance.post_externalcontacts_bulk_relationships(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->post_externalcontacts_bulk_relationships: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/externalcontacts/bulk/relationships/add Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Bulk add relationships
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
body = PureCloudPlatformClientV2.BulkRelationshipsRequest() # BulkRelationshipsRequest | Relationships
try:
# Bulk add relationships
api_response = api_instance.post_externalcontacts_bulk_relationships_add(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->post_externalcontacts_bulk_relationships_add: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/externalcontacts/bulk/relationships/remove Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Bulk remove relationships
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
body = PureCloudPlatformClientV2.BulkIdsRequest() # BulkIdsRequest | Relationships ids
try:
# Bulk remove relationships
api_response = api_instance.post_externalcontacts_bulk_relationships_remove(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->post_externalcontacts_bulk_relationships_remove: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/externalcontacts/bulk/relationships/update Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Bulk update relationships
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
body = PureCloudPlatformClientV2.BulkRelationshipsRequest() # BulkRelationshipsRequest | Relationships
try:
# Bulk update relationships
api_response = api_instance.post_externalcontacts_bulk_relationships_update(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->post_externalcontacts_bulk_relationships_update: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/externalcontacts/contacts Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Search for external contacts
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
page_size = 20 # int | Page size (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) (optional) (default to 20)
page_number = 1 # int | Page number (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) (optional) (default to 1)
q = 'q_example' # str | User supplied search keywords (no special syntax is currently supported) (optional)
sort_order = 'sort_order_example' # str | The External Contact field to sort by. Any of: [firstName, lastName, middleName, title]. Direction: [asc, desc]. e.g. \"firstName:asc\", \"title:desc\" (optional)
expand = ['expand_example'] # list[str] | which fields, if any, to expand (optional)
try:
# Search for external contacts
api_response = api_instance.get_externalcontacts_contacts(page_size=page_size, page_number=page_number, q=q, sort_order=sort_order, expand=expand)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->get_externalcontacts_contacts: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/externalcontacts/contacts Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Create an external contact
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
body = PureCloudPlatformClientV2.ExternalContact() # ExternalContact | ExternalContact
try:
# Create an external contact
api_response = api_instance.post_externalcontacts_contacts(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->post_externalcontacts_contacts: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/externalcontacts/contacts/schemas Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get a list of schemas.
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
try:
# Get a list of schemas.
api_response = api_instance.get_externalcontacts_contacts_schemas()
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->get_externalcontacts_contacts_schemas: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/externalcontacts/contacts/schemas Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Create a schema
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
body = PureCloudPlatformClientV2.DataSchema() # DataSchema | Schema
try:
# Create a schema
api_response = api_instance.post_externalcontacts_contacts_schemas(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->post_externalcontacts_contacts_schemas: %s\n" % e)```
|
Provide a Python example that uses the DELETE /api/v2/externalcontacts/contacts/schemas/{schemaId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Delete a schema
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
schema_id = 'schema_id_example' # str | Schema ID
try:
# Delete a schema
api_instance.delete_externalcontacts_contacts_schema(schema_id)
except ApiException as e:
print("Exception when calling ExternalContactsApi->delete_externalcontacts_contacts_schema: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/externalcontacts/contacts/schemas/{schemaId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get a schema
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
schema_id = 'schema_id_example' # str | Schema ID
try:
# Get a schema
api_response = api_instance.get_externalcontacts_contacts_schema(schema_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->get_externalcontacts_contacts_schema: %s\n" % e)```
|
Provide a Python example that uses the PUT /api/v2/externalcontacts/contacts/schemas/{schemaId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Update a schema
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
schema_id = 'schema_id_example' # str | Schema ID
body = PureCloudPlatformClientV2.DataSchema() # DataSchema | Data Schema
try:
# Update a schema
api_response = api_instance.put_externalcontacts_contacts_schema(schema_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->put_externalcontacts_contacts_schema: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/externalcontacts/contacts/schemas/{schemaId}/versions Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get all versions of an external contact's schema
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
schema_id = 'schema_id_example' # str | Schema ID
try:
# Get all versions of an external contact's schema
api_response = api_instance.get_externalcontacts_contacts_schema_versions(schema_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->get_externalcontacts_contacts_schema_versions: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/externalcontacts/contacts/schemas/{schemaId}/versions/{versionId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get a specific version of a schema
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
schema_id = 'schema_id_example' # str | Schema ID
version_id = 'version_id_example' # str | Schema version
try:
# Get a specific version of a schema
api_response = api_instance.get_externalcontacts_contacts_schema_version(schema_id, version_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->get_externalcontacts_contacts_schema_version: %s\n" % e)```
|
Provide a Python example that uses the DELETE /api/v2/externalcontacts/contacts/{contactId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Delete an external contact
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
contact_id = 'contact_id_example' # str | ExternalContact ID
try:
# Delete an external contact
api_response = api_instance.delete_externalcontacts_contact(contact_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->delete_externalcontacts_contact: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/externalcontacts/contacts/{contactId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Fetch an external contact
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
contact_id = 'contact_id_example' # str | ExternalContact ID
expand = ['expand_example'] # list[str] | which fields, if any, to expand (optional)
try:
# Fetch an external contact
api_response = api_instance.get_externalcontacts_contact(contact_id, expand=expand)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->get_externalcontacts_contact: %s\n" % e)```
|
Provide a Python example that uses the PUT /api/v2/externalcontacts/contacts/{contactId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Update an external contact
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
contact_id = 'contact_id_example' # str | ExternalContact ID
body = PureCloudPlatformClientV2.ExternalContact() # ExternalContact | ExternalContact
try:
# Update an external contact
api_response = api_instance.put_externalcontacts_contact(contact_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->put_externalcontacts_contact: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/externalcontacts/contacts/{contactId}/identifiers Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: List the identifiers for a contact
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
contact_id = 'contact_id_example' # str | ExternalContact ID
try:
# List the identifiers for a contact
api_response = api_instance.get_externalcontacts_contact_identifiers(contact_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->get_externalcontacts_contact_identifiers: %s\n" % e)```
|
Provide a Python example that uses the PATCH /api/v2/externalcontacts/contacts/{contactId}/identifiers Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Claim or release identifiers for a contact
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
contact_id = 'contact_id_example' # str | ExternalContact ID
body = PureCloudPlatformClientV2.IdentifierClaimRequest() # IdentifierClaimRequest | ClaimRequest
try:
# Claim or release identifiers for a contact
api_response = api_instance.patch_externalcontacts_contact_identifiers(contact_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->patch_externalcontacts_contact_identifiers: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/externalcontacts/contacts/{contactId}/journey/sessions Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Retrieve all sessions for a given external contact.
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.JourneyApi();
contact_id = 'contact_id_example' # str | ExternalContact ID
page_size = 'page_size_example' # str | Number of entities to return. Maximum of 200. (optional)
after = 'after_example' # str | The cursor that points to the end of the set of entities that has been returned. (optional)
include_merged = True # bool | Indicates whether to return sessions from all external contacts in the merge-set of the given one. (optional)
try:
# Retrieve all sessions for a given external contact.
api_response = api_instance.get_externalcontacts_contact_journey_sessions(contact_id, page_size=page_size, after=after, include_merged=include_merged)
pprint(api_response)
except ApiException as e:
print("Exception when calling JourneyApi->get_externalcontacts_contact_journey_sessions: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/externalcontacts/contacts/{contactId}/notes Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: List notes for an external contact
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
contact_id = 'contact_id_example' # str | ExternalContact Id
page_size = 20 # int | Page size (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) (optional) (default to 20)
page_number = 1 # int | Page number (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) (optional) (default to 1)
sort_order = 'sort_order_example' # str | The Note field to sort by. Any of: [createDate]. Direction: [asc, desc]. e.g. \"createDate:asc\", \"createDate:desc\" (optional)
expand = ['expand_example'] # list[str] | which fields, if any, to expand (optional)
try:
# List notes for an external contact
api_response = api_instance.get_externalcontacts_contact_notes(contact_id, page_size=page_size, page_number=page_number, sort_order=sort_order, expand=expand)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->get_externalcontacts_contact_notes: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/externalcontacts/contacts/{contactId}/notes Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Create a note for an external contact
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
contact_id = 'contact_id_example' # str | ExternalContact Id
body = PureCloudPlatformClientV2.Note() # Note | ExternalContact
try:
# Create a note for an external contact
api_response = api_instance.post_externalcontacts_contact_notes(contact_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->post_externalcontacts_contact_notes: %s\n" % e)```
|
Provide a Python example that uses the DELETE /api/v2/externalcontacts/contacts/{contactId}/notes/{noteId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Delete a note for an external contact
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
contact_id = 'contact_id_example' # str | ExternalContact Id
note_id = 'note_id_example' # str | Note Id
try:
# Delete a note for an external contact
api_response = api_instance.delete_externalcontacts_contact_note(contact_id, note_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->delete_externalcontacts_contact_note: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/externalcontacts/contacts/{contactId}/notes/{noteId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Fetch a note for an external contact
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
contact_id = 'contact_id_example' # str | ExternalContact Id
note_id = 'note_id_example' # str | Note Id
expand = ['expand_example'] # list[str] | which fields, if any, to expand (optional)
try:
# Fetch a note for an external contact
api_response = api_instance.get_externalcontacts_contact_note(contact_id, note_id, expand=expand)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->get_externalcontacts_contact_note: %s\n" % e)```
|
Provide a Python example that uses the PUT /api/v2/externalcontacts/contacts/{contactId}/notes/{noteId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Update a note for an external contact
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
contact_id = 'contact_id_example' # str | ExternalContact Id
note_id = 'note_id_example' # str | Note Id
body = PureCloudPlatformClientV2.Note() # Note | Note
try:
# Update a note for an external contact
api_response = api_instance.put_externalcontacts_contact_note(contact_id, note_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->put_externalcontacts_contact_note: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/externalcontacts/contacts/{contactId}/promotion Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Promote an observed contact (ephemeral or identified) to a curated contact
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
contact_id = 'contact_id_example' # str | ExternalContact ID
try:
# Promote an observed contact (ephemeral or identified) to a curated contact
api_response = api_instance.post_externalcontacts_contact_promotion(contact_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->post_externalcontacts_contact_promotion: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/externalcontacts/contacts/{contactId}/unresolved Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Fetch an unresolved external contact
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
contact_id = 'contact_id_example' # str | ExternalContact ID
expand = ['expand_example'] # list[str] | which fields, if any, to expand (externalOrganization,externalDataSources,identifiers) (optional)
try:
# Fetch an unresolved external contact
api_response = api_instance.get_externalcontacts_contact_unresolved(contact_id, expand=expand)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->get_externalcontacts_contact_unresolved: %s\n" % e)```
|
Provide a Python example that uses the PUT /api/v2/externalcontacts/conversations/{conversationId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Associate/disassociate an external contact with a conversation. To associate, supply a value for the externalContactId. To disassociate, do not include the property at all.
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
conversation_id = 'conversation_id_example' # str | Conversation ID
body = PureCloudPlatformClientV2.ConversationAssociation() # ConversationAssociation | ConversationAssociation
try:
# Associate/disassociate an external contact with a conversation
api_instance.put_externalcontacts_conversation(conversation_id, body)
except ApiException as e:
print("Exception when calling ExternalContactsApi->put_externalcontacts_conversation: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/externalcontacts/identifierlookup Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Fetch a contact using an identifier type and value. Phone number identifier values must be provided with the country code and a leading '+' symbol. Example: "+1 704 298 4733"
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
identifier = PureCloudPlatformClientV2.ContactIdentifier() # ContactIdentifier |
expand = ['expand_example'] # list[str] | which field, if any, to expand (optional)
try:
# Fetch a contact using an identifier type and value.
api_response = api_instance.post_externalcontacts_identifierlookup(identifier, expand=expand)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->post_externalcontacts_identifierlookup: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/externalcontacts/merge/contacts Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Merge two contacts into a new contact record. Two curated contacts cannot be merged. Refer to the Contact Merging article on the Developer Center for details
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
body = PureCloudPlatformClientV2.MergeRequest() # MergeRequest | MergeRequest
try:
# Merge two contacts into a new contact record
api_response = api_instance.post_externalcontacts_merge_contacts(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->post_externalcontacts_merge_contacts: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/externalcontacts/organizations Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Search for external organizations
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
page_size = 20 # int | Page size (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) (optional) (default to 20)
page_number = 1 # int | Page number (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) (optional) (default to 1)
q = 'q_example' # str | Search query (optional)
trustor_id = ['trustor_id_example'] # list[str] | Search for external organizations by trustorIds (limit 25). If supplied, the 'q' parameters is ignored. Items are returned in the order requested (optional)
sort_order = 'sort_order_example' # str | The Organization field to sort by. Any of: [companyType, industry, name]. Direction: [asc, desc]. e.g. \"companyType:asc\", \"industry:desc\" (optional)
expand = ['expand_example'] # list[str] | which fields, if any, to expand (optional)
include_trustors = True # bool | (true or false) whether or not to include trustor information embedded in the externalOrganization (optional)
try:
# Search for external organizations
api_response = api_instance.get_externalcontacts_organizations(page_size=page_size, page_number=page_number, q=q, trustor_id=trustor_id, sort_order=sort_order, expand=expand, include_trustors=include_trustors)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->get_externalcontacts_organizations: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/externalcontacts/organizations Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Create an external 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.ExternalContactsApi();
body = PureCloudPlatformClientV2.ExternalOrganization() # ExternalOrganization | ExternalOrganization
try:
# Create an external organization
api_response = api_instance.post_externalcontacts_organizations(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->post_externalcontacts_organizations: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/externalcontacts/organizations/schemas Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get a list of schemas.
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
try:
# Get a list of schemas.
api_response = api_instance.get_externalcontacts_organizations_schemas()
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->get_externalcontacts_organizations_schemas: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/externalcontacts/organizations/schemas Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Create a schema
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
body = PureCloudPlatformClientV2.DataSchema() # DataSchema | Schema
try:
# Create a schema
api_response = api_instance.post_externalcontacts_organizations_schemas(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->post_externalcontacts_organizations_schemas: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/externalcontacts/organizations/schemas/{schemaId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get a schema
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
schema_id = 'schema_id_example' # str | Schema ID
try:
# Get a schema
api_response = api_instance.get_externalcontacts_organizations_schema(schema_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->get_externalcontacts_organizations_schema: %s\n" % e)```
|
Provide a Python example that uses the PUT /api/v2/externalcontacts/organizations/schemas/{schemaId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Update a schema
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
schema_id = 'schema_id_example' # str | Schema ID
body = PureCloudPlatformClientV2.DataSchema() # DataSchema | Data Schema
try:
# Update a schema
api_response = api_instance.put_externalcontacts_organizations_schema(schema_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->put_externalcontacts_organizations_schema: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/externalcontacts/organizations/schemas/{schemaId}/versions Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get all versions of an external organization's schema
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
schema_id = 'schema_id_example' # str | Schema ID
try:
# Get all versions of an external organization's schema
api_response = api_instance.get_externalcontacts_organizations_schema_versions(schema_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->get_externalcontacts_organizations_schema_versions: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/externalcontacts/organizations/schemas/{schemaId}/versions/{versionId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get a specific version of a schema
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
schema_id = 'schema_id_example' # str | Schema ID
version_id = 'version_id_example' # str | Schema version
try:
# Get a specific version of a schema
api_response = api_instance.get_externalcontacts_organizations_schema_version(schema_id, version_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->get_externalcontacts_organizations_schema_version: %s\n" % e)```
|
Provide a Python example that uses the DELETE /api/v2/externalcontacts/organizations/{externalOrganizationId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Delete an external 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.ExternalContactsApi();
external_organization_id = 'external_organization_id_example' # str | External Organization ID
try:
# Delete an external organization
api_response = api_instance.delete_externalcontacts_organization(external_organization_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->delete_externalcontacts_organization: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/externalcontacts/organizations/{externalOrganizationId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Fetch an external 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.ExternalContactsApi();
external_organization_id = 'external_organization_id_example' # str | External Organization ID
expand = ['expand_example'] # list[str] | which fields, if any, to expand (externalDataSources) (optional)
include_trustors = True # bool | (true or false) whether or not to include trustor information embedded in the externalOrganization (optional)
try:
# Fetch an external organization
api_response = api_instance.get_externalcontacts_organization(external_organization_id, expand=expand, include_trustors=include_trustors)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->get_externalcontacts_organization: %s\n" % e)```
|
Provide a Python example that uses the PUT /api/v2/externalcontacts/organizations/{externalOrganizationId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Update an external 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.ExternalContactsApi();
external_organization_id = 'external_organization_id_example' # str | External Organization ID
body = PureCloudPlatformClientV2.ExternalOrganization() # ExternalOrganization | ExternalOrganization
try:
# Update an external organization
api_response = api_instance.put_externalcontacts_organization(external_organization_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->put_externalcontacts_organization: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/externalcontacts/organizations/{externalOrganizationId}/contacts Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Search for external contacts in an external 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.ExternalContactsApi();
external_organization_id = 'external_organization_id_example' # str | External Organization ID
page_size = 20 # int | Page size (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) (optional) (default to 20)
page_number = 1 # int | Page number (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) (optional) (default to 1)
q = 'q_example' # str | User supplied search keywords (no special syntax is currently supported) (optional)
sort_order = 'sort_order_example' # str | The External Contact field to sort by. Any of: [firstName, lastName, middleName, title]. Direction: [asc, desc]. e.g. \"firstName:asc\", \"title:desc\" (optional)
expand = ['expand_example'] # list[str] | which fields, if any, to expand (optional)
try:
# Search for external contacts in an external organization
api_response = api_instance.get_externalcontacts_organization_contacts(external_organization_id, page_size=page_size, page_number=page_number, q=q, sort_order=sort_order, expand=expand)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->get_externalcontacts_organization_contacts: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/externalcontacts/organizations/{externalOrganizationId}/notes Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: List notes for an external 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.ExternalContactsApi();
external_organization_id = 'external_organization_id_example' # str | External Organization Id
page_size = 20 # int | Page size (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) (optional) (default to 20)
page_number = 1 # int | Page number (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) (optional) (default to 1)
sort_order = 'sort_order_example' # str | The Note field to sort by. Any of: [createDate]. Direction: [asc, desc]. e.g. \"createDate:asc\", \"createDate:desc\" (optional)
expand = ['expand_example'] # list[str] | which fields, if any, to expand (optional)
try:
# List notes for an external organization
api_response = api_instance.get_externalcontacts_organization_notes(external_organization_id, page_size=page_size, page_number=page_number, sort_order=sort_order, expand=expand)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->get_externalcontacts_organization_notes: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/externalcontacts/organizations/{externalOrganizationId}/notes Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Create a note for an external 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.ExternalContactsApi();
external_organization_id = 'external_organization_id_example' # str | External Organization Id
body = PureCloudPlatformClientV2.Note() # Note | ExternalContact
try:
# Create a note for an external organization
api_response = api_instance.post_externalcontacts_organization_notes(external_organization_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->post_externalcontacts_organization_notes: %s\n" % e)```
|
Provide a Python example that uses the DELETE /api/v2/externalcontacts/organizations/{externalOrganizationId}/notes/{noteId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Delete a note for an external 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.ExternalContactsApi();
external_organization_id = 'external_organization_id_example' # str | External Organization Id
note_id = 'note_id_example' # str | Note Id
try:
# Delete a note for an external organization
api_response = api_instance.delete_externalcontacts_organization_note(external_organization_id, note_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->delete_externalcontacts_organization_note: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/externalcontacts/organizations/{externalOrganizationId}/notes/{noteId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Fetch a note for an external 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.ExternalContactsApi();
external_organization_id = 'external_organization_id_example' # str | External Organization Id
note_id = 'note_id_example' # str | Note Id
expand = ['expand_example'] # list[str] | which fields, if any, to expand (optional)
try:
# Fetch a note for an external organization
api_response = api_instance.get_externalcontacts_organization_note(external_organization_id, note_id, expand=expand)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->get_externalcontacts_organization_note: %s\n" % e)```
|
Provide a Python example that uses the PUT /api/v2/externalcontacts/organizations/{externalOrganizationId}/notes/{noteId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Update a note for an external 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.ExternalContactsApi();
external_organization_id = 'external_organization_id_example' # str | External Organization Id
note_id = 'note_id_example' # str | Note Id
body = PureCloudPlatformClientV2.Note() # Note | Note
try:
# Update a note for an external organization
api_response = api_instance.put_externalcontacts_organization_note(external_organization_id, note_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->put_externalcontacts_organization_note: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/externalcontacts/organizations/{externalOrganizationId}/relationships Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Fetch a relationship for an external 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.ExternalContactsApi();
external_organization_id = 'external_organization_id_example' # str | External Organization ID
page_size = 20 # int | Page size (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) (optional) (default to 20)
page_number = 1 # int | Page number (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) (optional) (default to 1)
expand = ['expand_example'] # list[str] | which fields, if any, to expand (optional)
sort_order = 'sort_order_example' # str | The Relationship field to sort by. Any of: [createDate, relationship]. Direction: [asc, desc]. e.g. \"createDate:asc\", \"relationship:desc\" (optional)
try:
# Fetch a relationship for an external organization
api_response = api_instance.get_externalcontacts_organization_relationships(external_organization_id, page_size=page_size, page_number=page_number, expand=expand, sort_order=sort_order)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->get_externalcontacts_organization_relationships: %s\n" % e)```
|
Provide a Python example that uses the DELETE /api/v2/externalcontacts/organizations/{externalOrganizationId}/trustor Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Unlink the Trustor for this External 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.ExternalContactsApi();
external_organization_id = 'external_organization_id_example' # str | External Organization ID
try:
# Unlink the Trustor for this External Organization
api_instance.delete_externalcontacts_organization_trustor(external_organization_id)
except ApiException as e:
print("Exception when calling ExternalContactsApi->delete_externalcontacts_organization_trustor: %s\n" % e)```
|
Provide a Python example that uses the PUT /api/v2/externalcontacts/organizations/{externalOrganizationId}/trustor/{trustorId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Links a Trustor with an External 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.ExternalContactsApi();
external_organization_id = 'external_organization_id_example' # str | External Organization ID
trustor_id = 'trustor_id_example' # str | Trustor ID
try:
# Links a Trustor with an External Organization
api_response = api_instance.put_externalcontacts_organization_trustor_trustor_id(external_organization_id, trustor_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->put_externalcontacts_organization_trustor_trustor_id: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/externalcontacts/relationships Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Create a relationship
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
body = PureCloudPlatformClientV2.Relationship() # Relationship | Relationship
try:
# Create a relationship
api_response = api_instance.post_externalcontacts_relationships(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->post_externalcontacts_relationships: %s\n" % e)```
|
Provide a Python example that uses the DELETE /api/v2/externalcontacts/relationships/{relationshipId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Delete a relationship
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
relationship_id = 'relationship_id_example' # str | Relationship Id
try:
# Delete a relationship
api_response = api_instance.delete_externalcontacts_relationship(relationship_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->delete_externalcontacts_relationship: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/externalcontacts/relationships/{relationshipId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Fetch a relationship
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
relationship_id = 'relationship_id_example' # str | Relationship Id
expand = ['expand_example'] # list[str] | which fields, if any, to expand (optional)
try:
# Fetch a relationship
api_response = api_instance.get_externalcontacts_relationship(relationship_id, expand=expand)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->get_externalcontacts_relationship: %s\n" % e)```
|
Provide a Python example that uses the PUT /api/v2/externalcontacts/relationships/{relationshipId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Update a relationship
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
relationship_id = 'relationship_id_example' # str | Relationship Id
body = PureCloudPlatformClientV2.Relationship() # Relationship | Relationship
try:
# Update a relationship
api_response = api_instance.put_externalcontacts_relationship(relationship_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->put_externalcontacts_relationship: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/externalcontacts/reversewhitepageslookup Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Look up contacts and externalOrganizations based on an attribute. Maximum of 25 values returned.
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
lookup_val = 'lookup_val_example' # str | User supplied value to lookup contacts/externalOrganizations (supports email addresses, e164 phone numbers, Twitter screen names)
expand = ['expand_example'] # list[str] | which field, if any, to expand (optional)
try:
# Look up contacts and externalOrganizations based on an attribute. Maximum of 25 values returned.
api_response = api_instance.get_externalcontacts_reversewhitepageslookup(lookup_val, expand=expand)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->get_externalcontacts_reversewhitepageslookup: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/externalcontacts/scan/contacts Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Scan for external contacts using paging
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
limit = 56 # int | The number of contacts per page; must be between 10 and 200, default is 100 (optional)
cursor = 'cursor_example' # str | Indicates where to resume query results (not required for first page), each page returns a new cursor with a 24h TTL (optional)
try:
# Scan for external contacts using paging
api_response = api_instance.get_externalcontacts_scan_contacts(limit=limit, cursor=cursor)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->get_externalcontacts_scan_contacts: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/externalcontacts/scan/notes Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Scan for notes using paging
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
limit = 56 # int | The number of notes per page; must be between 10 and 200, default is 100 (optional)
cursor = 'cursor_example' # str | Indicates where to resume query results (not required for first page), each page returns a new cursor with a 24h TTL (optional)
try:
# Scan for notes using paging
api_response = api_instance.get_externalcontacts_scan_notes(limit=limit, cursor=cursor)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->get_externalcontacts_scan_notes: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/externalcontacts/scan/organizations Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Scan for external organizations using paging
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
limit = 56 # int | The number of organizations per page; must be between 10 and 200, default is 100 (optional)
cursor = 'cursor_example' # str | Indicates where to resume query results (not required for first page), each page returns a new cursor with a 24h TTL (optional)
try:
# Scan for external organizations using paging
api_response = api_instance.get_externalcontacts_scan_organizations(limit=limit, cursor=cursor)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->get_externalcontacts_scan_organizations: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/externalcontacts/scan/relationships Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Scan for relationships
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.ExternalContactsApi();
limit = 56 # int | The number of relationships per page; must be between 10 and 200, default is 100 (optional)
cursor = 'cursor_example' # str | Indicates where to resume query results (not required for first page), each page returns a new cursor with a 24h TTL (optional)
try:
# Scan for relationships
api_response = api_instance.get_externalcontacts_scan_relationships(limit=limit, cursor=cursor)
pprint(api_response)
except ApiException as e:
print("Exception when calling ExternalContactsApi->get_externalcontacts_scan_relationships: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/fax/documents Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get a list of fax documents.
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.FaxApi();
page_size = 25 # int | Page size (optional) (default to 25)
page_number = 1 # int | Page number (optional) (default to 1)
try:
# Get a list of fax documents.
api_response = api_instance.get_fax_documents(page_size=page_size, page_number=page_number)
pprint(api_response)
except ApiException as e:
print("Exception when calling FaxApi->get_fax_documents: %s\n" % e)```
|
Provide a Python example that uses the DELETE /api/v2/fax/documents/{documentId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Delete a fax document.
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.FaxApi();
document_id = 'document_id_example' # str | Document ID
try:
# Delete a fax document.
api_instance.delete_fax_document(document_id)
except ApiException as e:
print("Exception when calling FaxApi->delete_fax_document: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/fax/documents/{documentId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get a document.
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.FaxApi();
document_id = 'document_id_example' # str | Document ID
try:
# Get a document.
api_response = api_instance.get_fax_document(document_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling FaxApi->get_fax_document: %s\n" % e)```
|
Provide a Python example that uses the PUT /api/v2/fax/documents/{documentId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Update a fax document.
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.FaxApi();
document_id = 'document_id_example' # str | Document ID
body = PureCloudPlatformClientV2.FaxDocument() # FaxDocument | Document
try:
# Update a fax document.
api_response = api_instance.put_fax_document(document_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling FaxApi->put_fax_document: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/fax/documents/{documentId}/content Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Download a fax document.
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.FaxApi();
document_id = 'document_id_example' # str | Document ID
try:
# Download a fax document.
api_response = api_instance.get_fax_document_content(document_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling FaxApi->get_fax_document_content: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/fax/settings Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get organization config for given 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.FaxApi();
try:
# Get organization config for given organization
api_response = api_instance.get_fax_settings()
pprint(api_response)
except ApiException as e:
print("Exception when calling FaxApi->get_fax_settings: %s\n" % e)```
|
Provide a Python example that uses the PUT /api/v2/fax/settings Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Update/write organization config for given 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.FaxApi();
body = PureCloudPlatformClientV2.FaxConfig() # FaxConfig | (optional)
try:
# Update/write organization config for given organization
api_response = api_instance.put_fax_settings(body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling FaxApi->put_fax_settings: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/fax/summary Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get fax summary
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.FaxApi();
try:
# Get fax summary
api_response = api_instance.get_fax_summary()
pprint(api_response)
except ApiException as e:
print("Exception when calling FaxApi->get_fax_summary: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/analytics/flows/activity/query Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Query for flow activity observations
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.FlowsApi();
body = PureCloudPlatformClientV2.FlowActivityQuery() # FlowActivityQuery | query
page_size = 56 # int | The desired page size (optional)
page_number = 56 # int | The desired page number (optional)
try:
# Query for flow activity observations
api_response = api_instance.post_analytics_flows_activity_query(body, page_size=page_size, page_number=page_number)
pprint(api_response)
except ApiException as e:
print("Exception when calling FlowsApi->post_analytics_flows_activity_query: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/analytics/flows/aggregates/query Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Query for flow aggregates
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.FlowsApi();
body = PureCloudPlatformClientV2.FlowAggregationQuery() # FlowAggregationQuery | query
try:
# Query for flow aggregates
api_response = api_instance.post_analytics_flows_aggregates_query(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling FlowsApi->post_analytics_flows_aggregates_query: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/analytics/flows/observations/query Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Query for flow observations
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.FlowsApi();
body = PureCloudPlatformClientV2.FlowObservationQuery() # FlowObservationQuery | query
try:
# Query for flow observations
api_response = api_instance.post_analytics_flows_observations_query(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling FlowsApi->post_analytics_flows_observations_query: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/employeeperformance/externalmetrics/data Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Write External Metric 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.GamificationApi();
body = PureCloudPlatformClientV2.ExternalMetricDataWriteRequest() # ExternalMetricDataWriteRequest | The External Metric Data to be added (optional)
try:
# Write External Metric Data
api_response = api_instance.post_employeeperformance_externalmetrics_data(body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling GamificationApi->post_employeeperformance_externalmetrics_data: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/employeeperformance/externalmetrics/definitions Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get a list of External Metric Definitions of an organization, sorted by name in ascending order
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.GamificationApi();
page_size = 25 # int | Page size (optional) (default to 25)
page_number = 1 # int | Page number (optional) (default to 1)
try:
# Get a list of External Metric Definitions of an organization, sorted by name in ascending order
api_response = api_instance.get_employeeperformance_externalmetrics_definitions(page_size=page_size, page_number=page_number)
pprint(api_response)
except ApiException as e:
print("Exception when calling GamificationApi->get_employeeperformance_externalmetrics_definitions: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/employeeperformance/externalmetrics/definitions Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Create External Metric 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.GamificationApi();
body = PureCloudPlatformClientV2.ExternalMetricDefinitionCreateRequest() # ExternalMetricDefinitionCreateRequest | The External Metric Definition to be created (optional)
try:
# Create External Metric Definition
api_response = api_instance.post_employeeperformance_externalmetrics_definitions(body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling GamificationApi->post_employeeperformance_externalmetrics_definitions: %s\n" % e)```
|
Provide a Python example that uses the DELETE /api/v2/employeeperformance/externalmetrics/definitions/{metricId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Delete an External Metric 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.GamificationApi();
metric_id = 'metric_id_example' # str | Specifies the External Metric Definition ID
try:
# Delete an External Metric Definition
api_instance.delete_employeeperformance_externalmetrics_definition(metric_id)
except ApiException as e:
print("Exception when calling GamificationApi->delete_employeeperformance_externalmetrics_definition: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/employeeperformance/externalmetrics/definitions/{metricId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get an External Metric 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.GamificationApi();
metric_id = 'metric_id_example' # str | Specifies the External Metric Definition ID
try:
# Get an External Metric Definition
api_response = api_instance.get_employeeperformance_externalmetrics_definition(metric_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling GamificationApi->get_employeeperformance_externalmetrics_definition: %s\n" % e)```
|
Provide a Python example that uses the PATCH /api/v2/employeeperformance/externalmetrics/definitions/{metricId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Update External Metric 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.GamificationApi();
metric_id = 'metric_id_example' # str | Specifies the metric definition ID
body = PureCloudPlatformClientV2.ExternalMetricDefinitionUpdateRequest() # ExternalMetricDefinitionUpdateRequest | The External Metric Definition parameters to be updated
try:
# Update External Metric Definition
api_response = api_instance.patch_employeeperformance_externalmetrics_definition(metric_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling GamificationApi->patch_employeeperformance_externalmetrics_definition: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/gamification/insights Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get insights summary
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.GamificationApi();
filter_type = 'filter_type_example' # str | Filter type for the query request.
filter_id = 'filter_id_example' # str | ID for the filter type.
granularity = 'granularity_example' # str | Granularity
comparative_period_start_workday = '2013-10-20' # date | The start work day of comparative period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
primary_period_start_workday = '2013-10-20' # date | The start work day of primary period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
page_size = 25 # int | Page size (optional) (default to 25)
page_number = 1 # int | Page number (optional) (default to 1)
sort_key = 'sort_key_example' # str | Sort key (optional)
sort_metric_id = 'sort_metric_id_example' # str | Sort Metric Id (optional)
sort_order = ''asc'' # str | Sort order (optional) (default to 'asc')
user_ids = 'user_ids_example' # str | A list of up to 100 comma-separated user Ids (optional)
try:
# Get insights summary
api_response = api_instance.get_gamification_insights(filter_type, filter_id, granularity, comparative_period_start_workday, primary_period_start_workday, page_size=page_size, page_number=page_number, sort_key=sort_key, sort_metric_id=sort_metric_id, sort_order=sort_order, user_ids=user_ids)
pprint(api_response)
except ApiException as e:
print("Exception when calling GamificationApi->get_gamification_insights: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/gamification/insights/details Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get insights details for the current user
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.GamificationApi();
filter_type = 'filter_type_example' # str | Filter type for the query request.
filter_id = 'filter_id_example' # str | ID for the filter type.
granularity = 'granularity_example' # str | Granularity
comparative_period_start_workday = '2013-10-20' # date | The start work day of comparative period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
primary_period_start_workday = '2013-10-20' # date | The start work day of primary period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
try:
# Get insights details for the current user
api_response = api_instance.get_gamification_insights_details(filter_type, filter_id, granularity, comparative_period_start_workday, primary_period_start_workday)
pprint(api_response)
except ApiException as e:
print("Exception when calling GamificationApi->get_gamification_insights_details: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/gamification/insights/groups/trends Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get insights overall trend for the current user
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.GamificationApi();
filter_type = 'filter_type_example' # str | Filter type for the query request.
filter_id = 'filter_id_example' # str | ID for the filter type.
granularity = 'granularity_example' # str | Granularity
comparative_period_start_workday = '2013-10-20' # date | The start work day of comparative period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
comparative_period_end_workday = '2013-10-20' # date | The end work day of comparative period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
primary_period_start_workday = '2013-10-20' # date | The start work day of primary period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
primary_period_end_workday = '2013-10-20' # date | The end work day of primary period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
try:
# Get insights overall trend for the current user
api_response = api_instance.get_gamification_insights_groups_trends(filter_type, filter_id, granularity, comparative_period_start_workday, comparative_period_end_workday, primary_period_start_workday, primary_period_end_workday)
pprint(api_response)
except ApiException as e:
print("Exception when calling GamificationApi->get_gamification_insights_groups_trends: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/gamification/insights/groups/trends/all Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get insights overall trend
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.GamificationApi();
filter_type = 'filter_type_example' # str | Filter type for the query request.
filter_id = 'filter_id_example' # str | ID for the filter type.
granularity = 'granularity_example' # str | Granularity
comparative_period_start_workday = '2013-10-20' # date | The start work day of comparative period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
comparative_period_end_workday = '2013-10-20' # date | The end work day of comparative period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
primary_period_start_workday = '2013-10-20' # date | The start work day of primary period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
primary_period_end_workday = '2013-10-20' # date | The end work day of primary period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
try:
# Get insights overall trend
api_response = api_instance.get_gamification_insights_groups_trends_all(filter_type, filter_id, granularity, comparative_period_start_workday, comparative_period_end_workday, primary_period_start_workday, primary_period_end_workday)
pprint(api_response)
except ApiException as e:
print("Exception when calling GamificationApi->get_gamification_insights_groups_trends_all: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/gamification/insights/members Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Query users in a profile during a period of time
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.GamificationApi();
filter_type = 'filter_type_example' # str | Filter type for the query request.
filter_id = 'filter_id_example' # str | ID for the filter type.
granularity = 'granularity_example' # str | Granularity
start_workday = '2013-10-20' # date | The start work day. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
try:
# Query users in a profile during a period of time
api_response = api_instance.get_gamification_insights_members(filter_type, filter_id, granularity, start_workday)
pprint(api_response)
except ApiException as e:
print("Exception when calling GamificationApi->get_gamification_insights_members: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/gamification/insights/trends Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get insights user trend for the current user
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.GamificationApi();
filter_type = 'filter_type_example' # str | Filter type for the query request.
filter_id = 'filter_id_example' # str | ID for the filter type.
granularity = 'granularity_example' # str | Granularity
comparative_period_start_workday = '2013-10-20' # date | The start work day of comparative period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
comparative_period_end_workday = '2013-10-20' # date | The end work day of comparative period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
primary_period_start_workday = '2013-10-20' # date | The start work day of primary period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
primary_period_end_workday = '2013-10-20' # date | The end work day of primary period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
try:
# Get insights user trend for the current user
api_response = api_instance.get_gamification_insights_trends(filter_type, filter_id, granularity, comparative_period_start_workday, comparative_period_end_workday, primary_period_start_workday, primary_period_end_workday)
pprint(api_response)
except ApiException as e:
print("Exception when calling GamificationApi->get_gamification_insights_trends: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/gamification/insights/users/{userId}/details Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get insights details 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.GamificationApi();
user_id = 'user_id_example' # str | The ID of a user.
filter_type = 'filter_type_example' # str | Filter type for the query request.
filter_id = 'filter_id_example' # str | ID for the filter type.
granularity = 'granularity_example' # str | Granularity
comparative_period_start_workday = '2013-10-20' # date | The start work day of comparative period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
primary_period_start_workday = '2013-10-20' # date | The start work day of primary period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
try:
# Get insights details for the user
api_response = api_instance.get_gamification_insights_user_details(user_id, filter_type, filter_id, granularity, comparative_period_start_workday, primary_period_start_workday)
pprint(api_response)
except ApiException as e:
print("Exception when calling GamificationApi->get_gamification_insights_user_details: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/gamification/insights/users/{userId}/trends Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Get insights user trend 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.GamificationApi();
user_id = 'user_id_example' # str | The ID of a user.
filter_type = 'filter_type_example' # str | Filter type for the query request.
filter_id = 'filter_id_example' # str | ID for the filter type.
granularity = 'granularity_example' # str | Granularity
comparative_period_start_workday = '2013-10-20' # date | The start work day of comparative period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
comparative_period_end_workday = '2013-10-20' # date | The end work day of comparative period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
primary_period_start_workday = '2013-10-20' # date | The start work day of primary period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
primary_period_end_workday = '2013-10-20' # date | The end work day of primary period. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
try:
# Get insights user trend for the user
api_response = api_instance.get_gamification_insights_user_trends(user_id, filter_type, filter_id, granularity, comparative_period_start_workday, comparative_period_end_workday, primary_period_start_workday, primary_period_end_workday)
pprint(api_response)
except ApiException as e:
print("Exception when calling GamificationApi->get_gamification_insights_user_trends: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/gamification/leaderboard Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Leaderboard of the requesting user's division or performance profile
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.GamificationApi();
start_workday = '2013-10-20' # date | Start workday to retrieve for the leaderboard. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
end_workday = '2013-10-20' # date | End workday to retrieve for the leaderboard. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
metric_id = 'metric_id_example' # str | Metric Id for which the leaderboard is to be generated. The total points is used if nothing is given. (optional)
try:
# Leaderboard of the requesting user's division or performance profile
api_response = api_instance.get_gamification_leaderboard(start_workday, end_workday, metric_id=metric_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling GamificationApi->get_gamification_leaderboard: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/gamification/leaderboard/all Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Leaderboard by filter type
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.GamificationApi();
filter_type = 'filter_type_example' # str | Filter type for the query request.
filter_id = 'filter_id_example' # str | ID for the filter type. For example, division or performance profile Id
start_workday = '2013-10-20' # date | Start workday to retrieve for the leaderboard. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
end_workday = '2013-10-20' # date | End workday to retrieve for the leaderboard. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd
metric_id = 'metric_id_example' # str | Metric Id for which the leaderboard is to be generated. The total points is used if nothing is given. (optional)
try:
# Leaderboard by filter type
api_response = api_instance.get_gamification_leaderboard_all(filter_type, filter_id, start_workday, end_workday, metric_id=metric_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling GamificationApi->get_gamification_leaderboard_all: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/gamification/leaderboard/all/bestpoints Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Best Points by division or performance profile
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.GamificationApi();
filter_type = 'filter_type_example' # str | Filter type for the query request.
filter_id = 'filter_id_example' # str | ID for the filter type. For example, division or performance profile Id
try:
# Best Points by division or performance profile
api_response = api_instance.get_gamification_leaderboard_all_bestpoints(filter_type, filter_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling GamificationApi->get_gamification_leaderboard_all_bestpoints: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/gamification/leaderboard/bestpoints Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Best Points of the requesting user's current performance profile or division
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.GamificationApi();
try:
# Best Points of the requesting user's current performance profile or division
api_response = api_instance.get_gamification_leaderboard_bestpoints()
pprint(api_response)
except ApiException as e:
print("Exception when calling GamificationApi->get_gamification_leaderboard_bestpoints: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/gamification/metricdefinitions Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: All metric definitions. Retrieves the metric definitions and their corresponding default objectives used to create a gamified metric
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.GamificationApi();
try:
# All metric definitions
api_response = api_instance.get_gamification_metricdefinitions()
pprint(api_response)
except ApiException as e:
print("Exception when calling GamificationApi->get_gamification_metricdefinitions: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/gamification/metricdefinitions/{metricDefinitionId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Metric definition 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.GamificationApi();
metric_definition_id = 'metric_definition_id_example' # str | metric definition id
try:
# Metric definition by id
api_response = api_instance.get_gamification_metricdefinition(metric_definition_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling GamificationApi->get_gamification_metricdefinition: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/gamification/profiles Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: All performance profiles
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.GamificationApi();
try:
# All performance profiles
api_response = api_instance.get_gamification_profiles()
pprint(api_response)
except ApiException as e:
print("Exception when calling GamificationApi->get_gamification_profiles: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/gamification/profiles Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Create a new custom performance profile
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.GamificationApi();
body = PureCloudPlatformClientV2.CreatePerformanceProfile() # CreatePerformanceProfile | performanceProfile
copy_metrics = True # bool | Flag to copy metrics. If set to false, there will be no metrics associated with the new profile. If set to true or is absent (the default behavior), all metrics from the default profile will be copied over into the new profile. (optional) (default to True)
try:
# Create a new custom performance profile
api_response = api_instance.post_gamification_profiles(body, copy_metrics=copy_metrics)
pprint(api_response)
except ApiException as e:
print("Exception when calling GamificationApi->post_gamification_profiles: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/gamification/profiles/users/me Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Performance profile of the requesting 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.GamificationApi();
workday = '2013-10-20' # date | Target querying workday. If not provided, then queries the current performance profile. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd (optional)
try:
# Performance profile of the requesting user
api_response = api_instance.get_gamification_profiles_users_me(workday=workday)
pprint(api_response)
except ApiException as e:
print("Exception when calling GamificationApi->get_gamification_profiles_users_me: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/gamification/profiles/users/me/query Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Query performance profiles in date range for the current user
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.GamificationApi();
body = PureCloudPlatformClientV2.UserProfilesInDateRangeRequest() # UserProfilesInDateRangeRequest | The date range of work day.
try:
# Query performance profiles in date range for the current user
api_response = api_instance.post_gamification_profiles_users_me_query(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling GamificationApi->post_gamification_profiles_users_me_query: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/gamification/profiles/users/{userId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Performance profile of 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.GamificationApi();
user_id = 'user_id_example' # str |
workday = '2013-10-20' # date | Target querying workday. If not provided, then queries the current performance profile. Dates are represented as an ISO-8601 string. For example: yyyy-MM-dd (optional)
try:
# Performance profile of a user
api_response = api_instance.get_gamification_profiles_user(user_id, workday=workday)
pprint(api_response)
except ApiException as e:
print("Exception when calling GamificationApi->get_gamification_profiles_user: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/gamification/profiles/users/{userId}/query Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Query performance profiles in date range 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.GamificationApi();
user_id = 'user_id_example' # str | The ID of a user.
body = PureCloudPlatformClientV2.UserProfilesInDateRangeRequest() # UserProfilesInDateRangeRequest | The date range of work day.
try:
# Query performance profiles in date range for a user
api_response = api_instance.post_gamification_profiles_user_query(user_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling GamificationApi->post_gamification_profiles_user_query: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/gamification/profiles/{profileId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Performance profile 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.GamificationApi();
profile_id = 'profile_id_example' # str | performanceProfileId
try:
# Performance profile by id
api_response = api_instance.get_gamification_profile(profile_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling GamificationApi->get_gamification_profile: %s\n" % e)```
|
Provide a Python example that uses the PUT /api/v2/gamification/profiles/{profileId} Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Updates a performance profile
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.GamificationApi();
profile_id = 'profile_id_example' # str | performanceProfileId
body = PureCloudPlatformClientV2.PerformanceProfile() # PerformanceProfile | performanceProfile (optional)
try:
# Updates a performance profile
api_response = api_instance.put_gamification_profile(profile_id, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling GamificationApi->put_gamification_profile: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/gamification/profiles/{profileId}/activate Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Activate a performance profile
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.GamificationApi();
profile_id = 'profile_id_example' # str | performanceProfileId
try:
# Activate a performance profile
api_response = api_instance.post_gamification_profile_activate(profile_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling GamificationApi->post_gamification_profile_activate: %s\n" % e)```
|
Provide a Python example that uses the POST /api/v2/gamification/profiles/{profileId}/deactivate Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Deactivate a performance profile
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.GamificationApi();
profile_id = 'profile_id_example' # str | performanceProfileId
try:
# Deactivate a performance profile
api_response = api_instance.post_gamification_profile_deactivate(profile_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling GamificationApi->post_gamification_profile_deactivate: %s\n" % e)```
|
Provide a Python example that uses the GET /api/v2/gamification/profiles/{profileId}/members Genesys Cloud Python SDK.
|
Genesys describes this as an API used to: Members of a given performance profile
|
```import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = 'your_access_token'
# or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.GamificationApi();
profile_id = 'profile_id_example' # str | Profile Id
try:
# Members of a given performance profile
api_response = api_instance.get_gamification_profile_members(profile_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling GamificationApi->get_gamification_profile_members: %s\n" % e)```
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.