Import videos

POST

An import represents the process of uploading and indexing all videos from the specified integration. This method initiates an asynchronous import and returns two lists:

  • Videos that will be imported.
  • Videos that will not be imported, typically due to unmet prerequisites.

The actual uploading and indexing of videos occur asynchronously after you invoke this method. To monitor the status of each upload after invoking this method, use the Retrieve import status method.

Notes
  • Before importing videos, you must set up an integration. For details, see the Set up an integration section.
  • The videos you wish to upload must meet the requirements in the Prerequisites section of the Upload single videos page.
  • By default, the platform checks for duplicate files using hashes within the target index and will not upload the same video to the same index twice. However, the same video can exist in multiple indexes. To bypass duplicate checking entirely and import duplicate videos into the same index, set the value of the incremental_import parameter to false.
  • Only one import job can run at a time. To start a new import, wait for the current job to complete. Use the GET method of the /tasks/transfers/import/{integration-id}/logs endpoint to retrieve a list of your import jobs, including their creation time, completion time, and processing status for each video file.

Path parameters

integration-idstringRequired

The unique identifier of the integration for which you want to import videos. You can retrieve it from the Integrations page.

Request

This endpoint expects an object.
index_idstringRequired

The unique identifier of the index to which the videos are being uploaded.

incremental_importbooleanOptionalDefaults to true

Specifies whether or not incremental sync is enabled. If set to false, the platform will synchronize all the files in the bucket.

Default: true.

retry_failedbooleanOptionalDefaults to false

Determines whether the platform retries failed uploads. When set to true, the platform attempts to re-upload files that failed during the initial upload process.

Default: false.

user_metadatamap from strings to anyOptional

Metadata that helps you categorize your videos. You can specify a list of keys and values. Keys must be of type string, and values can be of the following types: string, integer, float or boolean.

Notes
  • The metadata you specify when calling this method applies to all videos imported in this request.
  • If you want to store other types of data such as objects or arrays, you must convert your data into string values.
  • You cannot override any of the predefined metadata (example: duration, width, length, etc) associated with a video.

Response

An import has successfully been initiated.

failed_fileslist of objectsOptional

A list of the video files that failed to import. Typically, these files did not meet the upload requirements. To resolve this, review the requirements listed in the Prerequisites section of the Upload single videos page.

videoslist of objectsOptional

A list of the videos that will be uploaded and indexed.

Errors

Built with