Class ZCL_IBMC_ASSISTANT_V2

public inheriting from zcl_ibmc_service_ext create public

Documentation

Watson Assistant v2

The IBM Watson™ Assistant service combines machine learning, natural language understanding, and an integrated dialog editor to create conversation flows between your apps and your users.

The Assistant v2 API provides runtime methods your client application can use to send user input to an assistant and receive a response.

Types

Visibility and LevelNameDocumentation
publict_agent_availability_message (structured type) No documentation available.
publict_assistant_collection (structured type) No documentation available.
publict_assistant_data (structured type) No documentation available.
publict_assistant_skill (structured type) No documentation available.
publict_assistant_state (structured type)

Status information about the skills for the assistant.

Included in responses only if **status**=`Available`.
publict_audit_properties (structured type) No documentation available.
publict_base_environment (structured type) No documentation available.
publict_base_env_orchestration (structured type)

The search skill orchestration settings for the environment.

publict_base_env_release_reference (structured type)

An object describing the release that is currently deployed

in the environment.
publict_base_message_context_global (structured type)

Session context data that is shared by all skills used by

the assistant.
publict_base_message_context_skill (structured type) No documentation available.
publict_base_message_input (structured type)

An input object that includes the input text.

publict_base_message_input_options (structured type)

Optional properties that control how the assistant responds.

publict_base_skill (structured type) No documentation available.
publict_base_skill_reference (structured type) No documentation available.
publict_bulk_classify_input (structured type) No documentation available.
publict_bulk_classify_output (structured type) No documentation available.
publict_bulk_classify_response (structured type) No documentation available.
publict_bulk_classify_utterance (structured type)

The user input utterance to classify.

publict_capture_group (structured type) No documentation available.
publict_channel_transfer_info (structured type)

Information used by an integration to transfer the

conversation to a different channel.
publict_channel_transfer_target (structured type)

An object specifying target channels available for the

transfer. Each property of this object represents an available transfer target. Currently, the only supported property is **chat**, representing the web chat integration.
publict_channel_transfer_target_chat (structured type)

Information for transferring to the web chat integration.

publict_create_session (structured type) No documentation available.
publict_deploy_release_request (structured type)

A request to deploy a release to the specified environment.

publict_dialog_log_message (structured type)

Dialog log message details.

publict_dialog_node_action (structured type) No documentation available.
publict_dialog_node_visited (structured type)

An objects containing detailed diagnostic information about

a dialog node that was visited during processing of the input message.
publict_dialog_suggestion (structured type) No documentation available.
publict_dialog_suggestion_value (structured type)

An object defining the message input to be sent to the

assistant if the user selects the corresponding disambiguation option.

**Note:** This entire message input object must be included in the request body of the next message sent to the assistant. Do not modify or remove any of the included properties.
publict_dia_nd_otpt_cnnct_t_agnt_tr1 (structured type)

Routing or other contextual information to be used by target

service desk systems.
publict_dia_nd_output_opt_elem_value (structured type)

An object defining the message input to be sent to the

assistant if the user selects the corresponding option.
publict_dia_node_output_opt_element (structured type) No documentation available.
publict_empty_response type jsonobject No documentation available.
publict_environment (structured type) No documentation available.
publict_environment_collection (structured type) No documentation available.
publict_environment_reference (structured type) No documentation available.
publict_environment_skill (structured type) No documentation available.
publict_error_detail (structured type) No documentation available.
publict_error_response (structured type) No documentation available.
publict_integration_reference (structured type) No documentation available.
publict_log (structured type) No documentation available.
publict_log_collection (structured type) No documentation available.
publict_log_message_source type jsonobject

An object that identifies the dialog element that generated

the error message.
publict_log_message_source_action (structured type)

An object that identifies the dialog element that generated

the error message.
publict_log_message_source_dia_node (structured type)

An object that identifies the dialog element that generated

the error message.
publict_log_message_source_handler (structured type)

An object that identifies the dialog element that generated

the error message.
publict_log_message_source_step (structured type)

An object that identifies the dialog element that generated

the error message.
publict_log_pagination (structured type)

The pagination data for the returned objects. For more

