Parameter and Command Reference > CFS Connector Actions > Insert Fetch Action

Insert Fetch Action
This action is used to insert a document or documents into a repository.
Type: Asynchronous
Optional Base64 encoded configuration file. If this parameter is specified, then the encoded configuration options is used instead of the options in the connector configuration file.
XML containing all the properties to determine how and where to add each document, all the metadata, and optionally, a file to insert for each document. Some connectors expect a file to be provided.
  <property name="propname" value="propvalue"/>
  <!-- ... -->
  <metadata name="fieldname" value="fieldvalue"/>
  <!-- ... -->
 <!-- ... -->
ownfile. If ownfile is true, this file is deleted after it has been inserted. By default, this is false.
isfilename. If isfilename is true, the content tag contains the full path to the file. If isfilename is false, the content tag contains the entire file base64 encoded. The ownfile tag is ignored in this case.
insert. The insert tag can be omitted if a single document is being inserted.
reference, property, metadata. The usage of these tags depends on the connector used.
In this example, the object is to insert a file with the reference C:\Autonomy\FileSystemConnectorCFS\dir1\newfile.txt with the content This is my file. First, construct the InsertXML:
  <reference>C:\Autonomy\FileSystemConnectorCFS\dir1\newfile.txt</   reference>
Note that the content This is my file is base64 encoded. The XML is then escaped and used in the Insert action.
As this is an asynchronous action, you receive a token in response to the request. A sample response to the action (as retrieved using the queueinfo action) appears below.
This action shows that the action has completed and that one document has been inserted, and gives the identifier of the new document.
   added="0"          collected="0"       deleted="0"
   errors="0"         holds="0"           ingestadded="0"
   ingestdeleted="0"  ingestfailed="0"    ingestupdated="0"
   inserted="1"       releasedholds="0"   seen="0"
   task="DIR1"        unchanged="0"       updated="0"/>
   PGlkIHM9IkRJUjEiIHI9IkM6XEF1dG9ub215XEZpbGVTeXN0ZW1Db25uZWN0b3J   DRlNcZGlyMVxuZXdmaWxlLnR4dCIvPg==
 <queued_time>2009-Oct-15 16:36:32</queued_time>
 <process_start_time>2009-Oct-15 16:36:32</process_start_time>
 <process_end_time>2009-Oct-15 16:36:32</process_end_time>
Related Topics