Publishing API

Publishing API

INTRODUCTION

This API is used to query for media assets that are published. The API includes various calls for getting data for published assets in your account.


API PATH

/api/publishing/


API: VERSION 05

GET ASSETS

Info
Notice that getAssets version 05 supports series, podcasts and subgroups, while getAssets versions 03 and earlier do not.

REQUEST

/api/publishing/getAssets?version=05

Parameters:
NameValueRequirementInfo
organizationIdnumberMandatory 
tokenstringMandatory 
groupItemIdnumber(or comma separated multiple)MandatoryId for the group item for which assets are needed. Can be single ID or comma separated list of IDs
userIdnumberOptionalIf this parameter is not supplied then only public assets will be returned
languageIdstringOptional 
userAgentstringOptionalIf given, will take precedence over the auto-detected device type
keywordstringOptionalwill search keyword in name and description
orderBystringOptionalValid values: "publishStart", "title"
orderstringOptional (Mandatory if orderBy given)"asc", "desc"
limitnumberOptionalnumber of items needed
seriesboolean
OptionalTRUE: will only fetch the latest asset in series. FALSE: will fetch all assets.
podcastsboolean
OptionalTRUE: asset data has podcast group details. FALSE: Will only have basic info
recursiveboolean
OptionalTRUE: will fetch assets from subgroups too


A token consists of 42 character long hex value. The value has two different parts:
  1. Version [8 bits / 2 chars] - current version
  2. Current time [32 bits / 8 chars] - current timestamp in number of seconds since 1970 UTC
  3. Signature [128 bits / 32 chars] - the MD5 hash of (organizationId + ":" + groupItemId + ":" + Current time + ”:” + Key), where ’+’ is a string concatenation

Key - A secret key that is only present on the client creating the token and the server verifying the token and is defined for the organization.

Example:
Version = ”05”
organizationId = ”14806”
groupItemId = ”12345”

Current time = 1222516160 (Sat Sep 27 13:49:20 CEST 2008) -> ”48de1dc0”
Key = ”secret”
Signature = MD5("14806:12345:48de1dc0:secret") -> ”cb8fd8167db7e97707301d5a2d03886c”

Then token would be "0548de1dc0cb8fd8167db7e97707301d5a2d03886c".


RESPONSE

RESPONSE INFO
The response of getAssets is based on how the content in configured in Assets Management. Public assets are returned for all users & guests. Private assets are only returned for valid users (so userId has to be supplied in order to retrieve private assets)

SUCCESS

{
  "assets":[
    {
      "coverImageSmall":"",
      "series":[
        {
          "id":1516002,
          "name_stripped":"Kulttuuri ja vapaa-aika",
          "name":"Kulttuuri ja vapaa-aika"
        }
      ],
      "ingress":"ingress",
      "publishEnd":2524608000000,
      "folders":[
        {
          "id":1406601,
          "name_stripped":"Kulttuuri",
          "name":"Kulttuuri"
        },{
          "id":1406605,
          "name_stripped":"Kaupunginvaltuusto",
          "name":"Kaupunginvaltuusto"
        }
      ],
      "date":1594271160000,
      "contentTypes":[],
      "episodeNumber":0,
      "publisher":"Publish company",
      "releaseYear":1997,
      "id":1516501,
      "thumbnailSmall":"https://suiterc.icareus.com/image/image_gallery?img_id=1517207%22,
      "description":"<p>Suspendisse ullamcorper, leo in placerat eleifend. felis tortor. Donec sodales viverra diam vitae dictum.<\/p>",
      "name":"A video with a title",
      "actors":"Mike Miller, Jack Pickelson",
      "accessInfo":{"products":[]},
      "bannerImageSmall":"",
      "groups":"Kulttuuri | Kaupunginvaltuusto | Koulutus","programName":"",
      "isPodcast":false,
      "tags":"",
      "coverImageLarge":"",
      "productionCompany":"",
      "contentRatings":[],
      "isSerie":false,
      "bannerImageLarge":"",
      "isPodcastAsset":false,
      "seasonNumber":0,
      "coverImageMedium":"",
      "director":"Director Joe",
      "podcasts":[],
      "duration":60,
      "views":0,
      "quality":1,
      "thumbnailLarge":"https://suiterc.icareus.com/image/image_gallery?img_id=1517209%22,
      "bannerImageMedium":"",
      "rating":0,
      "groupItemIds":"1406601,1406605,1556001",
      "avMood":"",
      "podcast": {
        "coverImageSmall":"",
        "coverImageLarge":"",
        "coverImageMedium": "",
        "coverImageUrl": "",
        "bannerImageSmall": "",
        "bannerImageMedium": "",
        "bannerImageLarge": "",
        "bannerImageUrl": "",
        "thumbnailSmall": "",
        "thumbnailMedium": "",
        "thumbnailLarge": "",
        "thumbnailImageUrl": "",
        "iconImageUrl": "",
        "id": 500500,
        "title": "Podcast group title",
        "description": "Long description"
      }
    }
  ],
  "status":"ok"
}


