REST Resource: projects.locations.corpora

Resource: Corpus

Corpus is a set of media contents for management. Within a corpus, media shares the same data schema. Search is also restricted within a single corpus.

JSON representation
{
  "name": string,
  "displayName": string,
  "description": string,
  "defaultTtl": string,
  "type": enum (Type),
  "searchCapabilitySetting": {
    object (SearchCapabilitySetting)
  }
}
Fields
name

string

Resource name of the corpus. Form: projects/{project_number}/locations/{locationId}/corpora/{corpus_id}

displayName

string

Required. The corpus name to shown in the UI. The name can be up to 32 characters long.

description

string

Optional. Description of the corpus. Can be up to 25000 characters long.

defaultTtl

string (Duration format)

Optional. The default TTL value for all assets under the corpus without a asset level user-defined TTL. For STREAM_VIDEO type corpora, this is required and the maximum allowed defaultTtl is 10 years.

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

type

enum (Type)

Optional. Type of the asset inside corpus.

searchCapabilitySetting

object (SearchCapabilitySetting)

Default search capability setting on corpus level.

Type

Type of the asset inside the corpus.

Enums
TYPE_UNSPECIFIED The default type, not supposed to be used. If this default type is used, the corpus will be created as STREAM_VIDEO corpus.
STREAM_VIDEO Asset is a live streaming video asset.
IMAGE Asset is an image.
VIDEO_ON_DEMAND Asset is a video asset.

SearchCapabilitySetting

Setting for search capability to enable.

JSON representation
{
  "searchCapabilities": [
    {
      object (SearchCapability)
    }
  ]
}
Fields
searchCapabilities[]

object (SearchCapability)

The metadata of search capability to enable.

SearchCapability

The capability and metadata of search capability.

JSON representation
{
  "type": enum (Type)
}
Fields
type

enum (Type)

The search capability to enable.

Type

Capability to perform different search on assets.

Enums
TYPE_UNSPECIFIED Unspecified search capability, should never be used.

Methods

analyze

Analyzes a corpus.

create

Creates a corpus inside a project.

delete

Deletes a corpus only if its empty.

get

Gets corpus details inside a project.

list

Lists all corpora in a project.

patch

Updates a corpus in a project.

searchAssets

Search media asset.