Insert
Inserts a document into the InfoArchive repository.
Type: Asynchronous
Parameter Name | Description | Required |
---|---|---|
Config
|
A base-64 encoded configuration. The configuration parameters that are set override the same parameters in the connector's configuration file. | No |
ConfigSection
|
The name of the task section in the connector's configuration file to use to insert the documents. | Yes |
failedDirectory
|
The directory in which the action reports failures. | No |
InsertXML
|
XML that describes how and where to add each document, all the metadata, and optionally, a file to insert for each document. Some connectors require a file. You must provide the data in XML format, as follows: <InsertXML> <insert> <reference>reference</reference> <section>configsection</section> <property name="propname" value="propvalue"/> <!-- ... --> <metadata name="fieldname" value="fieldvalue"/> <!-- ... --> <xmlmetadata> <fieldname>fieldvalue</fieldname> </xmlmetadata> <file> <type>type</type> <displayname>filename</displayname> <content>content</content> </file> <insert_id>012345</insert_id> </insert> <!-- ... --> </InsertXML> Most of the tags are optional. You can omit the
|
Yes |
Override_Config_Parameters
|
Any other action parameters that you set override settings in the connector's configuration file. For example: /action=fetch&fetchaction=... where |
No |
Example
To insert a file into InfoArchive, you could construct the following insertXML
.
<insertXML> <insert> <reference>MyRef1</reference> <file> <type>file</type> <displayname>recording.mp3</displayname> <content>pathToFileOnDisk.mp3</content> </file> <xmlmetadata> <field1>123</field1> </xmlmetadata> </insert> </insertXML>
The XML is then used in the Insert
action. For example, if you save the XML in a file named my.xml
, you could use the command-line utility curl
to send the action as follows:
curl http://localhost:7188/action=Fetch --data-urlencode FetchAction=Insert --data-urlencode ConfigSection=MyTask --data-urlencode InsertXML@my.xml
Response
This action is asynchronous, so InfoArchive Connector always returns success accompanied by a token. You can use this token with the QueueInfo action to retrieve the status of your request.