Insert

Inserts an item into an OpenText Core Content 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 insert tag if you are inserting a single document.

  • reference, property, metadata, xmlmetadata. The usage of these tags depends on the connector. For more information about using the insert fetch action, refer to Administration Guide for your connector. xmlmetadata is an alternative to metadata that you can use to provide metadata as structured XML, rather than providing the name and value for a single field at a time.
  • section. The name of the task section (in the configuration file) to use to insert the document. The default value is specified by the ConfigSection action parameter, but if you specify a different value in the InsertXML, the value in the InsertXML takes priority.
  • file. Specifies information about the file to insert. If you include the <file> element, you must include at least <content>.

    • type. The type element specifies the type of data included in the following <content> element. Use one of the following values:

      • file - The content element contains a file name. The file is not owned by the connector, so the connector does not delete it after the action succeeds.
      • tempfile - The content element contains a file name. The file is owned by the connector and is deleted after the action succeeds.
      • content - The content element contains the body of the file base64 encoded.
      • drecontent - The content element contains the document DRECONTENT.
      • dataid - The file has been previously sent to the connector's DataPort with the dataid set in the content element.
    • displayname - used for logging and when writing the data to a temporary file.
  • insert_id. This tag is optional and specifies a unique ID for the document. The response to the insert fetch action reports which documents were successfully inserted by returning the specified IDs.
Yes
Override_Config_Parameters

Any other action parameters that you set override settings in the connector's configuration file. For example:

/action=fetch&fetchaction=...
&[Section]Parameter=Value

where [Section] (optional) is the name of a configuration file section, Parameter is the name of a configuration parameter, and Value is the parameter value.

No

Example

For examples that demonstrate how to use the insert action, see Insert Information into OpenText Core Content.

Response

This action is asynchronous, so OpenText Core Content Connector always returns success accompanied by a token. You can use this token with the QueueInfo action to retrieve the status of your request.