Insert
Inserts a document or documents into the data repository (Dropbox).
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 Dropbox for Business, you could construct the following XML. For more information about building the XML, see Insert Items into Dropbox.
<insertXML> <insert> <property name="PATH" value="/folder/file.txt"/> <property name="TEAM_MEMBER_ID" value="12345ABCD"/> <file> <type>content</type> <content>SGVsbG8gV29ybGQNCg==</content> </file> </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:7030/action=Fetch --data-urlencode FetchAction=Insert --data-urlencode ConfigSection=MyTask --data-urlencode InsertXML@my.xml
Response
This action is asynchronous, so Dropbox Connector always returns success accompanied by a token. You can use this token with the QueueInfo action to retrieve the status of your request.