Arkisto (Archive) API (FI)

Arkisto (Archive) API (FI)

JOHDANTO

Tätä API-rajapintaa käytetään arkiston sisällön hallintaan, kuten sisällön lisäämiseen, sisällön muokkaamiseen ja sisällön poistamiseen. Kaikki kutsut on tehtävä antamalla organisaatiosi yksilöllinen tunnus.

API POLKU (PATH)

/api/archive

API KUTSUT

LISÄÄ SISÄLTÖ (ADD ASSET) V.2

Luo uuden sisällön arkistoon. Tämä puhelu ottaa vain metatietoja. Kun omaisuus on luotu onnistuneesti, tiedostoja voidaan lisätä käyttämällä addAssetFile-toimintoa.

KUTSU

Metodi: GET/POST

Parameterit:

Nimi
Arvo
Vaatimus
Info
organizationId
number
Pakollinen
Icareus Suite organisaatio id
version
string 
Pakollinen
02 - muussa tapauksessa oletusarvoinen versio 1
token
string
Pakollinen
Salainen avain organisaatiolle
action
"addAsset"
Pakollinen
 
userId
number
Valinnainen
Jos sisältö kuuluu tietylle Icareus Suite käyttäjälle
referenceId
number
Valinnainen
Jos sisältö kuuluu jollekin kolmannen osapuolen /ulkoiselle järjestemälle
groupItemId
number
Pakollinen
Käytä getGroups-kutsua saadaksesi käytettävissä olevat ryhmäkohteiden tunnukset
groupItemIds
string
Valinnainen
Pilkuilla erotettu merkkijono useista groupItemId-tunnisteista (e.g. 1234567,12312312,666666) 
languageId
string
Pakollinen
fi_FI,en_US, en_UK ...
title
string
Pakollinen
Sisällön otsikko
description
string
Valinnainen
Sisällön kuvaus
programName 
string 
Valinnainen
Sisällön ohjelman nimi
seasonNumber 
number 
Valinnainen
Sisällön kauden numero
episodeNumber 
number 
Valinnainen
Sisällön episodin numero
duration 
number 
Valinnainen
Sisällön kesto (skuntteja) 
releasedYear 
number 
Valinnainen
Sisällön julkaisu vuosi
director 
string 
Valinnainen
Sisällön ohjaaja
actors 
string 
Valinnainen
Pilkuilla erotettu luettelo näyttelijöistä
spokenLanguages 
string 
Valinnainen
Pilkuilla eroteltu luettelo sisällön puhutuista kielistä. (eli 'fi,en,sv') 
contentRatingIds 
string 
Valinnainen
Pilkuilla eroteltu luettelo sisällön ikärajoitustunnuksista. eli. '1234,1235,1236' 
contentTypeIds 
string 
Valinnainen
Pilkuilla eroteltu luettelo sisältötyypin tunnuksista. eli '4321,4322,4323' 
tags
string
Valinnainen
Pilkuilla erotetut tagit yhdessä merkkijonossa
publishStart
number
Valinnainen
Aikaleima (millisekunteina) tämän kohteen julkaisuajankohdasta. Jos sitä ei anneta, arvoksi tulee NYT
publishEnd
number
Valinnainen
Aikaleima (millisekuntia), jonka mukaan tämän kohteen julkaisu peruutetaan. Jos ei anna, julkaisua ei koskaan peruuteta
videoQuality
number
Valinnainen
Aseta 1 HD-laadulle, muuten sisältö on SD-laatuisena
thumbnailUrl
string
Valinnainen
Kelvollinen http-kuvan URL-osoite tunnisteella. Suositeltu koko: 1280x720
coverImageUrl 
string 
Valinnainen
Kelvollinen http-kuvan URL-osoite tunnisteella. Kuvasuhteen tulisi mieluiten olla "DVD-kannen" kuvasuhde.
bannerImageUrl 
string 
Valinnainen
Kelvollinen http-kuvan URL-osoite tunnisteella.

VASTAUS

{
    "status":"ok",
    "message":"asset added successfully",
    "assetId":"2222"
}

Vastaus (Virhe):

{
    "status":"error",
    "message":"incorrect organizationId/token pair"
}

