AdmiralCloud Developer Platform
API v5

Introduction

A mediahub is a curated, channel-based content hub that you can publish to internal or external audiences. It consists of one or more channels, each containing a set of media containers (images, videos, audio, or documents). Mediahubs are typically used to power branded portals, press areas, or partner extranets.

This tutorial walks through the steps required to create a mediahub from scratch: creating the mediahub container, setting up a channel, uploading media, and adding it to the channel.

Procedure

Create a mediacontainer of type mediahub

{
  type: "mediahub"
}

Create a channel and connect it to the mediahub

You can create a channel without any payload:

{}

It is recommended to add a title for this channel using metadata model:

{
  title: "channel_name",
  content: "My channel name",
  language: "uni",
  channelId: NEW-CHANNEL-ID (from call above)
}

Create a mediacontainer of type image, video, audio or document

Add mediacontainer to the new channel

Use the mediacontainer batch update process to add (or remove) mediacontainers to a channel. The batch update request returns a jobId. You can check activities for this job id to determine whether the job has finished.

After the initial job which relates mediacontainers to a channel, another job starts that updates the Elasticsearch index with this new relation. This job runs with the same jobId as the batch update job only that it if suffixed with a number like this ":NUMBER". After all activities/jobs with a jobId starting with the initial jobId are done, the update is externally available.

{
  updateParams: {
    channel: {
      channelId: 456
      addMode: 0,
      language: ["en""],
      start: UNIX-TIMESTAMP
    }
  },
  ids: [1,2,3]
}