Watson Developer Cloud .NET Standard SDK
5.0.0
The .NET SDK uses the Watson Developer Cloud services, a collection of REST APIs and SDKs that use cognitive computing to solve complex problems.
|
Classes | |
class | AddDocumentEnums |
Enum values for AddDocument. More... | |
class | AnalyzeDocumentEnums |
Enum values for AnalyzeDocument. More... | |
class | UpdateDocumentEnums |
Enum values for UpdateDocument. More... | |
Public Member Functions | |
DiscoveryService (string version) | |
DiscoveryService (string version, IAuthenticator authenticator) | |
DiscoveryService (string version, string serviceName) | |
DiscoveryService (IClient httpClient) | |
DiscoveryService (string version, string serviceName, IAuthenticator authenticator) | |
DetailedResponse< ListCollectionsResponse > | ListCollections (string projectId) |
List collections. More... | |
DetailedResponse< CollectionDetails > | CreateCollection (string projectId, string name, string description=null, string language=null, List< CollectionEnrichment > enrichments=null) |
Create a collection. More... | |
DetailedResponse< CollectionDetails > | GetCollection (string projectId, string collectionId) |
Get collection. More... | |
DetailedResponse< CollectionDetails > | UpdateCollection (string projectId, string collectionId, string name=null, string description=null, List< CollectionEnrichment > enrichments=null) |
Update a collection. More... | |
DetailedResponse< object > | DeleteCollection (string projectId, string collectionId) |
Delete a collection. More... | |
DetailedResponse< QueryResponse > | Query (string projectId, List< string > collectionIds=null, string filter=null, string query=null, string naturalLanguageQuery=null, string aggregation=null, long? count=null, List< string > _return=null, long? offset=null, string sort=null, bool? highlight=null, bool? spellingSuggestions=null, QueryLargeTableResults tableResults=null, QueryLargeSuggestedRefinements suggestedRefinements=null, QueryLargePassages passages=null) |
Query a project. More... | |
DetailedResponse< Completions > | GetAutocompletion (string projectId, string prefix, List< string > collectionIds=null, string field=null, long? count=null) |
Get Autocomplete Suggestions. More... | |
DetailedResponse< QueryNoticesResponse > | QueryNotices (string projectId, string filter=null, string query=null, string naturalLanguageQuery=null, long? count=null, long? offset=null) |
Query system notices. More... | |
DetailedResponse< ListFieldsResponse > | ListFields (string projectId, List< string > collectionIds=null) |
List fields. More... | |
DetailedResponse< ComponentSettingsResponse > | GetComponentSettings (string projectId) |
List component settings. More... | |
DetailedResponse< DocumentAccepted > | AddDocument (string projectId, string collectionId, System.IO.MemoryStream file=null, string filename=null, string fileContentType=null, string metadata=null, bool? xWatsonDiscoveryForce=null) |
Add a document. More... | |
DetailedResponse< DocumentAccepted > | UpdateDocument (string projectId, string collectionId, string documentId, System.IO.MemoryStream file=null, string filename=null, string fileContentType=null, string metadata=null, bool? xWatsonDiscoveryForce=null) |
Update a document. More... | |
DetailedResponse< DeleteDocumentResponse > | DeleteDocument (string projectId, string collectionId, string documentId, bool? xWatsonDiscoveryForce=null) |
Delete a document. More... | |
DetailedResponse< TrainingQuerySet > | ListTrainingQueries (string projectId) |
List training queries. More... | |
DetailedResponse< object > | DeleteTrainingQueries (string projectId) |
Delete training queries. More... | |
DetailedResponse< TrainingQuery > | CreateTrainingQuery (string projectId, string naturalLanguageQuery, List< TrainingExample > examples, string filter=null) |
Create training query. More... | |
DetailedResponse< TrainingQuery > | GetTrainingQuery (string projectId, string queryId) |
Get a training data query. More... | |
DetailedResponse< TrainingQuery > | UpdateTrainingQuery (string projectId, string queryId, string naturalLanguageQuery, List< TrainingExample > examples, string filter=null) |
Update a training query. More... | |
DetailedResponse< AnalyzedDocument > | AnalyzeDocument (string projectId, string collectionId, System.IO.MemoryStream file=null, string filename=null, string fileContentType=null, string metadata=null) |
Analyze a Document. More... | |
DetailedResponse< Enrichments > | ListEnrichments (string projectId) |
List Enrichments. More... | |
DetailedResponse< Enrichment > | CreateEnrichment (string projectId, CreateEnrichment enrichment, System.IO.MemoryStream file=null) |
Create an enrichment. More... | |
DetailedResponse< Enrichment > | GetEnrichment (string projectId, string enrichmentId) |
Get enrichment. More... | |
DetailedResponse< Enrichment > | UpdateEnrichment (string projectId, string enrichmentId, string name, string description=null) |
Update an enrichment. More... | |
DetailedResponse< object > | DeleteEnrichment (string projectId, string enrichmentId) |
Delete an enrichment. More... | |
DetailedResponse< ListProjectsResponse > | ListProjects () |
List projects. More... | |
DetailedResponse< ProjectDetails > | CreateProject (string name, string type, DefaultQueryParams defaultQueryParameters=null) |
Create a Project. More... | |
DetailedResponse< ProjectDetails > | GetProject (string projectId) |
Get project. More... | |
DetailedResponse< ProjectDetails > | UpdateProject (string projectId, string name=null) |
Update a project. More... | |
DetailedResponse< object > | DeleteProject (string projectId) |
Delete a project. More... | |
DetailedResponse< object > | DeleteUserData (string customerId) |
Delete labeled data. More... | |
Properties | |
string | Version [get, set] |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Add a document.
Add a document to a collection with optional metadata.
Returns immediately after the system has accepted the document for processing.
application/octet-stream
), then the service attempts to automatically detect the document's media type.id
, score
, highlight
, and any field with the prefix of: _
, +
, or -
#
and ,
If the document is uploaded to a collection that has it's data shared with another collection, the X-Watson-Discovery-Force header must be set to true
.
Note: Documents can be added with a specific document_id by using the **_/v2/projects/{project_id}/collections/{collection_id}/documents** method.
Note: This operation only works on collections created to accept direct file uploads. It cannot be used to modify a collection that connects to an external source such as Microsoft SharePoint.
projectId | The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling. |
collectionId | The ID of the collection. |
file | The content of the document to ingest. The maximum supported file size when adding a file to a collection is 50 megabytes, the maximum supported file size when testing a configuration is 1 megabyte. Files larger than the supported size are rejected. (optional) |
filename | The filename for file. (optional) |
fileContentType | The content type of file. (optional) |
metadata | The maximum supported metadata file size is 1 MB. Metadata parts larger than 1 MB are rejected. |
Example: ``` { "Creator": "Johnny Appleseed", "Subject": "Apples" } ``. (optional)</param> <param name="xWatsonDiscoveryForce">When
true`, the uploaded document is added to the collection even if the data for that collection is shared with other collections. (optional, default to false)
Implements IBM.Watson.Discovery.v2.IDiscoveryService.
|
inline |
Analyze a Document.
Process a document using the specified collection's settings and return it for realtime use.
Note: Documents processed using this method are not added to the specified collection.
Note: This method is only supported on IBM Cloud Pak for Data instances of Discovery.
projectId | The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling. |
collectionId | The ID of the collection. |
file | The content of the document to ingest. The maximum supported file size when adding a file to a collection is 50 megabytes, the maximum supported file size when testing a configuration is 1 megabyte. Files larger than the supported size are rejected. (optional) |
filename | The filename for file. (optional) |
fileContentType | The content type of file. (optional) |
metadata | The maximum supported metadata file size is 1 MB. Metadata parts larger than 1 MB are rejected. |
Example: ``` { "Creator": "Johnny Appleseed", "Subject": "Apples" } ```. (optional)
Implements IBM.Watson.Discovery.v2.IDiscoveryService.
|
inline |
Create a collection.
Create a new collection in the specified project.
projectId | The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling. |
name | The name of the collection. |
description | A description of the collection. (optional) |
language | The language of the collection. (optional, default to en) |
enrichments | An array of enrichments that are applied to this collection. (optional) |
Implements IBM.Watson.Discovery.v2.IDiscoveryService.
|
inline |
Create an enrichment.
Create an enrichment for use with the specified project/.
projectId | The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling. |
enrichment | |
file | The enrichment file to upload. (optional) |
Implements IBM.Watson.Discovery.v2.IDiscoveryService.
|
inline |
Create a Project.
Create a new project for this instance.
name | The human readable name of this project. |
type | The project type of this project. |
defaultQueryParameters | Default query parameters for this project. (optional) |
Implements IBM.Watson.Discovery.v2.IDiscoveryService.
|
inline |
Create training query.
Add a query to the training data for this project. The query can contain a filter and natural language query.
projectId | The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling. |
naturalLanguageQuery | The natural text query for the training query. |
examples | Array of training examples. |
filter | The filter used on the collection before the natural_language_query is applied. (optional) |
Implements IBM.Watson.Discovery.v2.IDiscoveryService.
|
inline |
Delete a collection.
Deletes the specified collection from the project. All documents stored in the specified collection and not shared is also deleted.
projectId | The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling. |
collectionId | The ID of the collection. |
Implements IBM.Watson.Discovery.v2.IDiscoveryService.
|
inline |
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'.
Note: This operation only works on collections created to accept direct file uploads. It cannot be used to modify a collection that connects to an external source such as Microsoft SharePoint.
Note: Segments of an uploaded document cannot be deleted individually. Delete all segments by deleting using the parent_document_id
of a segment result.
projectId | The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling. |
collectionId | The ID of the collection. |
documentId | The ID of the document. |
xWatsonDiscoveryForce | When true , the uploaded document is added to the collection even if the data for that collection is shared with other collections. (optional, default to false) |
Implements IBM.Watson.Discovery.v2.IDiscoveryService.
|
inline |
Delete an enrichment.
Deletes an existing enrichment from the specified project.
Note: Only enrichments that have been manually created can be deleted.
projectId | The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling. |
enrichmentId | The ID of the enrichment. |
Implements IBM.Watson.Discovery.v2.IDiscoveryService.
|
inline |
Delete a project.
Deletes the specified project.
Important: Deleting a project deletes everything that is part of the specified project, including all collections.
projectId | The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling. |
Implements IBM.Watson.Discovery.v2.IDiscoveryService.
|
inline |
Delete training queries.
Removes all training queries for the specified project.
projectId | The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling. |
Implements IBM.Watson.Discovery.v2.IDiscoveryService.
|
inline |
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.
Note: This method is only supported on IBM Cloud instances of Discovery.
customerId | The customer ID for which all data is to be deleted. |
Implements IBM.Watson.Discovery.v2.IDiscoveryService.
|
inline |
Get Autocomplete Suggestions.
Returns completion query suggestions for the specified prefix.
projectId | The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling. |
prefix | The prefix to use for autocompletion. For example, the prefix Ho could autocomplete to Hot , Housing , or How do I upgrade . Possible completions are. |
collectionIds | Comma separated list of the collection IDs. If this parameter is not specified, all collections in the project are used. (optional) |
field | The field in the result documents that autocompletion suggestions are identified from. (optional) |
count | The number of autocompletion suggestions to return. (optional) |
Implements IBM.Watson.Discovery.v2.IDiscoveryService.
|
inline |
Get collection.
Get details about the specified collection.
projectId | The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling. |
collectionId | The ID of the collection. |
Implements IBM.Watson.Discovery.v2.IDiscoveryService.
|
inline |
List component settings.
Returns default configuration settings for components.
projectId | The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling. |
Implements IBM.Watson.Discovery.v2.IDiscoveryService.
|
inline |
Get enrichment.
Get details about a specific enrichment.
projectId | The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling. |
enrichmentId | The ID of the enrichment. |
Implements IBM.Watson.Discovery.v2.IDiscoveryService.
|
inline |
Get project.
Get details on the specified project.
projectId | The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling. |
Implements IBM.Watson.Discovery.v2.IDiscoveryService.
|
inline |
Get a training data query.
Get details for a specific training data query, including the query string and all examples.
projectId | The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling. |
queryId | The ID of the query used for training. |
Implements IBM.Watson.Discovery.v2.IDiscoveryService.
|
inline |
List collections.
Lists existing collections for the specified project.
projectId | The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling. |
Implements IBM.Watson.Discovery.v2.IDiscoveryService.
|
inline |
List Enrichments.
List the enrichments available to this project.
projectId | The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling. |
Implements IBM.Watson.Discovery.v2.IDiscoveryService.
|
inline |
List fields.
Gets a list of the unique fields (and their types) stored in the the specified collections.
projectId | The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling. |
collectionIds | Comma separated list of the collection IDs. If this parameter is not specified, all collections in the project are used. (optional) |
Implements IBM.Watson.Discovery.v2.IDiscoveryService.
|
inline |
List projects.
Lists existing projects for this instance.
Implements IBM.Watson.Discovery.v2.IDiscoveryService.
|
inline |
List training queries.
List the training queries for the specified project.
projectId | The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling. |
Implements IBM.Watson.Discovery.v2.IDiscoveryService.
|
inline |
Query a project.
By using this method, you can construct queries. For details, see the Discovery documentation. The default query parameters are defined by the settings for this project, see the Discovery documentation for an overview of the standard default settings, and see the Projects API documentation for details about how to set custom default query settings.
projectId | The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling. |
collectionIds | A comma-separated list of collection IDs to be queried against. (optional) |
filter | A cacheable query that excludes documents that don't mention the query content. Filter searches are better for metadata-type searches and for assessing the concepts in the data set. (optional) |
query | A query search returns all documents in your data set with full enrichments and full text, but with the most relevant documents listed first. Use a query search when you want to find the most relevant search results. (optional) |
naturalLanguageQuery | A natural language query that returns relevant documents by utilizing training data and natural language understanding. (optional) |
aggregation | An aggregation search that returns an exact answer by combining query search with filters. Useful for applications to build lists, tables, and time series. For a full list of possible aggregations, see the Query reference. (optional) |
count | Number of results to return. (optional) |
_return | A list of the fields in the document hierarchy to return. If this parameter not specified, then all top-level fields are returned. (optional) |
offset | The number of query results to skip at the beginning. For example, if the total number of results that are returned is 10 and the offset is 8, it returns the last two results. (optional) |
sort | A comma-separated list of fields in the document to sort on. You can optionally specify a sort direction by prefixing the field with - for descending or + for ascending. Ascending is the default sort direction if no prefix is specified. This parameter cannot be used in the same query as the bias parameter. (optional) |
highlight | When true , a highlight field is returned for each result which contains the fields which match the query with <em></em> tags around the matching query terms. (optional) |
spellingSuggestions | When true and the natural_language_query parameter is used, the natural_language_query parameter is spell checked. The most likely correction is returned in the suggested_query field of the response (if one exists). (optional) |
tableResults | Configuration for table retrieval. (optional) |
suggestedRefinements | Configuration for suggested refinements. (optional) |
passages | Configuration for passage retrieval. (optional) |
Implements IBM.Watson.Discovery.v2.IDiscoveryService.
|
inline |
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.
projectId | The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling. |
filter | A cacheable query that excludes documents that don't mention the query content. Filter searches are better for metadata-type searches and for assessing the concepts in the data set. (optional) |
query | A query search returns all documents in your data set with full enrichments and full text, but with the most relevant documents listed first. (optional) |
naturalLanguageQuery | A natural language query that returns relevant documents by utilizing training data and natural language understanding. (optional) |
count | Number of results to return. The maximum for the count and offset values together in any one query is 10000. (optional) |
offset | The number of query results to skip at the beginning. For example, if the total number of results that are returned is 10 and the offset is 8, it returns the last two results. The maximum for the count and offset values together in any one query is 10000. (optional) |
Implements IBM.Watson.Discovery.v2.IDiscoveryService.
|
inline |
Update a collection.
Updates the specified collection's name, description, and enrichments.
projectId | The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling. |
collectionId | The ID of the collection. |
name | The name of the collection. (optional) |
description | A description of the collection. (optional) |
enrichments | An array of enrichments that are applied to this collection. (optional) |
Implements IBM.Watson.Discovery.v2.IDiscoveryService.
|
inline |
Update a document.
Replace an existing document or add a document with a specified document_id. Starts ingesting a document with optional metadata.
If the document is uploaded to a collection that has it's data shared with another collection, the X-Watson-Discovery-Force header must be set to true
.
Note: When uploading a new document with this method it automatically replaces any document stored with the same document_id if it exists.
Note: This operation only works on collections created to accept direct file uploads. It cannot be used to modify a collection that connects to an external source such as Microsoft SharePoint.
Note: If an uploaded document is segmented, all segments will be overwritten, even if the updated version of the document has fewer segments.
projectId | The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling. |
collectionId | The ID of the collection. |
documentId | The ID of the document. |
file | The content of the document to ingest. The maximum supported file size when adding a file to a collection is 50 megabytes, the maximum supported file size when testing a configuration is 1 megabyte. Files larger than the supported size are rejected. (optional) |
filename | The filename for file. (optional) |
fileContentType | The content type of file. (optional) |
metadata | The maximum supported metadata file size is 1 MB. Metadata parts larger than 1 MB are rejected. |
Example: ``` { "Creator": "Johnny Appleseed", "Subject": "Apples" } ``. (optional)</param> <param name="xWatsonDiscoveryForce">When
true`, the uploaded document is added to the collection even if the data for that collection is shared with other collections. (optional, default to false)
Implements IBM.Watson.Discovery.v2.IDiscoveryService.
|
inline |
Update an enrichment.
Updates an existing enrichment's name and description.
projectId | The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling. |
enrichmentId | The ID of the enrichment. |
name | A new name for the enrichment. |
description | A new description for the enrichment. (optional) |
Implements IBM.Watson.Discovery.v2.IDiscoveryService.
|
inline |
Update a project.
Update the specified project's name.
projectId | The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling. |
name | The new name to give this project. (optional) |
Implements IBM.Watson.Discovery.v2.IDiscoveryService.
|
inline |
Update a training query.
Updates an existing training query and it's examples.
projectId | The ID of the project. This information can be found from the deploy page of the Discovery administrative tooling. |
queryId | The ID of the query used for training. |
naturalLanguageQuery | The natural text query for the training query. |
examples | Array of training examples. |
filter | The filter used on the collection before the natural_language_query is applied. (optional) |
Implements IBM.Watson.Discovery.v2.IDiscoveryService.
|
getset |