Sama malli pätee kaikkiin kuittauskutsuihin. Tila "ok" tarkoittaa aiotun toiminnon onnistunutta suorittamista. Tila "error" sisältää vastaavat virhetiedot sanomaparametrissa

SISÄLLÖN PÄIVITYS (UPDATE ASSET) V.2

Muokkaa tai päivitä sisällön metatietoja arkistossa

KUTSU

Metodi: GET/POST

Parameterit:

Nimi
Arvo
Vaatimus
Info
organizationId
number
Pakollinen
Icareus Suite organisaatio id
version
string 
Pakollinen
02 - muussa tapauksessa oletusarvoinen versio 1
token
string
Pakollinen
Salainen avain organisaatiolle
action
"addAsset"
Pakollinen
 
userId
number
Valinnainen
Jos sisältö kuuluu tietylle Icareus Suite käyttäjälle
referenceId
number
Valinnainen
Jos sisältö kuuluu jollekin kolmannen osapuolen /ulkoiselle järjestemälle
groupItemId
number
Valinnainen
Käytä getGroups-kutsua saadaksesi käytettävissä olevat ryhmäkohteiden tunnukset
groupItemIds
string
Valinnainen
Pilkuilla erotettu merkkijono useista groupItemId-tunnisteista (e.g. 1234567,12312312,666666) 
languageId
string
Valinnainen
fi_FI,en_US, en_UK ...
title
string
Valinnainen
Uusi sisällön otsikko
description
string
Valinnainen
Uusi sisällön kuvaus
programName 
string 
Valinnainen
Uusi sisällön ohjelman nimi
seasonNumber 
number 
Valinnainen
Uusi sisällön kauden numero
episodeNumber 
number 
Valinnainen
Uusi sisällön episodin numero
duration 
number 
Valinnainen
Uusi sisällön kesto (sekuntteja) 
releasedYear 
number 
Valinnainen
Uusi sisällön julkaisu vuosi
director 
string 
Valinnainen
Uusi sisällön ohjaaja
actors 
string 
Valinnainen
Uusi pilkuilla erotettu luettelo näyttelijöistä
spokenLanguages 
string 
Valinnainen
Pilkuilla eroteltu luettelo sisällön puhutuista kielistä. (eli 'fi,en,sv') 
contentRatingIds 
string 
Valinnainen
Pilkuilla eroteltu luettelo sisällön ikärajoitustunnuksista. eli. '1234,1235,1236' 
contentTypeIds 
string 
Valinnainen
Pilkuilla eroteltu luettelo sisältötyypin tunnuksista. eli '4321,4322,4323' 
tags
string
Valinnainen
Pilkuilla erotetut tagit yhdessä merkkijonossa
publishStart
number
Valinnainen
Aikaleima (millisekunteina) tämän kohteen julkaisuajankohdasta. Jos sitä ei anneta, arvoksi tulee NYT
publishEnd
number
Valinnainen
Aikaleima (millisekuntia), jonka mukaan tämän kohteen julkaisu peruutetaan. Jos ei anna, julkaisua ei koskaan peruuteta
videoQuality
number
Valinnainen
Aseta 1 HD-laadulle, muuten sisältö on SD-laatuisena
thumbnailUrl
string
Valinnainen
Kelvollinen http-kuvan URL-osoite tunnisteella. Suositeltu koko: 1280x720
coverImageUrl 
string 
Valinnainen
Kelvollinen http-kuvan URL-osoite tunnisteella. Kuvasuhteen tulisi mieluiten olla "DVD-kannen" kuvasuhde.
bannerImageUrl 
string 
Valinnainen
Kelvollinen http-kuvan URL-osoite tunnisteella.


LISÄÄ RYHMÄ / KATEGORIA (ADD GROUP)

Lisää uuden ryhmän / kategorian tilille.

KUTSU

Metodi: GET/POST

Parameterit:

Nimi
Value
Vaatimus
Info
action
"addGroup"
Pakollinen
organizationId
number
PakollinenIcareus Suite organisaatio ID
token
string
PakollinenSalainen avain organisaatiolle
groupType
string
PakollinenArvo: "Folders" (Kansiot)
name
String
PakollinenRyhmän nimi
languageId
string
Pakollinen
fi_FI,en_US, en_UK ...
parentId
number
Valinnainen
groupItemId isäntäryhmälle (jos halutaan lisätä alaryhmä / kategoria)
imageUrl
string
Valinnainen
Kelvollinen http-kuvan URL-osoite kuvatunnisteella. Suositeltu koko: 1280x720

