Skip to main content
View as Markdown

Cross-Type Entry Operations (baseEntry) - Content Management

Cross-Type Entry Operations (baseEntry)​

The baseEntry service provides operations that work across all entry types (media, document, data).

baseEntry.getByIds -- Batch Retrieve Multiple Entries​

POST /api_v3/service/baseEntry/action/getByIds
ParameterTypeDescription
entryIdsstringComma-separated entry IDs

Returns an array of entries in a single request. More efficient than multiple media.get calls.

curl -X POST "$KALTURA_SERVICE_URL/service/baseEntry/action/getByIds" \
-d "ks=$KALTURA_KS" \
-d "format=1" \
-d "entryIds=$ENTRY_ID_1,$ENTRY_ID_2,$ENTRY_ID_3"

baseEntry.listByReferenceId -- Find by External Reference​

POST /api_v3/service/baseEntry/action/listByReferenceId
ParameterTypeDescription
refIdstringThe reference ID to search for

Business scenario -- CMS integration: Your CMS stores Kaltura entry IDs alongside its own content IDs. When syncing, look up entries by your CMS's reference ID to avoid maintaining a separate mapping table.

baseEntry.clone -- Deep Clone an Entry​

POST /api_v3/service/baseEntry/action/clone
ParameterTypeRequiredDescription
entryIdstringYesEntry to clone
cloneOptionsarrayNoArray of clone option items controlling which components to include/exclude

Creates a full deep copy of the entry including all metadata, flavor assets, thumbnails, captions, categories, access control, and custom metadata. The cloned entry gets a new ID with statistics reset to zero.

Default clone (copies everything):

curl -X POST "$KALTURA_SERVICE_URL/service/baseEntry/action/clone" \
-d "ks=$KALTURA_KS" \
-d "format=1" \
-d "entryId=$SOURCE_ENTRY_ID"

Clone with options — exclude specific components:

Each clone option item has itemType (what component) and rule (0 = include, 1 = exclude):

curl -X POST "$KALTURA_SERVICE_URL/service/baseEntry/action/clone" \
-d "ks=$KALTURA_KS" \
-d "format=1" \
-d "entryId=$SOURCE_ENTRY_ID" \
-d "cloneOptions[0][objectType]=KalturaBaseEntryCloneOptionComponent" \
-d "cloneOptions[0][itemType]=5" \
-d "cloneOptions[0][rule]=1" \
-d "cloneOptions[1][objectType]=KalturaBaseEntryCloneOptionComponent" \
-d "cloneOptions[1][itemType]=2" \
-d "cloneOptions[1][rule]=1"

This clones the entry while excluding custom metadata (itemType=5) and category assignments (itemType=2).

Clone with child entries (multi-stream, parent-child hierarchies):

curl -X POST "$KALTURA_SERVICE_URL/service/baseEntry/action/clone" \
-d "ks=$KALTURA_KS" \
-d "format=1" \
-d "entryId=$SOURCE_ENTRY_ID" \
-d "cloneOptions[0][objectType]=KalturaBaseEntryCloneOptionComponent" \
-d "cloneOptions[0][itemType]=3" \
-d "cloneOptions[0][rule]=0"

Clone option item types:

itemTypeComponentDefault Behavior
1Users (ownership)Copied — exclude to use current KS user as owner
2CategoriesCopied — exclude to remove category assignments
3Child entriesNOT copied — must explicitly include (rule=0)
4Access controlCopied — exclude to use account default
5Custom metadataCopied — exclude to remove metadata profiles
6FlavorsCopied — exclude to create entry with NO_CONTENT status
7CaptionsCopied — exclude to remove caption assets

Plugin-provided clone options (available when cue point plugins are enabled):

itemTypeComponent
adCuePoint.AD_CUE_POINTSAd cue points
annotation.ANNOTATION_CUE_POINTSAnnotation cue points
codeCuePoint.CODE_CUE_POINTSCode cue points
thumbCuePoint.THUMB_CUE_POINTSThumbnail cue points

Clone vs. KalturaEntryResource:

baseEntry.clonemedia.addContent with KalturaEntryResource
ResultFull copy with metadata, categories, captions, cue pointsNew entry with only the source file (content only)
MetadataAll fields preservedFresh empty entry you define
FlavorsAll flavors copied instantlyRe-transcodes from source
StatusREADY immediately (if source is READY)Goes through ingestion pipeline
ControlInclude/exclude components granularlyOnly select which flavor to copy

Use baseEntry.clone when duplicating a complete entry with all its assets and metadata. Use KalturaEntryResource when you need a new entry with independent metadata that shares only the source file.

Business scenario — multi-tenant distribution: A corporate training team clones a compliance video to 50 department accounts, each clone inheriting categories and custom metadata but with independent analytics tracking.

baseEntry.recycle / baseEntry.restoreRecycled​

# Move to recycle bin (soft delete with recovery option)
curl -X POST "$KALTURA_SERVICE_URL/service/baseEntry/action/recycle" \
-d "ks=$KALTURA_KS" \
-d "format=1" \
-d "entryId=$KALTURA_ENTRY_ID"

# Restore from recycle bin
curl -X POST "$KALTURA_SERVICE_URL/service/baseEntry/action/restoreRecycled" \
-d "ks=$KALTURA_KS" \
-d "format=1" \
-d "entryId=$KALTURA_ENTRY_ID"

baseEntry.export -- Export to Remote Storage​

POST /api_v3/service/baseEntry/action/export
ParameterTypeDescription
entryIdstringEntry to export
storageProfileIdintTarget storage profile ID

Exports the entry's assets to a configured remote storage profile (e.g., S3, SFTP).