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/publishing/
/api/publishing/getAssets?version=05
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 |
| series | boolean | Optional (Default true) | TRUE: will only fetch the latest asset in series. FALSE: will fetch all assets. |
| podcasts | boolean | Optional (Default false) | TRUE: asset data has podcast group details. FALSE: Will only have basic info |
| recursive | boolean | Optional (Default false) | TRUE: will fetch assets from subgroups too |
A token consists of 42 character long hex value. The value has two different parts:
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".
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)
{ "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 name | Description |
|---|---|
| METADATA | |
| id | asset's unique id |
| embedUrl | URI if you want to embed asset to your page |
| IMAGE FIELDS | |
| bannerImageSmall, bannerImageMedium, bannerImageLarge | URI for banner image |
| coverImageSmall, coverImageMedium, coverImageLarge | URI for cover image |
| thumbnailSmall, thumbnailMedium, thumbnailLarge | URI for thumbnail image |
| ASSET INFO | Mostly selfexplanatory |
| name, description, ingress | |
| actors, director, publisher, productionCompany | |
| releaseYear | Releast year (full year) |
| duration | Duration in seconds |
| PUBLISH TIMES | These are times when asset in available in the service |
| date | Publish start time |
| PublishEnd | Publish end time |
| CATEGORY / GROUP INFO | |
| folders | List of asset's group (id, name and name_stripped) |
| groups | List of group's titles separated with | |
| groupItemsIds | List of group's id's separated with , |
| SERIES INFO | |
| isSerie | Boolean value: Does asset belong to any serie |
| series | Series info (id, name, name_stripped) |
| PODCAST INFO | |
| isPodcastAsset | Boolean value: Is asset a podcast |
| podcasts | Podcast group indo (id, name, name_stripped) |
| podcast | Only returned if podcasts=true. Returns all information of podcast group (image etc) |
{ "message": "Unable to retrieve asset list", "status": "error"} |
/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:
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".
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)
{ "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"} |
{ "message": "Unable to retrieve asset list", "status": "error"} |
/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:
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".
{ "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"} |
{ "status": "error"} |
/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:
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".
{ "status": "ok", "urls": [ ], "access": 0, "products": [ { "recurring": true, "productId": 37542 }, { "recurring": false, "productId": 50835 } ]} |
{ "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} |
Fetch all assets for the account/organization
/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 |
{ "assets": [ { "coverImageSmall": "", "coverImageLarge": "", "coverImageMedium": "", "presets": [ { "id": 0, "name": "preset1", }, { "id": 1, "name": "preset2", }, ], "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", }, { "id": 1, "name": "preset2", }, ], "date": 1423489184000, "id": 17394, "thumbnailSmall": "", "thumbnailLarge": "", "thumbnailMedium": "", "description": "", "name": "Test asset 1", "groups": "asdasd | asdasd | asdasd | fgsgsdg | asdasd", "tags": "", } ], "status": "ok"} |
{ "message": "Unable to retrieve asset list", "status": "error"} |
Fetch data for a single asset.
/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 |
{ "coverImageSmall": "", "coverImageLarge": "", "coverImageMedium": "", "urls": [ { "id": 0, "name": "preset1url", }, { "id": 1, "name": "preset2url", }, ], "date": 1423489184000, "id": 17394, "properties": "", "thumbnailSmall": "", "thumbnailLarge": "", "thumbnailMedium": "", "description": "", "name": "Test asset 1", "groups": "asdasd | asdasd | asdasd | fgsgsdg | asdasd", "tags": "", "status:":"ok"} |
{ "status": "error"} |
/api/publishing/getTopAssets
Parameters:
| Name | Value | Example | Requirement | Info |
|---|---|---|---|---|
| organizationId | number | 241824 | Mandatory | Organization ID of the account |
| limit | number | 10 | Optional | How many assets should be returned. By default 10 assets will be returned. |
| days | number | 7 | Optional | How many days should be taken into account: e.g. top videos of previous "day" or "week", or "month". Does not take into account current day. If not set or is "0", returns all-time. |
| deviceTypes | list of numbers | 384575,384582 | Optional | Comma separated list of device type Ids of the devices that are taken into account. By default returns for all devices |
| metric | text | "count" | Optional | Metric that is used. Supports "impressions" - how many times video was loaded but not played and "count" - total number of times the video was played. By default uses "count". |
| groupItemId | number | 393220 | Optional | If set, gets the top from this Group Item |
| userId | number | 393220 | Optional | If not set, returns only public assets |
Get top 5 assets from that organization:
http://suite.icareus.com/api/publishing/getTopAssets?organizationId=241824&limit=5
Get top 10 assets for the previous week:
http://suite.icareus.com/api/publishing/getTopAssets?organizationId=241824&days=7
Get top 10 assets from the given category:
http://suite.icareus.com/api/publishing/getTopAssets?organizationId=241824&groupItemId=241936
Get top 10 assets watched on the given devices:
http://suite.icareus.com/api/publishing/getTopAssets?organizationId=241824&deviceTypes=354178,214753
Get 10 assets with the highest impression:
http://suite.icareus.com/api/publishing/getTopAssets?organizationId=241824&metric=impressions
Normal response:
{ "assets":[ { "title":"Jarva: Eksoten integraatio toimii ja tuottaa tuloksia", "assetId":248976, "views":5, "description":"Etelä-Karjalan integraatio alkaa jo toimia ja tuloksetkin näkyä.", "deviceType":0, "groupItemNames":"Editor's choice", "device":"" }, { "title":"Kuntaliiton hallitukselta yksimielinen sote-lausunto", "assetId":248852, "views":2, "description":"Kuntaliitto esittää kansanvallan vahvistamista sote-uudistuksessa.", "deviceType":0, "groupItemNames":"Editor's choice | Kuntaliitto | UUSIMMAT", "device":"" } ], "status":"ok",} |
Error response:
{ "message":"Unable to retrieve assets", "status":"error",} |
Name | Value | Requirement | Info |
organizationId | number | Mandatory | Suite Organization ID |
token | string | Mandatory | |
languageId | string | Optional | Default: en_US |
days | number | Optional | Amount of days to fetch top shows from, default: 30 |
amount | number | Optional | How many top shows to fetch, default: 10 |
groupTypeName | string | Optional | What group type to treat as 'shows', default: series |
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.
A token consists of 50 character long hex value.
The value has four different parts:
Other vales used:
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:”).