VASTAUS

{
    "status":"ok",
    "message":"group added",
    "groupItemId":123456
}

HAE RYHMÄT /KATEGORIAT (GET GROUPS)

Hanki luettelo kaikista yhden ryhmätyypin ryhmistä.

KUTSU

Metodi: GET

Parameterit:

Nimi
Arvo
Vaatimukset
Info
action
"getGroups"
Pakollinen
organizationId
number
PakollinenIcareus Suite organisaatio ID
token
string
PakollinenOrganisaation salainen avain
groupTypeId
number
PakollinenEnnalta määritetty ID tunnus kansioille
groupTypeName
string
Pakollinen (jos groupTypeId:tä ei ole annettu)
Arvo: "Folders" (Kansiot / kategoriat)
groupItemId
number
Pakollinen (jos groupTypeId ja groupTypeName ei ole annettu)
Hae alaryhmiä tietylle ryhmälle
language
string
Valinnainen
fi_FI,en_US, en_UK ...

VASTAUS

{
"status":"ok",
    "groupItems":[
        {
            "id":1,
            "title":"Prison Break",
            "groupItems":[
                {
                    "id":11,
                    "title":"Season 1",
                    "groupItems": "[]",
                    "image":"http://itvsuite2.icareus.com/image/image_gallery?img_id=123",
                },
                {
                    "id":12,
                    "title":"Season 2",
                    "groupItems": "[]",
                    "image":"http://itvsuite2.icareus.com/image/image_gallery?img_id=123",
                },
                {
                    "id":13,
                    "title":"Season 3",
                    "groupItems": "[]",
                    "image":"http://itvsuite2.icareus.com/image/image_gallery?img_id=123",
                }
            ]
        },
        {
            "id":2,
            "title":"Lost",
            "groupItems":[
                {
                    "id":21,
                    "title":"Season 1",
                    "groupItems": "[]",
                    "image":"http://itvsuite2.icareus.com/image/image_gallery?img_id=123",
                },
                {
                    "id":22,
                    "title":"Season 2",
                    "groupItems": "[]",
                    "image":"http://itvsuite2.icareus.com/image/image_gallery?img_id=123",
                },
                {
                    "id":23,
                    "title":"Season 3",
                    "groupItems": "[]",
                    "image":"http://itvsuite2.icareus.com/image/image_gallery?img_id=123",
                }
            ]
        }
    ]
 
 
}

PÄIVITÄ RYHMÄT /KATEGORIAT (UPDATE GROUP)

Päivittää ryhmän /kategorian tietyllä tilillä.

KUTSU

Metodi: GET/POST

Parameterit:

Nimi
Arvo
Vaatimus
Info
action
"updateGroup"
Pakollinen
organizationId
number
Pakollinen
Icareus Suite organisaatio ID
groupItemId
number
PakollinenRyhmän ID
token
string
PakollinenOrganisaation salainen avain
name
String
Pakollinenryhmän nimi
languageId
string
Pakollinenfi_FI,en_US, en_UK ...
imageUrl
string
Valinnainen
Kelvollinen http-kuvan URL-osoite kuvatunnisteella. Suositeltu koko: 1280x720

VASTAUS

{
    "status":"ok",
    "message":"group updated",
    "groupItemId":123456
}


RYHMÄN / KATEGORIAN POISTO (DELETE GROUP)

Poista ryhmä tililtä

KUTSU

Metodi: GET/POST

Parametrit:

Nimi
Arvo
Vaatimukset
Info
action
"deleteGroup"
Pakollinen
organizationId
number
PakollinenIcareus Suite organisaatio ID
groupItemId
number
Pakollinenryhmän ID
token
string
PakollinenOrganisaation salainen avain

VASTAUS

{
    "status":"ok",
    "message":"group deleted"
}


LISÄÄ SISÄLTÖ (ADD ASSET)

Luo uuden sisällön arkistoon. Tämä kutsu ottaa vain metatietoja. Kun omaisuus on luotu onnistuneesti, tiedostoja voidaan lisätä käyttämällä addAssetFile-toimintoa.

