Skip to main content
Skip table of contents

Exports [VC 21.3.1 GEN]

An item export is the process of copying a file from storage to a location accessible by the system.

Exporting items

Exporting the files of an item is an asynchronous operation that is performed by an EXPORT job. The export resource allows you to:

  • Export files for an item.

  • Export files for the items in a specific collection or library.

  • Export files for specific shapes only.

  • Export partial file content, by specifying a start and end time code.

There are a number of operations that can be performed as part of an export. An export job can:

  • Restore files from archive if necessary.

  • Transcode into the selected formats.

  • Rewrite the XMP in the exported files so that it matches the XMP in the item metadata.

  • Create a sidecar XML file containing the item metadata.

  • Transfer the files to the final location.

Example

To export the original shape of a specific item to a directory on the local file system:

NONE
POST /item/VX-191440/export?uri=file:///srv/exported/&tag=original
HTML/XML
<JobDocument xmlns="http://xml.vidispine.com/schema/vidispine">
  <jobId>VX-169822</jobId>
  <user>admin</user>
  <started>2014-07-03T09:39:52.969Z</started>
  <status>READY</status>
  <type>EXPORT</type>
  <priority>MEDIUM</priority>
</JobDocument>

Export locations

It is possible to pre-define named export locations. When starting an export job, the location name can be passed as a parameter, the files will then be exported to the URI associated with the export location.

NONE
PUT /API/export-location/default-exports
Content-Type: application/xml

<ExportLocationDocument xmlns="http://xml.vidispine.com/schema/vidispine">
  <uri>file:///srv/exported/</uri>
</ExportLocationDocument>
NONE
POST /item/VX-191440/export?locationName=default-exports&tag=original
HTML/XML
<JobDocument xmlns="http://xml.vidispine.com/schema/vidispine">
  <jobId>VX-169824</jobId>
  <user>admin</user>
  <started>2014-07-03T09:49:12.972Z</started>
  <status>READY</status>
  <type>EXPORT</type>
  <priority>MEDIUM</priority>
</JobDocument>

See the export location resource for more information.

File naming scripts

Export locations can have a JavaScript associated with them. These work the same way as file name scripts on storages (see Naming files on storage). The difference is that for export locations, the script will not be retried if there is a filename conflict. That is, if the filename generated by the script is already taken, then the existing file will be overwritten.

There are two ways to add a script to an export location, either using XML, or by using the script resource.

Example

Adding a script to an export location using XML.

NONE
PUT /export-location/External_FTP HTTP/1.1
Content-Type: application/xml

<ExportLocationDocument xmlns="http://xml.vidispine.com/schema/vidispine">
  <uri>ftp://user:password@10.2.23.25/export/</uri>
  <script>filename = context.getOriginalFilename() + "." + context.getExtension();</script>
</ExportLocationDocument>

Example

Adding a script to an export location using the script REST resource.

NONE
PUT /export-location/External_FTP/script HTTP/1.1
Content-Type: text/plain

filename = context.getOriginalFilename() + "." + context.getExtension();

Export templates

Developer preview

Export templates are a way of expressing complex export content. That is, the exact structure of the files exported can be described by an XML or JSON structure. See Export Templates.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.