Click or drag to resize

Discovery.AddDocumentUsingConfigFile Method

Add a document to a collection with optional metadata and optional configuration. The configuration to use to process the document can be provided using the configuration_id argument. 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, then it will be rejected.

Namespace:  IBM.Watson.DeveloperCloud.Services.Discovery.v1
Assembly:  unity-documentation (in unity-documentation.exe) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public bool AddDocumentUsingConfigFile(
	Discovery.SuccessCallback<DocumentAccepted> successCallback,
	Discovery.FailCallback failCallback,
	string environmentID,
	string collectionID,
	byte[] contentData,
	string contentMimeType,
	string configurationFilePath,
	string metadata = null,
	Dictionary<string, Object> customData = null
)

Parameters

successCallback
Type: IBM.Watson.DeveloperCloud.Services.Discovery.v1.Discovery.SuccessCallback<DocumentAccepted>
The success callback.
failCallback
Type: IBM.Watson.DeveloperCloud.Services.Discovery.v1.Discovery.FailCallback
The fail callback.
environmentID
Type: System.String
The environment identifier.
collectionID
Type: System.String
The collection identifier.
contentData
Type:System.Byte[]
A byte array of content to be ingested.
contentMimeType
Type: System.String
The mimeType of the content data to be ingested.
configurationFilePath
Type: System.String
The file path to the configuration to use to process the document.
metadata (Optional)
Type: System.String
If you're using the Data Crawler to upload your documents, you can test a document against the type of metadata that the Data Crawler might send. The maximum supported metadata file size is 1 MB. Metadata parts larger than 1 MB are rejected. Example: { "Creator": "Johnny Appleseed", "Subject": "Apples" }
customData (Optional)
Type: System.Collections.Generic.Dictionary<String, Object>
Optional custom data.

Return Value

Type: Boolean
True if the call succeeds, false if the call is unsuccessful.
See Also