KUTSU

Metodi: GET/POST

Parametrit:

Nimi
Arvo
Vaatimus
Info
organizationId
number
Mandatory
Icareus Suite organization identifier
token
string
Mandatory
Secret key of the organization
action
"addAsset"
Mandatory
 
userId
number
Optional
If asset belongs to a specific Icareus Suite user
referenceId
number
Optional
If the asset is linked to an id in an external/3rd party system
groupItemId
number
Mandatory
Use 'getGroups' call to get available group item ids 
groupItemIds
string
Optional
Comma separated string of multiple groupItemIds (e.g. 1234567,12312312,666666) 
languageId
string
Mandatory
fi_FI,en_US, en_UK ...
title
string
Mandatory
Asset's title
description
string
Optional
Asset's description
programName 
string 
Optional 
Asset's program name 
seasonNumber 
number 
Optional 
Asset's season number 
episodeNumber 
number 
Optional 
Asset's episode number 
duration 
number 
Optional 
Asset's duration (seconds) 
tags
string
Optional
comma separated tags in one string
publishStart
number
Optional
Timestamp (milliseconds) for when to publish this item. If not given, will set to NOW
publishEnd
number
Optional
Timestamp (milliseconds) for when to un-publish this item. If not give, will never unpublish
videoQuality
number
Optional
Set 1 for HD quality, otherwise the asset will be in SD quality
thumbnailUrl
string
Optional
A valid http image url with extension. Preferred size: 1280x720

It is possible to specify encoded title and description for an asset. Base64 encoding should be used. The set of parameters is the same, except the following fields.

Name
Value
Requirement
Info
action
"addAssetEncoded"
Mandatory
 
title
string
Mandatory
Asset's title (Base64 encoding)
description
string
Optional
Asset's description (Base64 encoding)

VASTAUS

{
    "status":"ok",
    "message":"asset added successfully",
    "assetId":"2222"
}

Vastaus (Virhe):

{
    "status":"error",
    "message":"incorrect organizationId/token pair"
}

Same pattern applies to all acknowledgement calls. Status "ok" means a successful execution of the intended action. Status "error" will have the corresponding error information in the message parameter


LISÄÄ SISÄLTÖTIEDOSTO - HTTP MULTIPART POST:N KAUTTA

Adds a file for an asset. The file is a part of API request.

KUTSU

MUST be a multipart/form-data request

Parameters:

Name
Value
Requirement
Info
organizationId
number
Mandatory
Icareus Suite organization identifier
token
string
Mandatory
Secret key of the organization
action
"addAssetFile"
Mandatory
 
assetId
number
Mandatory
Asset identifier
userId
number
Mandatory
Icareus Suite user identifier
uploadFile
file
Mandatory
Asset file
callbackUrl
string
Optional
Encoded URL that needs to be called once the file is uploaded and encoded. 
The url is called using GET request. It may contain some query string parameters. 
Icareus Suite will add one more parameter that is "status". Currently supported values are "success" and "error".
presetId
number
Optional
If the file is already encoded with a specific preset, 0 otherwise.

VASTAUS

{
    "message":"file successfully added for asset 290079",
    "status":"ok"
}


LISÄÄ TIEDOSTO - PAIKALLISEN TIEDOSTOJÄRJESTELMÄN KAUTTA

Adds a file for an asset. The file is specified in the fileUrl request parameter.

KUTSU

Method: POST

Parameters:

Name
Value
Requirement
Info
organizationId
number
Mandatory
Icareus Suite organization identifier
token
string
Mandatory
Secret key of the organization
action
"addAssetFile"
Mandatory
 
assetId
number
Mandatory
Asset identifier
userId
number
Mandatory
Icareus Suite user identifier
fileUrl
string
Mandatory
Encoded file URL. Currently, only local file system urls are supported. 
The 'liferay' user should be able to access the file. Example: file:///mnt/upload/clips/movie.mp4
callbackUrl
string
Optional
Encoded URL that needs to be called once the file is uploaded and encoded. 
The url is called using GET request. It may contain some query string parameters. 
Icareus Suite will add one more parameter that is "status". Currently supported values are "success" and "error".
presetId
number
Optional
If the file is already encoded with a specific preset, 0 otherwise.

VASTAUS

