Method: projects.locations.corpora.assets.clip

Generates clips for downloading. The api takes in a time range, and generates a clip of the first content available after startTime and before endTime, which may overflow beyond these bounds. Returned clips are truncated if the total size of the clips are larger than 100MB.

HTTP request

POST https://visionai.googleapis.com/v1alpha1/{name=projects/*/locations/*/corpora/*/assets/*}:clip

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. The resource name of the asset to request clips for. Format: projects/{project_number}/locations/{locationId}/corpora/{corpus_id}/assets/{assetId}

Request body

The request body contains data with the following structure:

JSON representation
{
  "temporalPartition": {
    object (TemporalPartition)
  }
}
Fields
temporalPartition

object (TemporalPartition)

Required. The time range to request clips for.

Response body

Response message for assets.clip API.

If successful, the response body contains data with the following structure:

JSON representation
{
  "timeIndexedUris": [
    {
      object (TimeIndexedUri)
    }
  ]
}
Fields
timeIndexedUris[]

object (TimeIndexedUri)

A list of signed uris to download the video clips that cover the requested time range ordered by time.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • visionai.assets.clip

For more information, see the IAM documentation.

TimeIndexedUri

Signed uri with corresponding time range.

JSON representation
{
  "temporalPartition": {
    object (TemporalPartition)
  },
  "uri": string
}
Fields
temporalPartition

object (TemporalPartition)

Time range of the video that the uri is for.

uri

string

Signed uri to download the video clip.