information about using pagination, see [Pagination](#pagination).
publict_message_context (structured type) No documentation available.
publict_message_context_global (structured type)

Session context data that is shared by all skills used by

the assistant.
publict_message_context_skills (structured type)

Context data specific to particular skills used by the

assistant.
publict_message_context_skill_action (structured type)

Context variables that are used by the action skill.

publict_message_context_skill_dialog (structured type)

Context variables that are used by the dialog skill.

publict_message_context_skill_system (structured type)

System context data used by the skill.

publict_message_context_stateless (structured type) No documentation available.
publict_message_input (structured type)

An input object that includes the input text.

publict_message_input_attachment (structured type)

A reference to a media file to be sent as an attachment with

the message.
publict_message_input_options (structured type)

Optional properties that control how the assistant responds.

publict_message_input_opt_auto_learn (structured type)

Autolearning options for the message. For more information

about autolearning, see the [documentation](/docs/watson-assistant?topic=watson-assistant-autolearn).

**Note:** Autolearning is a beta feature.
publict_message_input_opt_spelling (structured type)

Spelling correction options for the message. Any options

specified on an individual message override the settings configured for the skill.
publict_message_input_opt_stateless (structured type)

Optional properties that control how the assistant responds.

publict_message_input_stateless (structured type)

An input object that includes the input text.

publict_message_output (structured type)

Assistant output to be rendered or processed by the client.

publict_message_output_debug (structured type)

Additional detailed information about a message response and

how it was generated.
publict_message_output_spelling (structured type)

Properties describing any spelling corrections in the user

input that was received.
publict_message_request (structured type)

A stateful message request formatted for the Watson

Assistant service.
publict_message_request_stateless (structured type)

A stateless message request formatted for the Watson

Assistant service.
publict_message_response (structured type)

A response from the Watson Assistant service.

publict_message_response_stateless (structured type)

A stateless response from the Watson Assistant service.

publict_mssg_cntxt_global_stateless (structured type)

Session context data that is shared by all skills used by

the assistant.
publict_mssg_context_global_system (structured type)

Built-in system properties that apply to all skills used by

the assistant.
publict_mssg_otpt_dbg_trn_evnt_trn_1 (structured type) No documentation available.
publict_mssg_otpt_dbg_trn_evnt_trn_2 (structured type) No documentation available.
publict_mssg_otpt_dbg_trn_evnt_trn_3 (structured type) No documentation available.
publict_mssg_otpt_dbg_trn_evnt_trn_4 (structured type) No documentation available.
publict_mssg_otpt_dbg_trn_evnt_trn_5 (structured type) No documentation available.
publict_mssg_otpt_dbg_trn_evnt_trn_6 (structured type) No documentation available.
publict_mssg_otpt_dbg_trn_evnt_trn_7 (structured type) No documentation available.
publict_mssg_otpt_dbg_trn_evnt_trn_8 (structured type) No documentation available.
publict_mssg_output_debug_turn_event type jsonobject No documentation available.
publict_pagination (structured type)

The pagination data for the returned objects. For more

information about using pagination, see [Pagination](#pagination).
publict_release (structured type) No documentation available.
publict_release_collection (structured type) No documentation available.
publict_release_content (structured type)

An object identifying the versionable content objects (such

as skill snapshots) that are included in the release.
publict_release_skill (structured type) No documentation available.
publict_request_analytics (structured type)

An optional object containing analytics data. Currently,

this data is used only for events sent to the Segment extension.
publict_response_generic_channel (structured type) No documentation available.
publict_rt_entity_interpretation (structured type) No documentation available.
publict_rt_entty_intrprttn_sys_date (structured type) No documentation available.
publict_rt_entty_intrprttn_sys_num (structured type) No documentation available.
publict_rt_entty_intrprttn_sys_time (structured type) No documentation available.
publict_rt_response_type_suggestion (structured type) No documentation available.
publict_rt_resp_gnrc_rt_resp_typ_ad (structured type) No documentation available.
publict_rt_resp_gnrc_rt_resp_typ_ch1 (structured type) No documentation available.
publict_rt_resp_gnrc_rt_resp_typ_cn1 (structured type) No documentation available.
publict_rt_resp_gnrc_rt_resp_typ_dt (structured type) No documentation available.
publict_rt_resp_gnrc_rt_resp_typ_if1 (structured type) No documentation available.
publict_rt_resp_gnrc_rt_resp_typ_img (structured type) No documentation available.
publict_rt_resp_gnrc_rt_resp_typ_opt (structured type) No documentation available.
publict_rt_resp_gnrc_rt_resp_typ_ps (structured type) No documentation available.
publict_rt_resp_gnrc_rt_resp_typ_sg1 (structured type) No documentation available.
publict_rt_resp_gnrc_rt_resp_typ_sr1 (structured type) No documentation available.
publict_rt_resp_gnrc_rt_resp_typ_txt (structured type) No documentation available.
publict_rt_resp_gnrc_rt_resp_typ_us1 (structured type) No documentation available.
publict_rt_resp_gnrc_rt_resp_typ_vd (structured type) No documentation available.
publict_rt_resp_type_channel_trans (structured type) No documentation available.
publict_rt_resp_type_user_defined (structured type) No documentation available.
publict_rt_resp_typ_connect_to_agent (structured type) No documentation available.
publict_runtime_entity (structured type)

The entity value that was recognized in the user input.

publict_runtime_entity_alternative (structured type)

An alternative value for the recognized entity.

publict_runtime_entity_role (structured type)

An object describing the role played by a system entity that

is specifies the beginning or end of a range recognized in the user input. This property is included only if the new system entities are enabled for the skill.
publict_runtime_intent (structured type)

An intent identified in the user input.

publict_runtime_response_generic type jsonobject No documentation available.
publict_runtime_response_type_audio (structured type) No documentation available.
publict_runtime_response_type_date (structured type) No documentation available.
publict_runtime_response_type_iframe (structured type) No documentation available.
publict_runtime_response_type_image (structured type) No documentation available.
publict_runtime_response_type_option (structured type) No documentation available.
publict_runtime_response_type_pause (structured type) No documentation available.
publict_runtime_response_type_search (structured type) No documentation available.
publict_runtime_response_type_text (structured type) No documentation available.
publict_runtime_response_type_video (structured type) No documentation available.
publict_search_result (structured type) No documentation available.
publict_search_result_answer (structured type)

An object specifing a segment of text that was identified as

a direct answer to the search query.
publict_search_result_highlight (structured type)

An object containing segments of text from search results

with query-matching text highlighted using HTML `<em>` tags.
publict_search_result_metadata (structured type)

An object containing search result metadata from the

Discovery service.
publict_search_settings (structured type)

An object describing the search skill configuration.

publict_search_settings_discovery (structured type)

Configuration settings for the Watson Discovery service

instance used by the search integration.
publict_search_settings_messages (structured type)

The messages included with responses from the search

integration.
publict_search_skill_warning (structured type)

A warning describing an error in the search skill

configuration.
publict_session_response (structured type) No documentation available.
publict_skill (structured type) No documentation available.
publict_skills_async_request_status (structured type) No documentation available.
publict_skills_export (structured type) No documentation available.
publict_skills_import (structured type) No documentation available.
publict_skill_import (structured type) No documentation available.
publict_srch_settings_schema_mapping (structured type)

The mapping between fields in the Watson Discovery

collection and properties in the search response.
publict_srch_sttngs_dscvry_athntctn (structured type)

Authentication information for the Watson Discovery service.

For more information, see the [Watson Discovery documentation](https://cloud.ibm.com/apidocs/discovery-data#authentication).

**Note:** You must specify either **basic** or **bearer**, but not both.
publict_status_error (structured type)

An object describing an error that occurred during

processing of an asynchronous operation.
publict_turn_event_action_finished (structured type) No documentation available.
publict_turn_event_action_source (structured type) No documentation available.
publict_turn_event_action_visited (structured type) No documentation available.
publict_turn_event_callout (structured type) No documentation available.
publict_turn_event_callout_callout (structured type) No documentation available.
publict_turn_event_callout_error (structured type) No documentation available.
publict_turn_event_handler_visited (structured type) No documentation available.
publict_turn_event_node_source (structured type) No documentation available.
publict_turn_event_node_visited (structured type) No documentation available.
publict_turn_event_search (structured type) No documentation available.
publict_turn_event_search_error (structured type) No documentation available.
publict_turn_event_step_answered (structured type) No documentation available.
publict_turn_event_step_visited (structured type) No documentation available.
publict_update_environment (structured type) No documentation available.
publict_update_skill (structured type) No documentation available.

Constants

Visibility and LevelNameDocumentation
public staticc_abapname_dictionary (structured type)

Map ABAP identifiers to service identifiers.

public staticc_required_fields (structured type)

List of required fields per type.

Methods

Visibility and LevelNameDocumentation
public instance
bulk_classify
importingi_skill_idtype string
i_requesttype t_bulk_classify_input
i_contenttypetype string default 'application/json'
i_accepttype string default 'application/json'
exportinge_responsetype t_bulk_classify_response
raisingzcx_ibmc_service_exception

Identify intents and entities in multiple user utterances

Send multiple user inputs to a dialog skill in a single request and receive information about the intents and entities recognized in each input. This method is useful for testing and comparing the performance of different skills or skill versions.

This method is available only with Enterprise with Data Isolation plans.
Parameters
i_skill_id Unique identifier of the skill. To find the skill ID in the Watson Assistant user interface, open the skill settings and click **API Details**.
i_request An input object that includes the text to classify.
e_response Service return value of type T_BULK_CLASSIFY_RESPONSE
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
create_assistant
importingi_requesttype t_assistant_data optional
i_contenttypetype string default 'application/json'
i_accepttype string default 'application/json'
exportinge_responsetype t_assistant_data
raisingzcx_ibmc_service_exception

Create an assistant

Create a new assistant.

This method is available only with Enterprise plans.
Parameters
i_request The properties of the new assistant.
e_response Service return value of type T_ASSISTANT_DATA
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
create_release
importingi_assistant_idtype string
i_releasetype t_release optional
i_contenttypetype string default 'application/json'
i_accepttype string default 'application/json'
exportinge_responsetype t_release
raisingzcx_ibmc_service_exception

Create release

Create a new release using the current content of the dialog and action skills in the draft environment. (In the Watson Assistant user interface, a release is called a *version*.)

This method is available only with Enterprise plans.
Parameters
i_assistant_id The assistant ID or the environment ID of the environment where the assistant is deployed, depending on the type of request:
- For message, session, and log requests, specify the environment ID of the environment where the assistant is deployed.
- For all other requests, specify the assistant ID of the assistant.

To find the environment ID or assistant ID in the Watson Assistant user interface, open the assistant settings and scroll to the **Environments** section.

**Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the assistant ID in the user interface, open the assistant settings and click API Details.
i_release An object describing the release.
e_response Service return value of type T_RELEASE
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
create_session
importingi_assistant_idtype string
i_createsessiontype t_create_session optional
i_contenttypetype string default 'application/json'
i_accepttype string default 'application/json'
exportinge_responsetype t_session_response
raisingzcx_ibmc_service_exception

Create a session

Create a new session. A session is used to send user input to a skill and receive responses. It also maintains the state of the conversation. A session persists until it is deleted, or until it times out because of inactivity. (For more information, see the [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant- settings).
Parameters
i_assistant_id The assistant ID or the environment ID of the environment where the assistant is deployed, depending on the type of request:
- For message, session, and log requests, specify the environment ID of the environment where the assistant is deployed.
- For all other requests, specify the assistant ID of the assistant.

To find the environment ID or assistant ID in the Watson Assistant user interface, open the assistant settings and scroll to the **Environments** section.

**Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the assistant ID in the user interface, open the assistant settings and click API Details.
i_createsession No documentation available.
e_response Service return value of type T_SESSION_RESPONSE
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
delete_assistant
importingi_assistant_idtype string
i_accepttype string default 'application/json'
raisingzcx_ibmc_service_exception

Delete assistant

Delete an assistant.

This method is available only with Enterprise plans.
Parameters
i_assistant_id The assistant ID or the environment ID of the environment where the assistant is deployed, depending on the type of request:
- For message, session, and log requests, specify the environment ID of the environment where the assistant is deployed.
- For all other requests, specify the assistant ID of the assistant.

To find the environment ID or assistant ID in the Watson Assistant user interface, open the assistant settings and scroll to the **Environments** section.

**Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the assistant ID in the user interface, open the assistant settings and click API Details.
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
delete_release
importingi_assistant_idtype string
i_releasetype string
i_accepttype string default 'application/json'
raisingzcx_ibmc_service_exception

Delete release

Delete a release. (In the Watson Assistant user interface, a release is called a *version*.)

This method is available only with Enterprise plans.
Parameters
i_assistant_id The assistant ID or the environment ID of the environment where the assistant is deployed, depending on the type of request:
- For message, session, and log requests, specify the environment ID of the environment where the assistant is deployed.
- For all other requests, specify the assistant ID of the assistant.

To find the environment ID or assistant ID in the Watson Assistant user interface, open the assistant settings and scroll to the **Environments** section.

**Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the assistant ID in the user interface, open the assistant settings and click API Details.
i_release Unique identifier of the release.
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
delete_session
importingi_assistant_idtype string
i_session_idtype string
i_accepttype string default 'application/json'
raisingzcx_ibmc_service_exception

Delete session

Deletes a session explicitly before it times out. (For more information about the session inactivity timeout, see the [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-assistant- settings)).
Parameters
i_assistant_id The assistant ID or the environment ID of the environment where the assistant is deployed, depending on the type of request:
- For message, session, and log requests, specify the environment ID of the environment where the assistant is deployed.
- For all other requests, specify the assistant ID of the assistant.

To find the environment ID or assistant ID in the Watson Assistant user interface, open the assistant settings and scroll to the **Environments** section.

**Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the assistant ID in the user interface, open the assistant settings and click API Details.
i_session_id Unique identifier of the session.
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
delete_user_data
importingi_customer_idtype string
i_accepttype string default 'application/json'
raisingzcx_ibmc_service_exception

Delete labeled data

Deletes all data associated with a specified customer ID. The method has no effect if no data is associated with the customer ID.

You associate a customer ID with data by passing the `X-Watson-Metadata` header with a request that passes data. For more information about personal data and customer IDs, see [Information security](https://cloud.ibm.com/docs/assistant?topic=assistant-information-secu rity#information-security).

**Note:** This operation is intended only for deleting data associated with a single specific customer, not for deleting data associated with multiple customers or for any other purpose. For more information, see [Labeling and deleting data in Watson Assistant](https://cloud.ibm.com/docs/assistant?topic=assistant-information-sec urity#information-security-gdpr-wa).
Parameters
i_customer_id The customer ID for which all data is to be deleted.
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
deploy_release
importingi_assistant_idtype string
i_releasetype string
i_requesttype t_deploy_release_request
i_include_audittype boolean default c_boolean_false
i_contenttypetype string default 'application/json'
i_accepttype string default 'application/json'
exportinge_responsetype t_environment
raisingzcx_ibmc_service_exception

Deploy release

Update the environment with the content of the release. All snapshots saved as part of the release become active in the environment.

This method is available only with Enterprise plans.
Parameters
i_assistant_id The assistant ID or the environment ID of the environment where the assistant is deployed, depending on the type of request:
- For message, session, and log requests, specify the environment ID of the environment where the assistant is deployed.
- For all other requests, specify the assistant ID of the assistant.

To find the environment ID or assistant ID in the Watson Assistant user interface, open the assistant settings and scroll to the **Environments** section.

**Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the assistant ID in the user interface, open the assistant settings and click API Details.
i_release Unique identifier of the release.
i_request An input object that identifies the environment where the release is to be deployed.
i_include_audit Whether to include the audit properties (`created` and `updated` timestamps) in the response.
e_response Service return value of type T_ENVIRONMENT
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
export_skills
importingi_assistant_idtype string
i_include_audittype boolean default c_boolean_false
i_accepttype string default 'application/json'
exportinge_responsetype t_skills_export
raisingzcx_ibmc_service_exception

Export skills

Asynchronously export the action skill and dialog skill (if enabled) for the assistant. Use this method to save all skill data so that you can import it to a different assistant using the **Import skills** method.

A successful call to this method only initiates an asynchronous export. The exported JSON data is not available until processing completes.

After the initial request is submitted, you can poll the status of the operation by calling the same request again and checking the value of the **status** property. If an error occurs (indicated by a **status** value of `Failed`), the `status_description` property provides more information about the error, and the `status_errors` property contains an array of error messages that caused the failure.

When processing has completed, the request returns the exported JSON data. Remember that the usual rate limits apply.

This method is available only with Enterprise plans.
Parameters
i_assistant_id The assistant ID or the environment ID of the environment where the assistant is deployed, depending on the type of request:
- For message, session, and log requests, specify the environment ID of the environment where the assistant is deployed.
- For all other requests, specify the assistant ID of the assistant.

To find the environment ID or assistant ID in the Watson Assistant user interface, open the assistant settings and scroll to the **Environments** section.

**Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the assistant ID in the user interface, open the assistant settings and click API Details.
i_include_audit Whether to include the audit properties (`created` and `updated` timestamps) in the response.
e_response Service return value of type T_SKILLS_EXPORT
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instanceget_appname redefinition 
public instance
get_environment
importingi_assistant_idtype string
i_environment_idtype string
i_include_audittype boolean default c_boolean_false
i_accepttype string default 'application/json'
exportinge_responsetype t_environment
raisingzcx_ibmc_service_exception

Get environment

Get information about an environment. For more information about environments, see [Environments](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assista nt-publish-overview#environments).

This method is available only with Enterprise plans.
Parameters
i_assistant_id The assistant ID or the environment ID of the environment where the assistant is deployed, depending on the type of request:
- For message, session, and log requests, specify the environment ID of the environment where the assistant is deployed.
- For all other requests, specify the assistant ID of the assistant.

To find the environment ID or assistant ID in the Watson Assistant user interface, open the assistant settings and scroll to the **Environments** section.

**Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the assistant ID in the user interface, open the assistant settings and click API Details.
i_environment_id Unique identifier of the environment. To find the environment ID in the Watson Assistant user interface, open the environment settings and click **API Details**. **Note:** Currently, the API does not support creating environments.
i_include_audit Whether to include the audit properties (`created` and `updated` timestamps) in the response.
e_response Service return value of type T_ENVIRONMENT
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
get_release
importingi_assistant_idtype string
i_releasetype string
i_include_audittype boolean default c_boolean_false
i_accepttype string default 'application/json'
exportinge_responsetype t_release
raisingzcx_ibmc_service_exception

Get release

Get information about a release.

Release data is not available until publishing of the release completes. If publishing is still in progress, you can continue to poll by calling the same request again and checking the value of the **status** property. When processing has completed, the request returns the release data.

This method is available only with Enterprise plans.
Parameters
i_assistant_id The assistant ID or the environment ID of the environment where the assistant is deployed, depending on the type of request:
- For message, session, and log requests, specify the environment ID of the environment where the assistant is deployed.
- For all other requests, specify the assistant ID of the assistant.

To find the environment ID or assistant ID in the Watson Assistant user interface, open the assistant settings and scroll to the **Environments** section.

**Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the assistant ID in the user interface, open the assistant settings and click API Details.
i_release Unique identifier of the release.
i_include_audit Whether to include the audit properties (`created` and `updated` timestamps) in the response.
e_response Service return value of type T_RELEASE
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instanceget_request_prop redefinition 
public instanceget_sdk_version_date redefinition 
public instance
get_skill
importingi_assistant_idtype string
i_skill_idtype string
i_accepttype string default 'application/json'
exportinge_responsetype t_skill
raisingzcx_ibmc_service_exception

Get skill

Get information about a skill.

This method is available only with Enterprise plans.
Parameters
i_assistant_id The assistant ID or the environment ID of the environment where the assistant is deployed, depending on the type of request:
- For message, session, and log requests, specify the environment ID of the environment where the assistant is deployed.
- For all other requests, specify the assistant ID of the assistant.

To find the environment ID or assistant ID in the Watson Assistant user interface, open the assistant settings and scroll to the **Environments** section.

**Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the assistant ID in the user interface, open the assistant settings and click API Details.
i_skill_id Unique identifier of the skill. To find the skill ID in the Watson Assistant user interface, open the skill settings and click **API Details**.
e_response Service return value of type T_SKILL
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
import_skills
importingi_assistant_idtype string
i_skillsimporttype t_skills_import
i_include_audittype boolean default c_boolean_false
i_contenttypetype string default 'application/json'
i_accepttype string default 'application/json'
exportinge_responsetype t_skills_async_request_status
raisingzcx_ibmc_service_exception

Import skills

Asynchronously import skills into an existing assistant from a previously exported file.

The request body for this method should contain the response data that was received from a previous call to the **Export skills** method, without modification.

A successful call to this method initiates an asynchronous import. The updated skills belonging to the assistant are not available until processing completes. To check the status of the asynchronous import operation, use the **Get status of skills import** method.

This method is available only with Enterprise plans.
Parameters
i_assistant_id The assistant ID or the environment ID of the environment where the assistant is deployed, depending on the type of request:
- For message, session, and log requests, specify the environment ID of the environment where the assistant is deployed.
- For all other requests, specify the assistant ID of the assistant.

To find the environment ID or assistant ID in the Watson Assistant user interface, open the assistant settings and scroll to the **Environments** section.

**Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the assistant ID in the user interface, open the assistant settings and click API Details.
i_skillsimport An input object that contains the skills to import.
i_include_audit Whether to include the audit properties (`created` and `updated` timestamps) in the response.
e_response Service return value of type T_SKILLS_ASYNC_REQUEST_STATUS
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
import_skills_status
importingi_assistant_idtype string
i_accepttype string default 'application/json'
exportinge_responsetype t_skills_async_request_status
raisingzcx_ibmc_service_exception

Get status of skills import

Retrieve the status of an asynchronous import operation previously initiated by using the **Import skills** method.

This method is available only with Enterprise plans.
Parameters
i_assistant_id The assistant ID or the environment ID of the environment where the assistant is deployed, depending on the type of request:
- For message, session, and log requests, specify the environment ID of the environment where the assistant is deployed.
- For all other requests, specify the assistant ID of the assistant.

To find the environment ID or assistant ID in the Watson Assistant user interface, open the assistant settings and scroll to the **Environments** section.

**Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the assistant ID in the user interface, open the assistant settings and click API Details.
e_response Service return value of type T_SKILLS_ASYNC_REQUEST_STATUS
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
list_assistants
importingi_page_limittype integer default 100
i_include_counttype boolean default c_boolean_false
i_sorttype string optional
i_cursortype string optional
i_include_audittype boolean default c_boolean_false
i_accepttype string default 'application/json'
exportinge_responsetype t_assistant_collection
raisingzcx_ibmc_service_exception

List assistants

List the assistants associated with a Watson Assistant service instance.

This method is available only with Enterprise plans.
Parameters
i_page_limit The number of records to return in each page of results.
i_include_count Whether to include information about the number of records that satisfy the request, regardless of the page limit. If this parameter is `true`, the `pagination` object in the response includes the `total` property.
i_sort The attribute by which returned assistants will be sorted. To reverse the sort order, prefix the value with a minus sign (`-`).
i_cursor A token identifying the page of results to retrieve.
i_include_audit Whether to include the audit properties (`created` and `updated` timestamps) in the response.
e_response Service return value of type T_ASSISTANT_COLLECTION
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
list_environments
importingi_assistant_idtype string
i_page_limittype integer default 100
i_include_counttype boolean default c_boolean_false
i_sorttype string optional
i_cursortype string optional
i_include_audittype boolean default c_boolean_false
i_accepttype string default 'application/json'
exportinge_responsetype t_environment_collection
raisingzcx_ibmc_service_exception

List environments

List the environments associated with an assistant.

This method is available only with Enterprise plans.
Parameters
i_assistant_id The assistant ID or the environment ID of the environment where the assistant is deployed, depending on the type of request:
- For message, session, and log requests, specify the environment ID of the environment where the assistant is deployed.
- For all other requests, specify the assistant ID of the assistant.

To find the environment ID or assistant ID in the Watson Assistant user interface, open the assistant settings and scroll to the **Environments** section.

**Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the assistant ID in the user interface, open the assistant settings and click API Details.
i_page_limit The number of records to return in each page of results.
i_include_count Whether to include information about the number of records that satisfy the request, regardless of the page limit. If this parameter is `true`, the `pagination` object in the response includes the `total` property.
i_sort The attribute by which returned environments will be sorted. To reverse the sort order, prefix the value with a minus sign (`-`).
i_cursor A token identifying the page of results to retrieve.
i_include_audit Whether to include the audit properties (`created` and `updated` timestamps) in the response.
e_response Service return value of type T_ENVIRONMENT_COLLECTION
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
list_logs
importingi_assistant_idtype string
i_sorttype string optional
i_filtertype string optional
i_page_limittype integer default 100
i_cursortype string optional
i_accepttype string default 'application/json'
exportinge_responsetype t_log_collection
raisingzcx_ibmc_service_exception

List log events for an assistant

List the events from the log of an assistant.

This method requires Manager access, and is available only with Plus and Enterprise plans.

**Note:** If you use the **cursor** parameter to retrieve results one page at a time, subsequent requests must be no more than 5 minutes apart. Any returned value for the **cursor** parameter becomes invalid after 5 minutes. For more information about using pagination, see [Pagination](#pagination).
Parameters
i_assistant_id The assistant ID or the environment ID of the environment where the assistant is deployed, depending on the type of request:
- For message, session, and log requests, specify the environment ID of the environment where the assistant is deployed.
- For all other requests, specify the assistant ID of the assistant.

To find the environment ID or assistant ID in the Watson Assistant user interface, open the assistant settings and scroll to the **Environments** section.

**Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the assistant ID in the user interface, open the assistant settings and click API Details.
i_sort How to sort the returned log events. You can sort by **request_timestamp**. To reverse the sort order, prefix the parameter value with a minus sign (`-`).
i_filter A cacheable parameter that limits the results to those matching the specified filter. For more information, see the [documentation](https://cloud.ibm.com/docs/assistant?topic=assistant-filter-ref erence#filter-reference).
i_page_limit The number of records to return in each page of results.
i_cursor A token identifying the page of results to retrieve.
e_response Service return value of type T_LOG_COLLECTION
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
list_releases
importingi_assistant_idtype string
i_page_limittype integer default 100
i_include_counttype boolean default c_boolean_false
i_sorttype string optional
i_cursortype string optional
i_include_audittype boolean default c_boolean_false
i_accepttype string default 'application/json'
exportinge_responsetype t_release_collection
raisingzcx_ibmc_service_exception

List releases

List the releases associated with an assistant. (In the Watson Assistant user interface, a release is called a *version*.)

This method is available only with Enterprise plans.
Parameters
i_assistant_id The assistant ID or the environment ID of the environment where the assistant is deployed, depending on the type of request:
- For message, session, and log requests, specify the environment ID of the environment where the assistant is deployed.
- For all other requests, specify the assistant ID of the assistant.

To find the environment ID or assistant ID in the Watson Assistant user interface, open the assistant settings and scroll to the **Environments** section.

**Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the assistant ID in the user interface, open the assistant settings and click API Details.
i_page_limit The number of records to return in each page of results.
i_include_count Whether to include information about the number of records that satisfy the request, regardless of the page limit. If this parameter is `true`, the `pagination` object in the response includes the `total` property.
i_sort The attribute by which returned workspaces will be sorted. To reverse the sort order, prefix the value with a minus sign (`-`).
i_cursor A token identifying the page of results to retrieve.
i_include_audit Whether to include the audit properties (`created` and `updated` timestamps) in the response.
e_response Service return value of type T_RELEASE_COLLECTION
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
message
importingi_assistant_idtype string
i_session_idtype string
i_requesttype t_message_request optional
i_contenttypetype string default 'application/json'
i_accepttype string default 'application/json'
exportinge_responsetype t_message_response
raisingzcx_ibmc_service_exception

Send user input to assistant (stateful)

Send user input to an assistant and receive a response, with conversation state (including context data) stored by Watson Assistant for the duration of the session.
Parameters
i_assistant_id The assistant ID or the environment ID of the environment where the assistant is deployed, depending on the type of request:
- For message, session, and log requests, specify the environment ID of the environment where the assistant is deployed.
- For all other requests, specify the assistant ID of the assistant.

To find the environment ID or assistant ID in the Watson Assistant user interface, open the assistant settings and scroll to the **Environments** section.

**Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the assistant ID in the user interface, open the assistant settings and click API Details.
i_session_id Unique identifier of the session.
i_request The message to be sent. This includes the user's input, along with optional content such as intents and entities.
e_response Service return value of type T_MESSAGE_RESPONSE
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
message_stateless
importingi_assistant_idtype string
i_requesttype t_message_request_stateless optional
i_contenttypetype string default 'application/json'
i_accepttype string default 'application/json'
exportinge_responsetype t_message_response_stateless
raisingzcx_ibmc_service_exception

Send user input to assistant (stateless)

Send user input to an assistant and receive a response, with conversation state (including context data) managed by your application.
Parameters
i_assistant_id The assistant ID or the environment ID of the environment where the assistant is deployed, depending on the type of request:
- For message, session, and log requests, specify the environment ID of the environment where the assistant is deployed.
- For all other requests, specify the assistant ID of the assistant.

To find the environment ID or assistant ID in the Watson Assistant user interface, open the assistant settings and scroll to the **Environments** section.

**Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the assistant ID in the user interface, open the assistant settings and click API Details.
i_request The message to be sent. This includes the user's input, context data, and optional content such as intents and entities.
e_response Service return value of type T_MESSAGE_RESPONSE_STATELESS
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
update_environment
importingi_assistant_idtype string
i_environment_idtype string
i_updateenvironmenttype t_update_environment optional
i_contenttypetype string default 'application/json'
i_accepttype string default 'application/json'
exportinge_responsetype t_environment
raisingzcx_ibmc_service_exception

Update environment

Update an environment with new or modified data. For more information about environments, see [Environments](https://cloud.ibm.com/docs/watson-assistant?topic=watson-assista nt-publish-overview#environments).

This method is available only with Enterprise plans.
Parameters
i_assistant_id The assistant ID or the environment ID of the environment where the assistant is deployed, depending on the type of request:
- For message, session, and log requests, specify the environment ID of the environment where the assistant is deployed.
- For all other requests, specify the assistant ID of the assistant.

To find the environment ID or assistant ID in the Watson Assistant user interface, open the assistant settings and scroll to the **Environments** section.

**Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the assistant ID in the user interface, open the assistant settings and click API Details.
i_environment_id Unique identifier of the environment. To find the environment ID in the Watson Assistant user interface, open the environment settings and click **API Details**. **Note:** Currently, the API does not support creating environments.
i_updateenvironment The updated properties of the environment.
e_response Service return value of type T_ENVIRONMENT
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.
public instance
update_skill
importingi_assistant_idtype string
i_skill_idtype string
i_updateskilltype t_update_skill
i_contenttypetype string default 'application/json'
i_accepttype string default 'application/json'
exportinge_responsetype t_skill
raisingzcx_ibmc_service_exception

Update skill

Update a skill with new or modified data.

**Note:** The update is performed asynchronously; you can see the status of the update by calling the **Get skill** method and checking the value of the **status** property.

This method is available only with Enterprise plans.
Parameters
i_assistant_id The assistant ID or the environment ID of the environment where the assistant is deployed, depending on the type of request:
- For message, session, and log requests, specify the environment ID of the environment where the assistant is deployed.
- For all other requests, specify the assistant ID of the assistant.

To find the environment ID or assistant ID in the Watson Assistant user interface, open the assistant settings and scroll to the **Environments** section.

**Note:** If you are using the classic Watson Assistant experience, always use the assistant ID. To find the assistant ID in the user interface, open the assistant settings and click API Details.
i_skill_id Unique identifier of the skill. To find the skill ID in the Watson Assistant user interface, open the skill settings and click **API Details**.
i_updateskill The updated properties of the skill.
e_response Service return value of type T_SKILL
Class-based Exceptions
zcx_ibmc_service_exception Exception being raised in case of an error.