{
    "message":"file successfully added for asset 290079",
    "status":"ok"
}


LISÄÄ SISÄLTÖTIEDOSTO - HTTP(S) TIEDOSTO URL:N KAUTTA

Adds a file for an asset. The file is specified in the fileUrl request parameter.

KUTSU

Method: GET/POST

Parameters:

Name
Value
Requirement
Info
organizationId
number
Mandatory
Icareus Suite organization identifier
token
string
Mandatory
Secret key of the organization
action
"addAssetFileUrl"
Mandatory
 
assetId
number
Mandatory
Asset identifier
userId
number
Mandatory
Icareus Suite user identifier
fileUrl
string
Mandatory
Encoded file URL 
presetId
number
Optional
If the file is already encoded with a specific preset, 0 otherwise.

RESPONSE

{
    "message":"file successfully added for asset 290079",
    "status":"ok"
}


SISÄLLÖN PÄIVITYS

Edit or update an asset's meta data in the archive

KUTSU

Method: GET/POST

Parameters:

Name
Value
Requirement
Info
organizationId
number
Mandatory
Icareus Suite organization identifier
token
string
Mandatory
Secret key of the organization
action
"updateAssetMeta"
Mandatory
 
assetId
number
Mandatory
Asset identifier
languageId
string
Optional
fi_FI,en_US, en_UK ...
title
string
Optional
New asset title
description
string
Optional
New asset description
groupItemIds
string
Optional
Comma separated string of multiple groupItemIds (e.g. 1234567,12312312,666666) 
programName 
string 
optional 
New asset program name 
seasonNumber 
number 
optional 
New asset season number 
episodeNumber 
number 
optional 
New asset episode number 
duration 
number 
optional 
New asset duration (seconds) 
tags
string
Optional
comma separated tags in one string
publishStart
number
Optional
Timestamp (milliseconds) to change the publish date/time
publishEnd
number
Optional
Timestamp (milliseconds) for change the un-publish date/time
thumbnailUrl
string
Optional
A valid http image url with extension. Preferred size: 1280x720


SISÄLTÖTIEDOSTON PÄIVITYS

Updates a file for an asset.

KUTSU

MUST be a multipart/form-data request

Parameters:

Name
Value
Requirement
Info
organizationId
number
Mandatory
Icareus Suite organization identifier
token
string
Mandatory
Secret key of the organization
action
"updateAssetFile"
Mandatory
 
assetId
number
Mandatory
Asset identifier
fileId
number
Mandatory
Asset file identifier
file
file
Mandatory
Asset file
master
boolean
Optional
If left out, the file will not be set as the master file for that asset
presetId
number
Optional
If the file is already encoded with a specific preset

VASTAUS

{
    "status":"ok",
    "message":"asset successfully updated",
    "assetId":"2222"
}


SISÄLTÖTIEDOSTON URL PÄIVITYS

Updates a file URL for an asset.

KUTSU

Method: POST

Parameters:

Name
Value
Requirement
Info
organizationId
number
Mandatory
Icareus Suite organization identifier
token
string
Mandatory
Secret key of the organization
action
"updateAssetFileUrl"
Mandatory
 
assetId
number
Mandatory
Asset identifier
fileId
number
Mandatory
Asset file identifier
fileUrl
string 
Mandatory
Encoded file URL
master
boolean
Optional
If left out, the file will not be set as the master file for that asset
presetId
number
Optional
If the file is already encoded with a specific preset

VASTAUS

{
    "status":"ok",
    "message":"asset successfully updated",
    "assetId":"2222"
}


SISÄLLÖN POISTO

Delete an asset from the archive

KUTSU

Parameters:

Name
Value
Requirement
Info
organizationId
number
Mandatory
Icareus Suite organization identifier
token
string
Mandatory
Secret key of the organization
action
"deleteAsset"
Mandatory
 
assetId
number
Mandatory
Asset identifier

VASTAUS

{
    "status":"ok",
    "message":"Successfully deleted asset"
}

HUOMAA: TÄMÄ KUTSU POISTAA MYÖS SISÄLTÖN JULKAISTAMISEN KAIKISTA LAITTEISTA, JOILLE SE ON JULKAISTU


HAE KAIKKI RYHMÄT / KATEGORIAT TYYPIN MUKAAN