Response fields:
Field nameDescription
METADATA 
idAsset's unique id
embedUrlURI if you want to embed asset to your page
IMAGE FIELDS 
bannerImageSmall, bannerImageMedium, bannerImageLargeURI for banner image
coverImageSmall, coverImageMedium, coverImageLargeURI for cover image
thumbnailSmall, thumbnailMedium, thumbnailLargeURI for thumbnail image
ASSET INFOMostly selfexplanatory
name, description, ingress 
actors, director, publisher, productionCompany 
releaseYearReleast year (full year)
durationDuration in seconds
PUBLISH TIMES These are times when asset in available in the service
datePublish start time
PublishEndPublish end time
CATEGORY / GROUP INFO 
foldersList of asset's group (id, name and name_stripped)
groupsList of group's titles separated with |
groupItemsIdsList of group's id's separated with ,
SERIES INFO 
isSerieBoolean value: Does asset belong to any serie
seriesSeries info (id, name, name_stripped)
PODCAST INFO 
isPodcastAssetBoolean value: Is asset a podcast
podcastsPodcast group indo (id, name, name_stripped)
podcastOnly returned if podcasts=true. Returns all information of podcast group (image etc)

ERROR

{
    "message": "Unable to retrieve asset list",
    "status": "error"
}

API: VERSION 03

GET ASSETS

REQUEST

/api/publishing/getAssets?version=03


Parameters:

Name
Value
Requirement
Info
organizationId
number
Mandatory
 
token
string
Mandatory
 
groupItemId
number(or comma separated multiple)
Mandatory
Id for the group item for which assets are needed. Can be single ID or comma separated list of IDs
userId
number
Optional
If this parameter is not supplied then only public assets will be returned
languageId
string
Optional
 
userAgent
string
Optional
If given, will take precedence over the auto-detected device type
keyword
string
Optional
will search keyword in name and description
orderBy
string
Optional
Valid values: "publishStart", "title"
order
string
Optional (Mandatory if orderBy given)
"asc", "desc"
limit
number
Optional Optional
number of items needed

A token consists of 42 character long hex value. The value has two different parts:

  1. Version [8 bits / 2 chars] - current version
  2. Current time [32 bits / 8 chars] - current timestamp in number of seconds since 1970 UTC
  3. Signature [128 bits / 32 chars] - the MD5 hash of (organizationId + ":" + groupItemId + ":" + Current time + ”:” + Key), where ’+’ is a string concatenation

Key - A secret key that is only present on the client creating the token and the server verifying the token and is defined for the organization.

Example:
Version = ”03”
organizationId = ”14806”
groupItemId = ”12345”

Current time = 1222516160 (Sat Sep 27 13:49:20 CEST 2008) -> ”48de1dc0”
Key = ”secret”
Signature = MD5("14806:12345:48de1dc0:secret") -> ”cb8fd8167db7e97707301d5a2d03886c”

Then token would be "0348de1dc0cb8fd8167db7e97707301d5a2d03886c".


RESPONSE

