Auto-import rules can be used to enable automatic import of new files added to a storage.
Reading/modifying auto-import rules
Set an auto-import rule
PUT /storage/(storage-id)/auto-import/ Sets the auto-import rule for the specified storage. Accepts: application/xml, application/json – AutoImportRuleDocument Role: _storage_write
In order for auto imports to work the showImportables property must be set to true on the storage.
Example
PUT /storage/VX-5/auto-import
Content-Type: application/xml
<AutoImportRuleDocument xmlns="http://xml.vidispine.com/schema/vidispine">
<metadata>
<timespan start="-INF" end="+INF">
<field>
<name>title</name>
<value>This is an auto-imported item.</value>
</field>
</timespan>
</metadata>
<tag>myflvtag</tag>
</AutoImportRuleDocument>
Retrieve all auto-import rules
GET /storage/auto-import/ Returns all known auto-import rules. Produces: application/xml, application/json – AutoImportRuleListDocument Role: _storage_read
Retrieve an auto-import rule
GET /storage/(storage-id)/auto-import/ Returns the auto-import rule for a storage if there is one. Produces: application/xml, application/json – AutoImportRuleDocument Role: _storage_read
Disable an auto-import rule
PUT /storage/(storage-id)/auto-import/disable Stops auto-import jobs from being created for new files on this storage. Status Codes: 404 Not found – This storage does not have an auto-import rule. Role: _storage_write
Enable an auto-import rule
PUT /storage/(storage-id)/auto-import/enable Resumes creation of auto-import jobs for files on this storage. Status Codes: 404 Not found – This storage does not have an auto-import rule. Role: _storage_write
Delete an auto-import rule
DELETE /storage/(storage-id)/auto-import/ Removes any auto-import rule that might exist on the storage. Role: _storage_write