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

Collect Fetch Action 
This action is used to retrieve documents and metadata by their Identifiers from a repository and send the documents to be ingested to a specified location.
http://host:port/action=Fetch&FetchAction=Collect
                  [&Config=Base64_Config]
                  [&Identifiers=Identifier_CSV]
                  [&IdentifiersXML=Identifier_XML]
                  [&Collectactions=Document_Action_CSV]
                  [&Destination=UNC_Path]
Type: Asynchronous
 
Optional Base64 encoded configuration file. If this parameter is specified, then the encoded configuration options are used instead of the options in the connector configuration file.
This parameter can be specified in addition to the Identifiers parameter and specifies additional identifiers to collect along with a set of custom metadata to be associated with each collected document.
 <identifier value="[AUTN_IDENTIFIER1]">
  <metadata name="[CustomField1]"       value="[CustomFieldValue1_1]"/>
  <metadata name="[CustomField1]"       value="[CustomFieldValue1_2]"/>
  <!-- ... -->
 </identifier>
 <identifier value="[AUTN_IDENTIFIER2]">
  <metadata name="[CustomField1]"       value="[CustomFieldValue2_1]"/>
  <!-- ... -->
 </identifier>
 <!-- ... -->
To add a document field value as part of the destination, use the tag <DOC:FIELDNAME> within the string. To add an identifier field value as part of the destination use the tag <ID:FIELDNAME> within the string.
Where a field can have multiple values or is a CSV, multiple destinations are created and each gets a copy of the document. A CSV can be specified by preceding the colon with the CSV separator character. Example: <ID,:SOURCE>.
This parameter specifies actions to perform on documents prior to transferring them to their destination. This can be a list of document actions of the form action:parameters processed from left to right. The available document actions are:
*
META. Add a custom field to the document, specified as META:Fieldname=FieldValue
*
ZIP. Add the document to a zip file, specified as ZIP:Filename[:Password]
*
LUA. Execute a Lua script on the document, specified as LUA:Luascript.
Example: To add a field CATEGORY=FILESYSTEM to every document, zip all documents with a password and add a field COLLECTTIME=1234567890 to the zip, specify the collect action as:
CollectActions=META:CATEGORY=FILESYSTEM,ZIP:Output.zip:password,META:COLLECTTIME=1234567890
Example
http://localhost:1234/action=Fetch&FetchAction=Collect&Identifiers=PGlkIHM9IkRJUjEiIHI9IkM6XEF1dG9ub215XEZpbGVTeXN0ZW1Db25uZWN0b3JDRlNcZGlyMVxmaWxlOS50eHQiLz4%3D,PGlkIHM9IkRJUjEiIHI9IkM6XEF1dG9ub215XEZpbGVTeXN0ZW1Db25uZWN0b3JDRlNcZGlyMVxmaWxlOC50eHQiLz4%3D&Destination=C:\Autonomy\collected
Response
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.
In this example the tokens for both documents appear between <success> tags showing that they were collected successfully. The documents were output to C:\Autonomy\collected along with stub files containing their metadata.
<action>
 <documentcounts>
  <documentcount
   added="0"          collected="2"       deleted="0"
   errors="0"         holds="0"           ingestadded="0"
   ingestdeleted="0"  ingestfailed="0"   ingestupdated="0"
   inserted="0"       releasedholds="0"   seen="0"
   task="DIR1"        unchanged="0"       updated="0"/>
 </documentcounts>
 <fetchaction>COLLECT</fetchaction>
 <tasks>
  <success>
   PGlkIHM9IkRJUjEiIHI9IkM6XEF1dG9ub215XEZpbGVTeXN0ZW1Db25uZWN0b3J   DRlNcZGlyMVxmaWxlOC50eHQiLz4=
  </success>
  <success>
   PGlkIHM9IkRJUjEiIHI9IkM6XEF1dG9ub215XEZpbGVTeXN0ZW1Db25uZWN0b3J   DRlNcZGlyMVxmaWxlOS50eHQiLz4=
  </success>
 </tasks>
 <token>MTAuMi4xMDUuMzQ6MTIzNDpGRVRDSDotMTI2NTE0MTI5NA==</token>
 <status>Finished</status>
 <queued_time>2009-Oct-15 16:02:53</queued_time>
 <time_in_queue>0</time_in_queue>
 <process_start_time>2009-Oct-15 16:02:53</process_start_time>
 <time_processing>0</time_processing>
 <process_end_time>2009-Oct-15 16:02:53</process_end_time>
</action>
 
 
*