RESPONSE INFO

The response of getAssets is based on how the content in configured in Assets Management. Public assets are returned for all users & guests. Private assets are only returned for valid users (so userId has to be supplied in order to retrieve private assets)


SUCCESS

{
    "assets": [
        {
            "coverImageSmall": "",
            "coverImageLarge": "",
            "coverImageMedium": "",
            "date": 1423489184000,
            "id": 17394,
            "thumbnailSmall": "",
            "thumbnailLarge": "",
            "thumbnailMedium": "",
            "description": "",
            "name": "Test asset 1",
            "groups": "asdasd | asdasd | asdasd | fgsgsdg | asdasd",
            "tags": "",
        },
        {
            "coverImageSmall": "",
            "coverImageLarge": "",
            "coverImageMedium": "",
            "date": 1423489184000,
            "id": 17394,
            "thumbnailSmall": "",
            "thumbnailLarge": "",
            "thumbnailMedium": "",
            "description": "",
            "name": "Test asset 1",
            "groups": "asdasd | asdasd | asdasd | fgsgsdg | asdasd",
            "tags": "",
        }
    ],
    "status": "ok"
 
}

ERROR

{
    "message": "Unable to retrieve asset list",
    "status": "error"
}

GET ASSET

REQUEST

/api/publishing/getAsset?version=03


Parameters:

Name
Value
Requirement
Info
organizationId
number
Mandatory
 
token
string
Mandatory
 
assetId
number
Mandatory
 
languageId
string
Mandatory
 
userAgent
string
Optional
If given, will take precedence over the ato-detected device type

A token consists of 42 character long hex value. The value has two different parts:
  1. Version [8 bits / 2 chars] - current version
  2. Current time [32 bits / 8 chars] - current timestamp in number of seconds since 1970 UTC
  3. Signature [128 bits / 32 chars] - the MD5 hash of (organizationId + ":" + assetId + ":" + languageId + ":" + Current time + ”:” + Key), where ’+’ is a string concatenation
Key - A secret key that is only present on the client creating the token and the server verifying the token and is defined for the organization.

Example:
Version = ”03”
organizationId = ”14806”
assetId = ”12345”
languageId = ”en_US”

Current time = 1222516160 (Sat Sep 27 13:49:20 CEST 2008) -> ”48de1dc0”
Key = ”secret”
Signature = MD5("14806:12345:en_US:48de1dc0:secret") -> ”42f784cca9a80b682991e96a49d1da7e”

Then token would be "0348de1dc042f784cca9a80b682991e96a49d1da7e".


RESPONSE

SUCCESS

{
            "coverImageSmall": "",
            "coverImageLarge": "",
            "coverImageMedium": "",
            "date": 1423489184000,
            "id": 17394,
            "properties": "",
            "thumbnailSmall": "",
            "thumbnailLarge": "",
            "thumbnailMedium": "",
            "description": "",
            "name": "Test asset 1",
            "groups": "asdasd | asdasd | asdasd | fgsgsdg | asdasd",
            "tags": "",
            "status:":"ok"
}

ERROR

{
    "status": "error"
}

GET ASSET PLAYBACK URLS

REQUEST

/api/publishing/getAssetPlaybackUrls?version=03


Parameters:

Name
Value
Requirement
Info
organizationId
number
Mandatory
 
token
string
Mandatory
 
assetId
number
Mandatory
 
userId
number
Optional
 
languageId
string
Optional
 
userAgent
string
Optional
If given, will take precedence over the ato-detected device type

A token consists of 42 character long hex value. The value has two different parts:

  1. Version [8 bits / 2 chars] - current version
  2. Current time [32 bits / 8 chars] - current timestamp in number of seconds since 1970 UTC
  3. Signature [128 bits / 32 chars] - the MD5 hash of (organizationId + ":" + assetId + ":" + Current time + ”:” + Key), where ’+’ is a string concatenation
Key - A secret key that is only present on the client creating the token and the server verifying the token and is defined for the organization.

Example:
Version = ”03”
organizationId = ”14806”
assetId = ”12345”

