Class Discovery

java.lang.Object
com.ibm.cloud.sdk.core.service.BaseService
com.ibm.watson.discovery.v1.Discovery

public class Discovery
extends com.ibm.cloud.sdk.core.service.BaseService
IBM Watson™ Discovery is a cognitive search and content analytics engine that you can add to applications to identify patterns, trends and actionable insights to drive better decision-making. Securely unify structured and unstructured data with pre-enriched content, and use a simplified query language to eliminate the need for manual filtering of results.

API Version: 1.0 See: https://cloud.ibm.com/docs/discovery

  • Field Details

  • Constructor Details

    • Discovery

      public Discovery​(String version)
      Constructs an instance of the `Discovery` client. The default service name is used to configure the client instance.
      Parameters:
      version - Release date of the version of the API you want to use. Specify dates in YYYY-MM-DD format. The current version is `2019-04-30`.
    • Discovery

      public Discovery​(String version, com.ibm.cloud.sdk.core.security.Authenticator authenticator)
      Constructs an instance of the `Discovery` client. The default service name and specified authenticator are used to configure the client instance.
      Parameters:
      version - Release date of the version of the API you want to use. Specify dates in YYYY-MM-DD format. The current version is `2019-04-30`.
      authenticator - the Authenticator instance to be configured for this client
    • Discovery

      public Discovery​(String version, String serviceName)
      Constructs an instance of the `Discovery` client. The specified service name is used to configure the client instance.
      Parameters:
      version - Release date of the version of the API you want to use. Specify dates in YYYY-MM-DD format. The current version is `2019-04-30`.
      serviceName - the service name to be used when configuring the client instance
    • Discovery

      public Discovery​(String version, String serviceName, com.ibm.cloud.sdk.core.security.Authenticator authenticator)
      Constructs an instance of the `Discovery` client. The specified service name and authenticator are used to configure the client instance.
      Parameters:
      version - Release date of the version of the API you want to use. Specify dates in YYYY-MM-DD format. The current version is `2019-04-30`.
      serviceName - the service name to be used when configuring the client instance
      authenticator - the Authenticator instance to be configured for this client
  • Method Details

    • getVersion

      public String getVersion()
      Gets the version.

      Release date of the version of the API you want to use. Specify dates in YYYY-MM-DD format. The current version is `2019-04-30`.

      Returns:
      the version
    • setVersion

      public void setVersion​(String version)
      Sets the version.
      Parameters:
      version - the new version
    • createEnvironment

      public com.ibm.cloud.sdk.core.http.ServiceCall<Environment> createEnvironment​(CreateEnvironmentOptions createEnvironmentOptions)
      Create an environment.

      Creates a new environment for private data. An environment must be created before collections can be created.

      **Note**: You can create only one environment for private data per service instance. An attempt to create another environment results in an error.

      Parameters:
      createEnvironmentOptions - the CreateEnvironmentOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type Environment
    • listEnvironments

      public com.ibm.cloud.sdk.core.http.ServiceCall<ListEnvironmentsResponse> listEnvironments​(ListEnvironmentsOptions listEnvironmentsOptions)
      List environments.

      List existing environments for the service instance.

      Parameters:
      listEnvironmentsOptions - the ListEnvironmentsOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type ListEnvironmentsResponse
    • listEnvironments

      public com.ibm.cloud.sdk.core.http.ServiceCall<ListEnvironmentsResponse> listEnvironments()
      List environments.

      List existing environments for the service instance.

      Returns:
      a ServiceCall with a result of type ListEnvironmentsResponse
    • getEnvironment

      public com.ibm.cloud.sdk.core.http.ServiceCall<Environment> getEnvironment​(GetEnvironmentOptions getEnvironmentOptions)
      Get environment info.
      Parameters:
      getEnvironmentOptions - the GetEnvironmentOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type Environment
    • updateEnvironment

      public com.ibm.cloud.sdk.core.http.ServiceCall<Environment> updateEnvironment​(UpdateEnvironmentOptions updateEnvironmentOptions)
      Update an environment.

      Updates an environment. The environment's **name** and **description** parameters can be changed. You must specify a **name** for the environment.

      Parameters:
      updateEnvironmentOptions - the UpdateEnvironmentOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type Environment
    • deleteEnvironment

      public com.ibm.cloud.sdk.core.http.ServiceCall<DeleteEnvironmentResponse> deleteEnvironment​(DeleteEnvironmentOptions deleteEnvironmentOptions)
      Delete environment.
      Parameters:
      deleteEnvironmentOptions - the DeleteEnvironmentOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type DeleteEnvironmentResponse
    • listFields

      public com.ibm.cloud.sdk.core.http.ServiceCall<ListCollectionFieldsResponse> listFields​(ListFieldsOptions listFieldsOptions)
      List fields across collections.

      Gets a list of the unique fields (and their types) stored in the indexes of the specified collections.

      Parameters:
      listFieldsOptions - the ListFieldsOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type ListCollectionFieldsResponse
    • createConfiguration

      public com.ibm.cloud.sdk.core.http.ServiceCall<Configuration> createConfiguration​(CreateConfigurationOptions createConfigurationOptions)
      Add configuration.

      Creates a new configuration.

      If the input configuration contains the **configuration_id**, **created**, or **updated** properties, then they are ignored and overridden by the system, and an error is not returned so that the overridden fields do not need to be removed when copying a configuration.

      The configuration can contain unrecognized JSON fields. Any such fields are ignored and do not generate an error. This makes it easier to use newer configuration files with older versions of the API and the service. It also makes it possible for the tooling to add additional metadata and information to the configuration.

      Parameters:
      createConfigurationOptions - the CreateConfigurationOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type Configuration
    • listConfigurations

      public com.ibm.cloud.sdk.core.http.ServiceCall<ListConfigurationsResponse> listConfigurations​(ListConfigurationsOptions listConfigurationsOptions)
      List configurations.

      Lists existing configurations for the service instance.

      Parameters:
      listConfigurationsOptions - the ListConfigurationsOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type ListConfigurationsResponse
    • getConfiguration

      public com.ibm.cloud.sdk.core.http.ServiceCall<Configuration> getConfiguration​(GetConfigurationOptions getConfigurationOptions)
      Get configuration details.
      Parameters:
      getConfigurationOptions - the GetConfigurationOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type Configuration
    • updateConfiguration

      public com.ibm.cloud.sdk.core.http.ServiceCall<Configuration> updateConfiguration​(UpdateConfigurationOptions updateConfigurationOptions)
      Update a configuration.

      Replaces an existing configuration. * Completely replaces the original configuration. * The **configuration_id**, **updated**, and **created** fields are accepted in the request, but they are ignored, and an error is not generated. It is also acceptable for users to submit an updated configuration with none of the three properties. * Documents are processed with a snapshot of the configuration as it was at the time the document was submitted to be ingested. This means that already submitted documents will not see any updates made to the configuration.

      Parameters:
      updateConfigurationOptions - the UpdateConfigurationOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type Configuration
    • deleteConfiguration

      public com.ibm.cloud.sdk.core.http.ServiceCall<DeleteConfigurationResponse> deleteConfiguration​(DeleteConfigurationOptions deleteConfigurationOptions)
      Delete a configuration.

      The deletion is performed unconditionally. A configuration deletion request succeeds even if the configuration is referenced by a collection or document ingestion. However, documents that have already been submitted for processing continue to use the deleted configuration. Documents are always processed with a snapshot of the configuration as it existed at the time the document was submitted.

      Parameters:
      deleteConfigurationOptions - the DeleteConfigurationOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type DeleteConfigurationResponse
    • createCollection

      public com.ibm.cloud.sdk.core.http.ServiceCall<Collection> createCollection​(CreateCollectionOptions createCollectionOptions)
      Create a collection.
      Parameters:
      createCollectionOptions - the CreateCollectionOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type Collection
    • listCollections

      public com.ibm.cloud.sdk.core.http.ServiceCall<ListCollectionsResponse> listCollections​(ListCollectionsOptions listCollectionsOptions)
      List collections.

      Lists existing collections for the service instance.

      Parameters:
      listCollectionsOptions - the ListCollectionsOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type ListCollectionsResponse
    • getCollection

      public com.ibm.cloud.sdk.core.http.ServiceCall<Collection> getCollection​(GetCollectionOptions getCollectionOptions)
      Get collection details.
      Parameters:
      getCollectionOptions - the GetCollectionOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type Collection
    • updateCollection

      public com.ibm.cloud.sdk.core.http.ServiceCall<Collection> updateCollection​(UpdateCollectionOptions updateCollectionOptions)
      Update a collection.
      Parameters:
      updateCollectionOptions - the UpdateCollectionOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type Collection
    • deleteCollection

      public com.ibm.cloud.sdk.core.http.ServiceCall<DeleteCollectionResponse> deleteCollection​(DeleteCollectionOptions deleteCollectionOptions)
      Delete a collection.
      Parameters:
      deleteCollectionOptions - the DeleteCollectionOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type DeleteCollectionResponse
    • listCollectionFields

      public com.ibm.cloud.sdk.core.http.ServiceCall<ListCollectionFieldsResponse> listCollectionFields​(ListCollectionFieldsOptions listCollectionFieldsOptions)
      List collection fields.

      Gets a list of the unique fields (and their types) stored in the index.

      Parameters:
      listCollectionFieldsOptions - the ListCollectionFieldsOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type ListCollectionFieldsResponse
    • listExpansions

      public com.ibm.cloud.sdk.core.http.ServiceCall<Expansions> listExpansions​(ListExpansionsOptions listExpansionsOptions)
      Get the expansion list.

      Returns the current expansion list for the specified collection. If an expansion list is not specified, an object with empty expansion arrays is returned.

      Parameters:
      listExpansionsOptions - the ListExpansionsOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type Expansions
    • createExpansions

      public com.ibm.cloud.sdk.core.http.ServiceCall<Expansions> createExpansions​(CreateExpansionsOptions createExpansionsOptions)
      Create or update expansion list.

      Create or replace the Expansion list for this collection. The maximum number of expanded terms per collection is `500`. The current expansion list is replaced with the uploaded content.

      Parameters:
      createExpansionsOptions - the CreateExpansionsOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type Expansions
    • deleteExpansions

      public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteExpansions​(DeleteExpansionsOptions deleteExpansionsOptions)
      Delete the expansion list.

      Remove the expansion information for this collection. The expansion list must be deleted to disable query expansion for a collection.

      Parameters:
      deleteExpansionsOptions - the DeleteExpansionsOptions containing the options for the call
      Returns:
      a ServiceCall with a void result
    • getTokenizationDictionaryStatus

      public com.ibm.cloud.sdk.core.http.ServiceCall<TokenDictStatusResponse> getTokenizationDictionaryStatus​(GetTokenizationDictionaryStatusOptions getTokenizationDictionaryStatusOptions)
      Get tokenization dictionary status.

      Returns the current status of the tokenization dictionary for the specified collection.

      Parameters:
      getTokenizationDictionaryStatusOptions - the GetTokenizationDictionaryStatusOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type TokenDictStatusResponse
    • createTokenizationDictionary

      public com.ibm.cloud.sdk.core.http.ServiceCall<TokenDictStatusResponse> createTokenizationDictionary​(CreateTokenizationDictionaryOptions createTokenizationDictionaryOptions)
      Create tokenization dictionary.

      Upload a custom tokenization dictionary to use with the specified collection.

      Parameters:
      createTokenizationDictionaryOptions - the CreateTokenizationDictionaryOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type TokenDictStatusResponse
    • deleteTokenizationDictionary

      public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteTokenizationDictionary​(DeleteTokenizationDictionaryOptions deleteTokenizationDictionaryOptions)
      Delete tokenization dictionary.

      Delete the tokenization dictionary from the collection.

      Parameters:
      deleteTokenizationDictionaryOptions - the DeleteTokenizationDictionaryOptions containing the options for the call
      Returns:
      a ServiceCall with a void result
    • getStopwordListStatus

      public com.ibm.cloud.sdk.core.http.ServiceCall<TokenDictStatusResponse> getStopwordListStatus​(GetStopwordListStatusOptions getStopwordListStatusOptions)
      Get stopword list status.

      Returns the current status of the stopword list for the specified collection.

      Parameters:
      getStopwordListStatusOptions - the GetStopwordListStatusOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type TokenDictStatusResponse
    • createStopwordList

      public com.ibm.cloud.sdk.core.http.ServiceCall<TokenDictStatusResponse> createStopwordList​(CreateStopwordListOptions createStopwordListOptions)
      Create stopword list.

      Upload a custom stopword list to use with the specified collection.

      Parameters:
      createStopwordListOptions - the CreateStopwordListOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type TokenDictStatusResponse
    • deleteStopwordList

      public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteStopwordList​(DeleteStopwordListOptions deleteStopwordListOptions)
      Delete a custom stopword list.

      Delete a custom stopword list from the collection. After a custom stopword list is deleted, the default list is used for the collection.

      Parameters:
      deleteStopwordListOptions - the DeleteStopwordListOptions containing the options for the call
      Returns:
      a ServiceCall with a void result
    • addDocument

      public com.ibm.cloud.sdk.core.http.ServiceCall<DocumentAccepted> addDocument​(AddDocumentOptions addDocumentOptions)
      Add a document.

      Add a document to a collection with optional metadata.

      * The **version** query parameter is still required.

      * Returns immediately after the system has accepted the document for processing.

      * The user must provide document content, metadata, or both. If the request is missing both document content and metadata, it is rejected.

      * The user can set the **Content-Type** parameter on the **file** part to indicate the media type of the document. If the **Content-Type** parameter is missing or is one of the generic media types (for example, `application/octet-stream`), then the service attempts to automatically detect the document's media type.

      * The following field names are reserved and will be filtered out if present after normalization: `id`, `score`, `highlight`, and any field with the prefix of: `_`, `+`, or `-`

      * Fields with empty name values after normalization are filtered out before indexing.

      * Fields containing the following characters after normalization are filtered out before indexing: `#` and `,`

      **Note:** Documents can be added with a specific **document_id** by using the **_/v1/environments/{environment_id}/collections/{collection_id}/documents** method.

      Parameters:
      addDocumentOptions - the AddDocumentOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type DocumentAccepted
    • getDocumentStatus

      public com.ibm.cloud.sdk.core.http.ServiceCall<DocumentStatus> getDocumentStatus​(GetDocumentStatusOptions getDocumentStatusOptions)
      Get document details.

      Fetch status details about a submitted document. **Note:** this operation does not return the document itself. Instead, it returns only the document's processing status and any notices (warnings or errors) that were generated when the document was ingested. Use the query API to retrieve the actual document content.

      Parameters:
      getDocumentStatusOptions - the GetDocumentStatusOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type DocumentStatus
    • updateDocument

      public com.ibm.cloud.sdk.core.http.ServiceCall<DocumentAccepted> updateDocument​(UpdateDocumentOptions updateDocumentOptions)
      Update a document.

      Replace an existing document or add a document with a specified **document_id**. Starts ingesting a document with optional metadata.

      **Note:** When uploading a new document with this method it automatically replaces any document stored with the same **document_id** if it exists.

      Parameters:
      updateDocumentOptions - the UpdateDocumentOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type DocumentAccepted
    • deleteDocument

      public com.ibm.cloud.sdk.core.http.ServiceCall<DeleteDocumentResponse> deleteDocument​(DeleteDocumentOptions deleteDocumentOptions)
      Delete a document.

      If the given document ID is invalid, or if the document is not found, then the a success response is returned (HTTP status code `200`) with the status set to 'deleted'.

      Parameters:
      deleteDocumentOptions - the DeleteDocumentOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type DeleteDocumentResponse
    • query

      public com.ibm.cloud.sdk.core.http.ServiceCall<QueryResponse> query​(QueryOptions queryOptions)
      Query a collection.

      By using this method, you can construct long queries. For details, see the [Discovery documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-concepts#query-concepts).

      Parameters:
      queryOptions - the QueryOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type QueryResponse
    • queryNotices

      public com.ibm.cloud.sdk.core.http.ServiceCall<QueryNoticesResponse> queryNotices​(QueryNoticesOptions queryNoticesOptions)
      Query system notices.

      Queries for notices (errors or warnings) that might have been generated by the system. Notices are generated when ingesting documents and performing relevance training. See the [Discovery documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-concepts#query-concepts) for more details on the query language.

      Parameters:
      queryNoticesOptions - the QueryNoticesOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type QueryNoticesResponse
    • federatedQuery

      public com.ibm.cloud.sdk.core.http.ServiceCall<QueryResponse> federatedQuery​(FederatedQueryOptions federatedQueryOptions)
      Query multiple collections.

      By using this method, you can construct long queries that search multiple collection. For details, see the [Discovery documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-concepts#query-concepts).

      Parameters:
      federatedQueryOptions - the FederatedQueryOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type QueryResponse
    • federatedQueryNotices

      public com.ibm.cloud.sdk.core.http.ServiceCall<QueryNoticesResponse> federatedQueryNotices​(FederatedQueryNoticesOptions federatedQueryNoticesOptions)
      Query multiple collection system notices.

      Queries for notices (errors or warnings) that might have been generated by the system. Notices are generated when ingesting documents and performing relevance training. See the [Discovery documentation](https://cloud.ibm.com/docs/discovery?topic=discovery-query-concepts#query-concepts) for more details on the query language.

      Parameters:
      federatedQueryNoticesOptions - the FederatedQueryNoticesOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type QueryNoticesResponse
    • getAutocompletion

      public com.ibm.cloud.sdk.core.http.ServiceCall<Completions> getAutocompletion​(GetAutocompletionOptions getAutocompletionOptions)
      Get Autocomplete Suggestions.

      Returns completion query suggestions for the specified prefix. /n/n **Important:** this method is only valid when using the Cloud Pak version of Discovery.

      Parameters:
      getAutocompletionOptions - the GetAutocompletionOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type Completions
    • listTrainingData

      public com.ibm.cloud.sdk.core.http.ServiceCall<TrainingDataSet> listTrainingData​(ListTrainingDataOptions listTrainingDataOptions)
      List training data.

      Lists the training data for the specified collection.

      Parameters:
      listTrainingDataOptions - the ListTrainingDataOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type TrainingDataSet
    • addTrainingData

      public com.ibm.cloud.sdk.core.http.ServiceCall<TrainingQuery> addTrainingData​(AddTrainingDataOptions addTrainingDataOptions)
      Add query to training data.

      Adds a query to the training data for this collection. The query can contain a filter and natural language query.

      Parameters:
      addTrainingDataOptions - the AddTrainingDataOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type TrainingQuery
    • deleteAllTrainingData

      public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteAllTrainingData​(DeleteAllTrainingDataOptions deleteAllTrainingDataOptions)
      Delete all training data.

      Deletes all training data from a collection.

      Parameters:
      deleteAllTrainingDataOptions - the DeleteAllTrainingDataOptions containing the options for the call
      Returns:
      a ServiceCall with a void result
    • getTrainingData

      public com.ibm.cloud.sdk.core.http.ServiceCall<TrainingQuery> getTrainingData​(GetTrainingDataOptions getTrainingDataOptions)
      Get details about a query.

      Gets details for a specific training data query, including the query string and all examples.

      Parameters:
      getTrainingDataOptions - the GetTrainingDataOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type TrainingQuery
    • deleteTrainingData

      public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteTrainingData​(DeleteTrainingDataOptions deleteTrainingDataOptions)
      Delete a training data query.

      Removes the training data query and all associated examples from the training data set.

      Parameters:
      deleteTrainingDataOptions - the DeleteTrainingDataOptions containing the options for the call
      Returns:
      a ServiceCall with a void result
    • listTrainingExamples

      public com.ibm.cloud.sdk.core.http.ServiceCall<TrainingExampleList> listTrainingExamples​(ListTrainingExamplesOptions listTrainingExamplesOptions)
      List examples for a training data query.

      List all examples for this training data query.

      Parameters:
      listTrainingExamplesOptions - the ListTrainingExamplesOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type TrainingExampleList
    • createTrainingExample

      public com.ibm.cloud.sdk.core.http.ServiceCall<TrainingExample> createTrainingExample​(CreateTrainingExampleOptions createTrainingExampleOptions)
      Add example to training data query.

      Adds a example to this training data query.

      Parameters:
      createTrainingExampleOptions - the CreateTrainingExampleOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type TrainingExample
    • deleteTrainingExample

      public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteTrainingExample​(DeleteTrainingExampleOptions deleteTrainingExampleOptions)
      Delete example for training data query.

      Deletes the example document with the given ID from the training data query.

      Parameters:
      deleteTrainingExampleOptions - the DeleteTrainingExampleOptions containing the options for the call
      Returns:
      a ServiceCall with a void result
    • updateTrainingExample

      public com.ibm.cloud.sdk.core.http.ServiceCall<TrainingExample> updateTrainingExample​(UpdateTrainingExampleOptions updateTrainingExampleOptions)
      Change label or cross reference for example.

      Changes the label or cross reference query for this training data example.

      Parameters:
      updateTrainingExampleOptions - the UpdateTrainingExampleOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type TrainingExample
    • getTrainingExample

      public com.ibm.cloud.sdk.core.http.ServiceCall<TrainingExample> getTrainingExample​(GetTrainingExampleOptions getTrainingExampleOptions)
      Get details for training data example.

      Gets the details for this training example.

      Parameters:
      getTrainingExampleOptions - the GetTrainingExampleOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type TrainingExample
    • deleteUserData

      public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteUserData​(DeleteUserDataOptions deleteUserDataOptions)
      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/discovery?topic=discovery-information-security#information-security).

      Parameters:
      deleteUserDataOptions - the DeleteUserDataOptions containing the options for the call
      Returns:
      a ServiceCall with a void result
    • createEvent

      public com.ibm.cloud.sdk.core.http.ServiceCall<CreateEventResponse> createEvent​(CreateEventOptions createEventOptions)
      Create event.

      The **Events** API can be used to create log entries that are associated with specific queries. For example, you can record which documents in the results set were "clicked" by a user and when that click occurred.

      Parameters:
      createEventOptions - the CreateEventOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type CreateEventResponse
    • queryLog

      public com.ibm.cloud.sdk.core.http.ServiceCall<LogQueryResponse> queryLog​(QueryLogOptions queryLogOptions)
      Search the query and event log.

      Searches the query and event log to find query sessions that match the specified criteria. Searching the **logs** endpoint uses the standard Discovery query syntax for the parameters that are supported.

      Parameters:
      queryLogOptions - the QueryLogOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type LogQueryResponse
    • queryLog

      public com.ibm.cloud.sdk.core.http.ServiceCall<LogQueryResponse> queryLog()
      Search the query and event log.

      Searches the query and event log to find query sessions that match the specified criteria. Searching the **logs** endpoint uses the standard Discovery query syntax for the parameters that are supported.

      Returns:
      a ServiceCall with a result of type LogQueryResponse
    • getMetricsQuery

      public com.ibm.cloud.sdk.core.http.ServiceCall<MetricResponse> getMetricsQuery​(GetMetricsQueryOptions getMetricsQueryOptions)
      Number of queries over time.

      Total number of queries using the **natural_language_query** parameter over a specific time window.

      Parameters:
      getMetricsQueryOptions - the GetMetricsQueryOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type MetricResponse
    • getMetricsQuery

      public com.ibm.cloud.sdk.core.http.ServiceCall<MetricResponse> getMetricsQuery()
      Number of queries over time.

      Total number of queries using the **natural_language_query** parameter over a specific time window.

      Returns:
      a ServiceCall with a result of type MetricResponse
    • getMetricsQueryEvent

      public com.ibm.cloud.sdk.core.http.ServiceCall<MetricResponse> getMetricsQueryEvent​(GetMetricsQueryEventOptions getMetricsQueryEventOptions)
      Number of queries with an event over time.

      Total number of queries using the **natural_language_query** parameter that have a corresponding "click" event over a specified time window. This metric requires having integrated event tracking in your application using the **Events** API.

      Parameters:
      getMetricsQueryEventOptions - the GetMetricsQueryEventOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type MetricResponse
    • getMetricsQueryEvent

      public com.ibm.cloud.sdk.core.http.ServiceCall<MetricResponse> getMetricsQueryEvent()
      Number of queries with an event over time.

      Total number of queries using the **natural_language_query** parameter that have a corresponding "click" event over a specified time window. This metric requires having integrated event tracking in your application using the **Events** API.

      Returns:
      a ServiceCall with a result of type MetricResponse
    • getMetricsQueryNoResults

      public com.ibm.cloud.sdk.core.http.ServiceCall<MetricResponse> getMetricsQueryNoResults​(GetMetricsQueryNoResultsOptions getMetricsQueryNoResultsOptions)
      Number of queries with no search results over time.

      Total number of queries using the **natural_language_query** parameter that have no results returned over a specified time window.

      Parameters:
      getMetricsQueryNoResultsOptions - the GetMetricsQueryNoResultsOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type MetricResponse
    • getMetricsQueryNoResults

      public com.ibm.cloud.sdk.core.http.ServiceCall<MetricResponse> getMetricsQueryNoResults()
      Number of queries with no search results over time.

      Total number of queries using the **natural_language_query** parameter that have no results returned over a specified time window.

      Returns:
      a ServiceCall with a result of type MetricResponse
    • getMetricsEventRate

      public com.ibm.cloud.sdk.core.http.ServiceCall<MetricResponse> getMetricsEventRate​(GetMetricsEventRateOptions getMetricsEventRateOptions)
      Percentage of queries with an associated event.

      The percentage of queries using the **natural_language_query** parameter that have a corresponding "click" event over a specified time window. This metric requires having integrated event tracking in your application using the **Events** API.

      Parameters:
      getMetricsEventRateOptions - the GetMetricsEventRateOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type MetricResponse
    • getMetricsEventRate

      public com.ibm.cloud.sdk.core.http.ServiceCall<MetricResponse> getMetricsEventRate()
      Percentage of queries with an associated event.

      The percentage of queries using the **natural_language_query** parameter that have a corresponding "click" event over a specified time window. This metric requires having integrated event tracking in your application using the **Events** API.

      Returns:
      a ServiceCall with a result of type MetricResponse
    • getMetricsQueryTokenEvent

      public com.ibm.cloud.sdk.core.http.ServiceCall<MetricTokenResponse> getMetricsQueryTokenEvent​(GetMetricsQueryTokenEventOptions getMetricsQueryTokenEventOptions)
      Most frequent query tokens with an event.

      The most frequent query tokens parsed from the **natural_language_query** parameter and their corresponding "click" event rate within the recording period (queries and events are stored for 30 days). A query token is an individual word or unigram within the query string.

      Parameters:
      getMetricsQueryTokenEventOptions - the GetMetricsQueryTokenEventOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type MetricTokenResponse
    • getMetricsQueryTokenEvent

      public com.ibm.cloud.sdk.core.http.ServiceCall<MetricTokenResponse> getMetricsQueryTokenEvent()
      Most frequent query tokens with an event.

      The most frequent query tokens parsed from the **natural_language_query** parameter and their corresponding "click" event rate within the recording period (queries and events are stored for 30 days). A query token is an individual word or unigram within the query string.

      Returns:
      a ServiceCall with a result of type MetricTokenResponse
    • listCredentials

      public com.ibm.cloud.sdk.core.http.ServiceCall<CredentialsList> listCredentials​(ListCredentialsOptions listCredentialsOptions)
      List credentials.

      List all the source credentials that have been created for this service instance.

      **Note:** All credentials are sent over an encrypted connection and encrypted at rest.

      Parameters:
      listCredentialsOptions - the ListCredentialsOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type CredentialsList
    • createCredentials

      public com.ibm.cloud.sdk.core.http.ServiceCall<Credentials> createCredentials​(CreateCredentialsOptions createCredentialsOptions)
      Create credentials.

      Creates a set of credentials to connect to a remote source. Created credentials are used in a configuration to associate a collection with the remote source.

      **Note:** All credentials are sent over an encrypted connection and encrypted at rest.

      Parameters:
      createCredentialsOptions - the CreateCredentialsOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type Credentials
    • getCredentials

      public com.ibm.cloud.sdk.core.http.ServiceCall<Credentials> getCredentials​(GetCredentialsOptions getCredentialsOptions)
      View Credentials.

      Returns details about the specified credentials.

      **Note:** Secure credential information such as a password or SSH key is never returned and must be obtained from the source system.

      Parameters:
      getCredentialsOptions - the GetCredentialsOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type Credentials
    • updateCredentials

      public com.ibm.cloud.sdk.core.http.ServiceCall<Credentials> updateCredentials​(UpdateCredentialsOptions updateCredentialsOptions)
      Update credentials.

      Updates an existing set of source credentials.

      **Note:** All credentials are sent over an encrypted connection and encrypted at rest.

      Parameters:
      updateCredentialsOptions - the UpdateCredentialsOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type Credentials
    • deleteCredentials

      public com.ibm.cloud.sdk.core.http.ServiceCall<DeleteCredentials> deleteCredentials​(DeleteCredentialsOptions deleteCredentialsOptions)
      Delete credentials.

      Deletes a set of stored credentials from your Discovery instance.

      Parameters:
      deleteCredentialsOptions - the DeleteCredentialsOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type DeleteCredentials
    • listGateways

      public com.ibm.cloud.sdk.core.http.ServiceCall<GatewayList> listGateways​(ListGatewaysOptions listGatewaysOptions)
      List Gateways.

      List the currently configured gateways.

      Parameters:
      listGatewaysOptions - the ListGatewaysOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type GatewayList
    • createGateway

      public com.ibm.cloud.sdk.core.http.ServiceCall<Gateway> createGateway​(CreateGatewayOptions createGatewayOptions)
      Create Gateway.

      Create a gateway configuration to use with a remotely installed gateway.

      Parameters:
      createGatewayOptions - the CreateGatewayOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type Gateway
    • getGateway

      public com.ibm.cloud.sdk.core.http.ServiceCall<Gateway> getGateway​(GetGatewayOptions getGatewayOptions)
      List Gateway Details.

      List information about the specified gateway.

      Parameters:
      getGatewayOptions - the GetGatewayOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type Gateway
    • deleteGateway

      public com.ibm.cloud.sdk.core.http.ServiceCall<GatewayDelete> deleteGateway​(DeleteGatewayOptions deleteGatewayOptions)
      Delete Gateway.

      Delete the specified gateway configuration.

      Parameters:
      deleteGatewayOptions - the DeleteGatewayOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type GatewayDelete