Skip to main content
View as Markdown

API Response Format (JSON) - Content Management

API Response Format (JSON)​

The API typically returns a JSON object structured as follows:

  • totalCount (Integer): The total number of results matching the query, irrespective of pagination.
  • objects (Array): An array where each element represents a matched item (e.g., an entry result).
    • object (Object): The core Kaltura object itself (e.g., KalturaMediaEntry, KalturaCategory) containing its standard properties (id, name, description, createdAt, etc.).
    • highlight (Array, optional): An array of KalturaESearchHighlight objects, present if addHighlight was requested.
      • fieldName (String): The field where a match was found (e.g., "name", "description", "captions_content").
      • hits (Array): An array of KalturaString objects, each containing:
        • value (String): The text snippet with the match highlighted via <em>...</em> tags.
    • itemsData (Array, optional): Contains more granular results when searching within nested data like captions or metadata. Each element is a KalturaESearchItemDataResult.
      • totalCount (Integer): Number of specific items found (e.g., matching caption lines).
      • items (Array): Array of specific data items (e.g., KalturaESearchCaptionItemData, KalturaESearchMetadataItemData). These objects contain details like the specific caption line text, start/end times, or metadata field values. They might also contain their own nested highlight array.
      • itemsType (String): Indicates the type of items (e.g., "caption", "metadata").
  • aggregations (Array, optional): Present if aggregations were requested. Contains KalturaESearchAggregationResponseItem objects.
    • fieldName (String): The field used for aggregation (e.g., "media_type").
    • buckets (Array): Array of KalturaESearchAggregationBucket objects.
      • value (String): The specific value for the bucket (e.g., "1" for video media type).
      • count (Integer): The number of results falling into this bucket.