Current time = 1222516160 (Sat Sep 27 13:49:20 CEST 2008) -> ”48de1dc0”
Key = ”secret”
Signature = MD5("14806:12345:en_US:48de1dc0:secret") -> ”42f784cca9a80b682991e96a49d1da7e”

Then token would be "0348de1dc042f784cca9a80b682991e96a49d1da7e".


RESPONSE

SUCCESS RESPONSES

No Access allowed, products available to purchase for content access
{
 
    "status": "ok",
    "urls": [ ],
    "access": 0,
    "products": [
        {
            "recurring": true,
            "productId": 37542
        },
        {
            "recurring": false,
            "productId": 50835
        }
    ]
 
}

Access allowed, user has content rights: Either owns the package or asset does not belong to any package
{
 
    "status": "ok",
    "urls": [
        {
            "id": 11316,
            "name": "SD 360p, 640x360 (512kbps)",
        },
        {
            "id": 11318,
            "name": "SD 360p, 640x360 (1024kbps)",
        },
        {
            "id": 11504,
            "name": "SD 576i, 1024x576 (1280kbps)",
        }
    ],
    "access": 1
 
}



API: VERSION 02

REQUEST

/api/publishing

Parameters:
NameValueRequirementInfo
actionstringMandatoryConstant: getMostPopular
organizationIdnumberMandatory 
tokenstringMandatory 
versionstringMandatoryConstant: 02
languageIdstringOptionalDefault: en_US
groupItemIdsstringOptionalList of groupItemId values separated by commas.
amountnumberOptionalDefault: 10
Number of videos to fetch.
daysnumberOptionalDefault: 10
Number of days in the past (from the current time) to include.
onlyVideosbooleanOptionalBy default, both videos and podcasts are returned. Set to true to fetch only videos.

A token consists of 42 character long hex value. The value has two different parts:
  1. Version [8 bits / 2 chars] - current version
  2. Current time [32 bits / 8 chars] - current timestamp in number of seconds since 1970 UTC
  3. Signature [128 bits / 32 chars] - the MD5 hash of (organizationId + "::" + Current time + ”:” + Key), where ’+’ is a string concatenation.
Info
There are two colons in a row after organizationId. This is intentional.
Do not include groupItemIds, unlike in some other APIs.

Key - A secret key that is only present on the client creating the token and the server verifying the token and is defined for the organization.

Example:
Version = ”02”
organizationId = ”14806”

Current time = 1222516160 (Sat Sep 27 13:49:20 CEST 2008) -> ”48de1dc0”
Key = ”secret”
Signature = MD5("14806::48de1dc0:secret") -> ” 40f40beebe92e5bc742d25a8e3c43954 “ 

Then token would be "0248de1dc040f40beebe92e5bc742d25a8e3c43954".

REQUEST

/api/publishing

Parameters:
NameValueRequirementInfo
actionstringMandatoryConstant: getTopShows
organizationIdnumberMandatory 
tokenstringMandatory 
groupTypeNamestringMandatoryValid values: series or podcasts.
languageIdstringOptionalDefault: en_US
amountnumberOptionalDefault: 10
Number of shows to fetch.
daysnumberOptionalDefault: 30
Number of days in the past (from the current time) to include.

A token consists of 42 character long hex value. The value has two different parts:
  1. Version [8 bits / 2 chars] - current version
  2. Current time [32 bits / 8 chars] - current timestamp in number of seconds since 1970 UTC
  3. Signature [128 bits / 32 chars] - the MD5 hash of (organizationId + "::" + Current time + ”:” + Key), where ’+’ is a string concatenation.
Info
There are two colons in a row after organizationId. This is intentional.
Do not include groupItemIds, unlike in some other APIs.

Key - A secret key that is only present on the client creating the token and the server verifying the token and is defined for the organization.

Example:
Version = ”02”
organizationId = ”14806”

Current time = 1222516160 (Sat Sep 27 13:49:20 CEST 2008) -> ”48de1dc0”
Key = ”secret”
Signature = MD5("14806::48de1dc0:secret") -> ” 40f40beebe92e5bc742d25a8e3c43954 “ 

