Introduction IBM Watson™ Discovery v1 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. This documentation describes Java SDK major version 9. For more information about how to update your code from the previous version, see the migration guidehttps://github.com/watson-developer-cloud/java-sdk/blob/master/MIGRATION-V9.md. This documentation describes Node SDK major version 6. For more information about how to update your code from the previous version, see the migration guidehttps://github.com/watson-developer-cloud/node-sdk/blob/master/MIGRATION-V6.md. This documentation describes Python SDK major version 5. For more information about how to update your code from the previous version, see the migration guidehttps://github.com/watson-developer-cloud/python-sdk/blob/master/MIGRATION-V5.md. This documentation describes Ruby SDK major version 2. For more information about how to update your code from the previous version, see the migration guidehttps://github.com/watson-developer-cloud/ruby-sdk/blob/master/MIGRATION-V2.md. This documentation describes .NET Standard SDK major version 5. For more information about how to update your code from the previous version, see the migration guidehttps://github.com/watson-developer-cloud/dotnet-standard-sdk/blob/master/MIGRATION-V5.md. This documentation describes Go SDK major version 2. For more information about how to update your code from the previous version, see the migration guidehttps://github.com/watson-developer-cloud/go-sdk/blob/master/MIGRATION-V2.md. This documentation describes Swift SDK major version 4. For more information about how to update your code from the previous version, see the migration guidehttps://github.com/watson-developer-cloud/swift-sdk/blob/master/MIGRATION-V4.md. This documentation describes Unity SDK major version 5. For more information about how to update your code from the previous version, see the migration guidehttps://github.com/watson-developer-cloud/unity-sdk/blob/master/MIGRATION-v5.md. Discovery v1 is deprecated. As of 11 July 2023, you cannot create new instances. Existing Advanced plan instances are supported until 11 July 2023. Any instances that still exist on that date will be deleted. For more information about Discovery v2, see the v2 APIdisco-v2. For more information about how to migrate to Discovery v2, see Getting the most from Discoveryhttps://cloud.ibm.com/docs/discovery-data?topic=discovery-data-version-choose. Discovery v1 is deprecated. As of 11 July 2023, you cannot create new instances. Existing Advanced plan instances are supported until 11 July 2023. Any instances that still exist on that date will be deleted. For more information about Discovery v2, see the v2 APIdisco-v2. For more information about how to migrate to Discovery v2, see Getting the most from Discoveryhttps://cloud.ibm.com/docs/discovery-data?topic=discovery-data-version-choose. Discovery v1 is deprecated. As of 11 July 2023, you cannot create new instances. Existing Advanced plan instances are supported until 11 July 2023. Any instances that still exist on that date will be deleted. For more information about Discovery v2, see the v2 APIdisco-v2. For more information about how to migrate to Discovery v2, see Getting the most from Discoveryhttps://cloud.ibm.com/docs/discovery-data?topic=discovery-data-version-choose. Discovery v1 is deprecated. As of 11 July 2023, you cannot create new instances. Existing Advanced plan instances are supported until 11 July 2023. Any instances that still exist on that date will be deleted. For more information about Discovery v2, see the v2 APIdisco-v2. For more information about how to migrate to Discovery v2, see Getting the most from Discoveryhttps://cloud.ibm.com/docs/discovery-data?topic=discovery-data-version-choose. Discovery v1 is deprecated. As of 11 July 2023, you cannot create new instances. Existing Advanced plan instances are supported until 11 July 2023. Any instances that still exist on that date will be deleted. For more information about Discovery v2, see the v2 APIdisco-v2. For more information about how to migrate to Discovery v2, see Getting the most from Discoveryhttps://cloud.ibm.com/docs/discovery-data?topic=discovery-data-version-choose. The code examples on this tab use the client library that is provided for Java. Maven xml Method Path Summary POST /v1/environments Create an environment GET /v1/environments List environments GET /v1/environments/{environment_id} Get environment info PUT /v1/environments/{environment_id} Update an environment DELETE /v1/environments/{environment_id} Delete environment GET /v1/environments/{environment_id}/fields List fields across collections POST /v1/environments/{environment_id}/configurations Add configuration GET /v1/environments/{environment_id}/configurations List configurations GET /v1/environments/{environment_id}/configurations/{configuration_id} Get configuration details PUT /v1/environments/{environment_id}/configurations/{configuration_id} Update a configuration DELETE /v1/environments/{environment_id}/configurations/{configuration_id} Delete a configuration POST /v1/environments/{environment_id}/collections Create a collection GET /v1/environments/{environment_id}/collections List collections GET /v1/environments/{environment_id}/collections/{collection_id} Get collection details PUT /v1/environments/{environment_id}/collections/{collection_id} Update a collection DELETE /v1/environments/{environment_id}/collections/{collection_id} Delete a collection GET /v1/environments/{environment_id}/collections/{collection_id}/fields List collection fields GET /v1/environments/{environment_id}/collections/{collection_id}/expansions Get the expansion list POST /v1/environments/{environment_id}/collections/{collection_id}/expansions Create or update expansion list DELETE /v1/environments/{environment_id}/collections/{collection_id}/expansions Delete the expansion list GET /v1/environments/{environment_id}/collections/{collection_id}/word_lists/tokenization_dictionary Get tokenization dictionary status POST /v1/environments/{environment_id}/collections/{collection_id}/word_lists/tokenization_dictionary Create tokenization dictionary DELETE /v1/environments/{environment_id}/collections/{collection_id}/word_lists/tokenization_dictionary Delete tokenization dictionary GET /v1/environments/{environment_id}/collections/{collection_id}/word_lists/stopwords Get stopword list status POST /v1/environments/{environment_id}/collections/{collection_id}/word_lists/stopwords Create stopword list DELETE /v1/environments/{environment_id}/collections/{collection_id}/word_lists/stopwords Delete a custom stopword list POST /v1/environments/{environment_id}/collections/{collection_id}/documents Add a document GET /v1/environments/{environment_id}/collections/{collection_id}/documents/{document_id} Get document details POST /v1/environments/{environment_id}/collections/{collection_id}/documents/{document_id} Update a document DELETE /v1/environments/{environment_id}/collections/{collection_id}/documents/{document_id} Delete a document GET /v1/environments/{environment_id}/collections/{collection_id}/query Query a collection (GET) POST /v1/environments/{environment_id}/collections/{collection_id}/query Query a collection GET /v1/environments/{environment_id}/collections/{collection_id}/notices Query system notices GET /v1/environments/{environment_id}/query Query multiple collections (GET) POST /v1/environments/{environment_id}/query Query multiple collections GET /v1/environments/{environment_id}/notices Query multiple collection system notices GET /v1/environments/{environment_id}/collections/{collection_id}/autocompletion Get Autocomplete Suggestions GET /v1/environments/{environment_id}/collections/{collection_id}/training_data List training data POST /v1/environments/{environment_id}/collections/{collection_id}/training_data Add query to training data DELETE /v1/environments/{environment_id}/collections/{collection_id}/training_data Delete all training data GET /v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id} Get details about a query DELETE /v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id} Delete a training data query GET /v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}/examples List examples for a training data query POST /v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}/examples Add example to training data query DELETE /v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}/examples/{example_id} Delete example for training data query PUT /v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}/examples/{example_id} Change label or cross reference for example GET /v1/environments/{environment_id}/collections/{collection_id}/training_data/{query_id}/examples/{example_id} Get details for training data example DELETE /v1/user_data Delete labeled data POST /v1/events Create event GET /v1/logs Search the query and event log GET /v1/metrics/number_of_queries Number of queries over time GET /v1/metrics/number_of_queries_with_event Number of queries with an event over time GET /v1/metrics/number_of_queries_with_no_search_results Number of queries with no search results over time GET /v1/metrics/event_rate Percentage of queries with an associated event GET /v1/metrics/top_query_tokens_with_event_rate Most frequent query tokens with an event GET /v1/environments/{environment_id}/credentials List credentials POST /v1/environments/{environment_id}/credentials Create credentials GET /v1/environments/{environment_id}/credentials/{credential_id} View Credentials PUT /v1/environments/{environment_id}/credentials/{credential_id} Update credentials DELETE /v1/environments/{environment_id}/credentials/{credential_id} Delete credentials GET /v1/environments/{environment_id}/gateways List Gateways POST /v1/environments/{environment_id}/gateways Create Gateway GET /v1/environments/{environment_id}/gateways/{gateway_id} List Gateway Details DELETE /v1/environments/{environment_id}/gateways/{gateway_id} Delete Gateway