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
| Parameter | Type | Description |
|---|---|---|
entryIds | string | Comma-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
| Parameter | Type | Description |
|---|---|---|
refId | string | The 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
| Parameter | Type | Required | Description |
|---|---|---|---|
entryId | string | Yes | Entry to clone |
cloneOptions | array | No | Array 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:
| itemType | Component | Default Behavior |
|---|---|---|
1 | Users (ownership) | Copied — exclude to use current KS user as owner |
2 | Categories | Copied — exclude to remove category assignments |
3 | Child entries | NOT copied — must explicitly include (rule=0) |
4 | Access control | Copied — exclude to use account default |
5 | Custom metadata | Copied — exclude to remove metadata profiles |
6 | Flavors | Copied — exclude to create entry with NO_CONTENT status |
7 | Captions | Copied — exclude to remove caption assets |
Plugin-provided clone options (available when cue point plugins are enabled):
| itemType | Component |
|---|---|
adCuePoint.AD_CUE_POINTS | Ad cue points |
annotation.ANNOTATION_CUE_POINTS | Annotation cue points |
codeCuePoint.CODE_CUE_POINTS | Code cue points |
thumbCuePoint.THUMB_CUE_POINTS | Thumbnail cue points |
Clone vs. KalturaEntryResource:
baseEntry.clone | media.addContent with KalturaEntryResource | |
|---|---|---|
| Result | Full copy with metadata, categories, captions, cue points | New entry with only the source file (content only) |
| Metadata | All fields preserved | Fresh empty entry you define |
| Flavors | All flavors copied instantly | Re-transcodes from source |
| Status | READY immediately (if source is READY) | Goes through ingestion pipeline |
| Control | Include/exclude components granularly | Only 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
| Parameter | Type | Description |
|---|---|---|
entryId | string | Entry to export |
storageProfileId | int | Target storage profile ID |
Exports the entry's assets to a configured remote storage profile (e.g., S3, SFTP).