Then token would be "0248de1dc040f40beebe92e5bc742d25a8e3c43954".


CONTINUE WATCHING

User needs to be logged in to use this API. Login will return userToken and userId, which are needed to use this API.

REQUEST

/api/publishing

Parameters:
NameValueRequirementInfo
actionstringMandatoryConstant: getUserPlayedAssets
organizationIdnumberMandatory 
tokenstringMandatory 
userIdnumberMandatoryReturned by the login API.
languageIdstringOptionalDefault: en_US
completedbooleanMandatorytrue: returns list of completed assets.
false: returns list of unfinished assets.
starttimestampOptional 
endtimestampOptionalUse start and end to return only assets used during a specific time period.

A token consists of 42 character long hex value. The value has two different parts:
  1. Version [8 bits / 2 chars] - current version
  2. Current time [32 bits / 8 chars] - current timestamp in number of seconds since 1970 UTC
  3. Signature [128 bits / 32 chars] - the MD5 hash of (organizationId + "::" + Current time + ”:” + Key), where ’+’ is a string concatenation.
Info
There are two colons in a row after organizationId. This is intentional.
Do not include groupItemIds, unlike in some other APIs.

Key - A secret key that is only present on the client creating the token and the server verifying the token and is defined for the organization.

Example:
Version = ”02”
organizationId = ”14806”

Current time = 1222516160 (Sat Sep 27 13:49:20 CEST 2008) -> ”48de1dc0”
Key = ”secret”
Signature = MD5("14806::48de1dc0:secret") -> ” 40f40beebe92e5bc742d25a8e3c43954 “ 

Then token would be "0248de1dc040f40beebe92e5bc742d25a8e3c43954".

Add this key/value pair to request header:
  1. Key: Authorization
  2. Value: Bearer + userToken received from login API

GET ASSETS

Fetch all assets for the account/organization

REQUEST

/api/publishing?version=02&action=getAssets

Parameters:
Name
Value
Requirement
Info
organizationId
number
Mandatory
 
token
string
Mandatory
 
groupItemId
number(or comma separated multiple)
Mandatory
Id for the group item for which assets are needed. Can be single ID or comma separated list of IDs
languageId
string
Optional
 
userAgent
string
Optional
If given, will take precedence over the auto-detected device type
keyword
string
Optional
will search keyword in name and description
orderBy
string
Optional
Valid values: "publishStart", "title"
order
string
Optional (Mandatory if orderBy given)
"asc", "desc"
limit
number
Optional Optional
number of items needed

RESPONSE

SUCCESS

{
    "assets": [
        {
            "coverImageSmall": "",
            "coverImageLarge": "",
            "coverImageMedium": "",
            "presets": [
                {
                    "id": 0,
                    "name": "preset1",
                    "url": "http://playback.url/based/on/device/type"
                },
                {
                    "id": 1,
                    "name": "preset2",
                    "url": "http://playback.url2/based/on/device/type"
                },
            ],
            "date": 1423489184000,
            "id": 17394,
            "thumbnailSmall": "",
            "thumbnailLarge": "",
            "thumbnailMedium": "",
            "description": "",
            "name": "Test asset 1",
            "groups": "asdasd | asdasd | asdasd | fgsgsdg | asdasd",
            "tags": "",
        },
        {
            "coverImageSmall": "",
            "coverImageLarge": "",
            "coverImageMedium": "",
            "presets": [
                {
                    "id": 0,
                    "name": "preset1",
                    "url": "http://playback.url/based/on/device/type"
                },
                {
                    "id": 1,
                    "name": "preset2",
                    "url": "http://playback.url2/based/on/device/type"
                },
            ],
            "date": 1423489184000,
            "id": 17394,
            "thumbnailSmall": "",
            "thumbnailLarge": "",
            "thumbnailMedium": "",
            "description": "",
            "name": "Test asset 1",
            "groups": "asdasd | asdasd | asdasd | fgsgsdg | asdasd",
            "tags": "",
        }
    ],
    "status": "ok"
 
}

