Insert Folders and Assets
The connector's insert fetch action inserts information into OpenText Media Management.
To use the insert
action, you must construct some XML that specifies how and where to add the item, and the information to insert. You must add the XML to the action as the value of the insertXML
action parameter.
The XML contained in the insertXml
parameter must be URL encoded before being used in the action command. For example:
http://host:port/action=Fetch&FetchAction=Insert &ConfigSection=MyTask &InsertXML=[URL encoded XML]
Insert a Folder
To insert a folder into OpenText Media Management, your XML must include the following properties:
Type | Required | Name | Description |
---|---|---|---|
Property | Yes | PARENT_FOLDER_ID
|
The folder in which to create the new folder. |
Property | Yes | SECURITY_POLICY
|
The security policy for the new folder. |
Property | Yes | NAME
|
The name of the new folder. |
Property | No | FOLDER_TYPE
|
The type of folder to insert. The default value is ARTESIA.BASIC.FOLDER . |
For example:
<insertXML> <insert> <reference>InsertFolder</reference> <!-- required --> <property name="PARENT_FOLDER_ID" value="..."/> <property name="SECURITY_POLICY" value="1"/> <property name="NAME" value="MyFolder"/> <!-- optional --> <property name="FOLDER_TYPE" value="ARTESIA.BASIC.FOLDER"/> <xmlmetadata> <Basic_Folder_Information> <Description>Inserted folder description</Description> </Basic_Folder_Information> </xmlmetadata> </insert> </insertXML>
Insert an Asset
To insert an asset into OpenText Media Management, your XML must include the following properties:
Type | Required | Name | Description |
---|---|---|---|
Property | Yes | PARENT_FOLDER_ID
|
The folder in which to insert the asset. |
Property | Yes | SECURITY_POLICY
|
The security policy for the new asset. |
Property | Yes | IMPORT_TEMPLATE
|
The ID of the import template to use. |
Property | No | MIME_TYPE
|
The MIME type of the new asset. The default value is application/octet-stream . |
Property | No | METADATA_MODEL
|
The metadata model to use when creating the new folder. The default value is ARTESIA.MODEL.DEFAULT . |
For example:
<insertXML> <insert> <reference>InsertAsset</reference> <!-- required --> <property name="PARENT_FOLDER_ID" value="..."/> <property name="SECURITY_POLICY" value="1"/> <property name="IMPORT_TEMPLATE" value="Basic"/> <!-- optional --> <property name="MIME_TYPE" value="text/plain"/> <property name="METADATA_MODEL" value="ARTESIA.MODEL.DEFAULT"/> <xmlmetadata> <Asset> <Name>insertedAssetName.txt</Name> </Asset> </xmlmetadata> <file> <type>file</type> <displayname>HelloWorld.txt</displayname> <content>D:/HelloWorld.txt</content> </file> </insert> </insertXML>