Difference between this and getGroups is that this will also fetch hidden groups. With this you can't use to fetch groups under certain groupId. This will always return all groups.

KUTSU

Method: GET
Parameters:
Name
Value
Requirement
Info
organizationId
number
Mandatory
Icareus Suite organization identifier
token
string
Mandatory
Secret key of the organization
action
"getAllGroupsByType"
Mandatory

groupTypeId
number
Optional*
Group Type Id. Either groupTypeId or groupTypeName must be given.
groupTypeName
string
Optional*
Group Type (folders, series)
showHidden
boolean
Optional
If true will return also hidden groups
getAssetCount
boolean
Optional
Will count the amount of assets in each group.
Doesn't count assets in child groups.
This value is shown with key "assetCount"
languageId
String
Optional
fi_FI,en_US, en_UK ...

VASTAUS

Is same as in getGroups, but with inclusion of assetCount.
  1. {
  2.     "status":"ok",
  3.     "groupItems":[
  4.         {
  5.             "id":1,
  6.             "assetCount": 9,
  7.             "title":"Prison Break",
  8.             "image":"http://itvsuite2.icareus.com/image/image_gallery?img_id=123",
  9.             "groupItems":[
  10.                 {
  11.                     "id":11,
  12.                     "assetCount": 1,
  13.                     "title":"Season 1",
  14.                     "groupItems": "[]",
  15.                     "image":"http://itvsuite2.icareus.com/image/image_gallery?img_id=123",
  16.                 },
  17.                 {
  18.                     "id":12,
  19.                     "assetCount": 2,
  20.                     "title":"Season 2",
  21.                     "groupItems": "[]",
  22.                     "image":"http://itvsuite2.icareus.com/image/image_gallery?img_id=123",
  23.                 },
  24.                 {
  25.                     "id":13,
  26.                     "assetCount": 0,
  27.                     "title":"Season 3",
  28.                     "groupItems": "[]",
  29.                     "image":"http://itvsuite2.icareus.com/image/image_gallery?img_id=123",
  30.                 }
  31.             ]
  32.         }
  33.     ]


HAE SISÄLLÖT (GET ASSETS)

Tämä palauttaa kaikki sisällöt käyttäjältä. Tämä on melkein sama kuin getAssets ja Publishing API, mutta tämä sisältää myös piilotetut ryhmät groupItems- ja groupItemIds-luetteloissa. Palauttaa aina sekä julkaistut että julkaisemattomat sisällöt.

KUTSU

Method: GET
Parameters:
Name
Value
Requirement
Info
organizationId
number
Mandatory
Icareus Suite organization identifier
token
string
Mandatory
Secret key of the organization
action
"getAssets"
Mandatory

series
boolean
Optional
Asset will have series it belong in the result
podcasts
boolean
Optional
Asset will have podcasts groups it belongs in the result
groupItemId
string
Optional
List of group ID's separated by comma.
Special: If you set this to "nogroups" this will fetch all the assets that doesn't belong to any of the groups.
languageId
string
Optional
fi_FI,en_US, en_UK ...

VASTAUS

Same as in Publishing API's getAssets.

HAE TEKSTITYS SISÄLLÖT

Polku: /api/archive

KUTSU

Method: GET/POST
Parameters:

Name
Value
Requirement
Info
action
getSubtitle
Mandatory

organizationId
number
Mandatory
Icareus Suite organization id
token
string
Mandatory
Secret key of the organization
userId
number
Mandatory
Icareus Suite user id. User must belong to Organization (with the exception of system admins)
subtitleId
number
Mandatory
Id of the Subtitle Asset to get

VASTAUS

Please note that the API will always return HTTP Status 200. See the "status" key of the response JSON to see whether the call was successful or not.
Onnistunut
A successful response will contain status ok and the newly created/updated subtitle object.
  1. {
  2.     "status": "ok",
  3.     "subtitle": {
  4.         "fileId": 4368904,
  5.         "id": 4368901,
  6.         "title": "Subtitle test 4",
  7.         "linkedAssetIds": "",
  8.         "description": "fourth subtitle test",
  9.         "languageId": "en_US",
  10.         "fileUrl": "https://suiterc.icareus.com/s3files/10154/2631617/505101.vtt/1.0.vtt"
  11.     }
  12. }

Error

Error response will contain status error and a message+errorCode
  1. {
  2.     "message": "Invalid organizationId",
  3.     "status": "error",
  4.     "errorCode": 14
  5. }


HAE TEKSTITYS SISÄLLÖT

Fetch all / multiple subtitle assets for the specified Organization.
Path: /api/archive

KUTSU

Method: GET/POST
Parameters:

VASTAUS

Please note that the api will always return HTTP Status 200. See the "status" key of the response JSON to see whether the call was successful or not.
Success
A successful response will contain status ok.
Error
Error response will contain status error and a message+errorcode

HAE TEKSTITYS SISÄLLÖT

Fetch all / multiple subtitle assets for the specified Organization.
Path: /api/archive

KUTSU

Method: GET/POST
Parameters:

Name
Value
Requirement
Info
action
getSubtitles
Mandatory

organizationId
number
Mandatory
Icareus Suite organization id
token
string
Mandatory
Secret key of the organization
userId
number
Mandatory
Icareus Suite user id. User must belong to organization.
start
number
Optional
Starting index for getting subtitle assets.
end
number
Optional
Ending index for getting subtitles. I.e. start=0&end=2 will fetch the first two subtitles.

VASTAUS

Please note that the api will always return HTTP Status 200. See the "status" key of the response JSON to see whether the call was successful or not.

Success

A successful response will contain status ok.
  1. {
  2.     "subtitles": [
  3.         {
  4.             "fileId": 4368704,
  5.             "id": 4368701,
  6.             "title": "Subtitle test",
  7.             "linkedAssetIds": "",
  8.             "description": "this is just a test",
  9.             "languageId": "en_US",
  10.             "fileUrl": "https://suiterc.icareus.com/s3files/10154/2631617/504901.vtt/1.0.vtt"
  11.         },
  12.         {
  13.             "fileId": 4368804,
  14.             "id": 4368801,
  15.             "title": "Subtitle test 2",
  16.             "linkedAssetIds": "",
  17.             "description": "this is just another test",
  18.             "languageId": "en_US",
  19.             "fileUrl": "https://suiterc.icareus.com/s3files/10154/2631617/505001.vtt/1.0.vtt"
  20.         }
  21.     ],
  22.     "status": "ok"
  23. }

Error

Error response will contain status error and a message+errorcode
  1. {
  2.     "message": "Invalid organizationId",
  3.     "status": "error",
  4.     "errorCode": 14
  5. }


LISÄÄ / PÄIVITÄ TEKSTITYS SISÄLLÖT

Adds (or updates if the id of an existing subtitle asset is provided) a new subtitle asset for the specified Organization. Subtitle file needs to be added with a separate call after the initial asset creation.
Path: /api/archive

KUTSU

Method: GET/POST
Parameters:

Name
Value
Requirement
Info
action
saveSubtitle
Mandatory

organizationId
number
Mandatory
Icareus Suite Organization id
token
string
Mandatory
Secret key of the organization
userId
number
Mandatory
Icareus Suite User id. User must belong to Organization.
title
string
Mandatory if creating new subtitle
Title of the subtitle asset. Only mandatory if creating a new subtitle. Otherwise optional.
description
string
Optional
Description of the subtitle asset.
assetId
number
Optional
Suite video asset id. If provided, the subtitle asset will be linked to this asset.
subtitleId
number
Optional
If provided, the call will update the existing subtitle asset instead of creating a new one.

VASTAUS

Please note that the api will always return HTTP Status 200. See the "status" key of the response JSON to see whether the call was successful or not.

Onnistunut
A successful response will contain status ok.
  1. {
  2.     "status": "ok",
  3.     "subtitle": {
  4.         "fileId": 4368904,
  5.         "id": 4368901,
  6.         "title": "Subtitle test 4",
  7.         "linkedAssetIds": "",
  8.         "description": "fourth subtitle test",
  9.         "languageId": "en_US",
  10.         "fileUrl": "https://suiterc.icareus.com/s3files/10154/2631617/505101.vtt/1.0.vtt"
  11.     }
  12. }

Error

Error response will contain status error and a message+errorcode
  1. {
  2.     "message": "Invalid organizationId",
  3.     "status": "error",
  4.     "errorCode": 14
  5. }

LINKITÄ TEKSTITYKSET VIDEO SISÄLTÖIHIN

Links a subtitle asset to a video asset.
Path: /api/archive

KUTSU

Method: GET/POST
Parameters:

Name
Value
Requirement
Info
action
linkSubtitle
Mandatory

organizationId
number
Mandatory
Icareus Suite Organization id
token
string
Mandatory
Secret key of the Organization
userId
number
Mandatory
Icareus Suite userId. User must be part of the Organization.
subtitleId
number
Mandatory
Id of the subtitle asset
assetId
number
Mandatory
Id of the video asset

VASTAUS

Please note that the api will always return HTTP Status 200. See the "status" key of the response JSON to see whether the call was successful or not.
Onnistunut
A successful response will contain status ok.
  1. {
  2.     "status": "ok",
  3.    "message": "linking successful",
  4.     "subtitle": {
  5.         "fileId": 4368904,
  6.         "id": 4368901,
  7.         "title": "Subtitle test 4",
  8.         "linkedAssetIds": "12345",
  9.         "description": "fourth subtitle test",
  10.         "languageId": "en_US",
  11.         "fileUrl": "https://suiterc.icareus.com/s3files/10154/2631617/505101.vtt/1.0.vtt"
  12.     }
  13. }

Error

Error response will contain status error and a message+errorcode
  1. {
  2.     "message": "Invalid organizationId",
  3.     "status": "error",
  4.     "errorCode": 14
  5. }


POISTA LINKITYS TEKSTITYKSEN JA VIDEO SISÄLLÖN VÄLILLÄ

Removes the link between a subtitle asset and a video asset.
Path: /api/archive

KUTSU

Method: GET/POST
Parameters:

Name
Value
Requirement
Info
action
unlinkSubtitle
Mandatory

organizationId
number
Mandatory
Icareus Suite Organization id
token
string
Mandatory
Secret key of the Organization
userId
number
Mandatory
Icareus Suite userId. User must be part of Organization.
subtitleId
number
Mandatory
Id of the subtitle asset
assetId
number
Mandatory
Id of the video asset

VASTAUS

Please note that the api will always return HTTP Status 200. See the "status" key of the response JSON to see whether the call was successful or not.
Onnistunut
Onnistunut vastaus sisältää tila ok.
  1. {
  2.     "status": "ok",
  3.    "message": "linking successful",
  4.     "subtitle": {
  5.         "fileId": 4368904,
  6.         "id": 4368901,
  7.         "title": "Subtitle test 4",
  8.         "linkedAssetIds": "12345",
  9.         "description": "fourth subtitle test",
  10.         "languageId": "en_US",
  11.         "fileUrl": "https://suiterc.icareus.com/s3files/10154/2631617/505101.vtt/1.0.vtt"
  12.     }
  13. }
Virhe
Virhevastaus sisältää tilavirheen ja viestin+virhekoodin
  1. {
  2.     "message": "Invalid organizationId",
  3.     "status": "error",
  4.     "errorCode": 14
  5. }









    • Related Articles

    • Archive API (ENG)

      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 ...
    • Tilinhallinta (Account Management) API (FI)

      Icareus Suite Videopilvi integraatiot Johdanto Tätä API-rajapintoja voidaan käyttää Icareus Suite -alustalle tallennetun sisällön hallintaan ja kyselyihin. Kaikki API-kutsut palauttavat tiedot JSON-muodossa. TILIEN HALLINTA API Johdanto APIa ...
    • Channels Management API

      Introduction This API is used to manage Linear Channels. Authorization All requests made to the following API endpoints require a token. The token should be provided in the headers as: Authorization: Bearer <token> The token should either be a valid ...
    • Account Management API (ENG)

      INTRODUCTION The API is used to manage Icareus Suite users and organisations. USE CASES Adding sub organization API Calls flow to add sub organization: Create an organization Add User Assign User Assign User role API PATH /delegate/account API ...
    • Johdanto Icareus Suite Videopilvi API-rajapintoihin (FI)

      Kuinka integroida Icareus Suite VideopilviIcareus Suite Videopilvi API-rajapintaa voidaan käyttää Icareus Suite -alustalle tallennetun sisällön hallintaan ja kyselyihin. Kaikki API-kutsut palauttavat tiedot JSON-muodossa.