ERROR

{
    "message": "Unable to retrieve asset list",
    "status": "error"
}

GET ASSET

Fetch data for a single asset.

REQUEST

/api/publishing?version=02&action=getAsset

Parameters:
Name
Value
Requirement
Info
organizationId
number
Mandatory
 
token
string
Mandatory
 
assetId
number
Mandatory
 
language
string
Optional
 
userAgent
string
Optional
If given, will take precedence over the ato-detected device type

RESPONSE

SUCCESS

{
            "coverImageSmall": "",
            "coverImageLarge": "",
            "coverImageMedium": "",
            "urls": [
                {
                    "id": 0,
                    "name": "preset1url",
                    "url": "http://playback.url/based/on/device/type"
                },
                {
                    "id": 1,
                    "name": "preset2url",
                    "url": "http://playback.url2/based/on/device/type"
                },
            ],
            "date": 1423489184000,
            "id": 17394,
            "properties": "",
            "thumbnailSmall": "",
            "thumbnailLarge": "",
            "thumbnailMedium": "",
            "description": "",
            "name": "Test asset 1",
            "groups": "asdasd | asdasd | asdasd | fgsgsdg | asdasd",
            "tags": "",
            "status:":"ok"
}

ERROR

{
    "status": "error"
}

VIDEO TOKEN FORMAT

INTRODUCTION

The following describes the format for a token based authentication to open video streams from CDN or streaming servers. The format is supported by Icareus Suite out-of-box, alternatively other formats can be used as well.

TOKEN FORMAT

A token consists of 50 character long hex value.
The value has four different parts:
  1. Version [8 bits/2 chars] – always 1 (“01”)
  2. IP-address [32 bits/8 chars] – the IP-address that the client has (network byte-order)
  3. Expire date [32 bits/8 chars] – timestamp when the token should expire in number of seconds since 1970 UTC (network byte-order)
  4. Signature [128 bits/32 chars] - MD5 sum av {IP-address + ”:” + Expire date + ”:” + Key + ”:” + Path}, where  ’+’ is a string concatenation
Other vales used:
  1. Key – A secret key that is only present on the server creating the token and the server verifying the token.
  2. Path – The path of the file/directory/stream to protect.

Example:
Version = 1 -> ”01”
Address = 1.2.3.4 -> “01020304”
Expire date = 1222516160 (Sat Sep 27 13:49:20 CEST 2008) -> ” 48de1dc0”
Key = ”secret”
Path= ””
Signature = ”010102030448de1dc018b8b56d361b0f03b8fbc7fe1c2090a9”

Signature is here MD5(”01020304:48de1dc0:secret:”).

    • Related Articles

    • Archive API

      INTRODUCTION This API is used to manage the content within the Archive, actions like add asset, edit asset and delete asset. All calls must be made by supplying the unique token for your organization. API PATH /api/archive API CALLS ADD ASSET V.2 ...
    • VOD Analytics API

      Video on Demand (VOD) Analytics & APIs Below are guidelines and API information for VOD analytics. VOD Analytics Workflow Below is the workflow for reporting analytics for video assets viewing. Register the device with the device registration ...
    • Teams API

      INTRODUCTION Teams API allows creating and editing Teams. AUTHENTICATION A suite user token obtained via the login API must be provided in the request headers as a bearer token. Authorization: Bearer <user-token> GET TEAMS Provides a way to get a ...
    • Analytics API (ENG)

      INTRODUCTION This API stores video access/usage statistics for the linear channels and vod items. API PATH /api/analytics API METHODS ADDING NEW RECORD Adds a new analytics record of either on-demand video usage or linear channel viewing statistics ...
    • OEMBED API (ENG)

      INTRODUCTION This API is used to query for oEmbed objects for video page URL(s) on Icareus Suite sites. Note Suite oEmbed API only supports JSON responses for now API PATH /api/oembed API GET OEMBED OBJECT REQUEST /api/oembed Parameters: Name Value ...