How to perform assets synchronization and check content update status

In some integration cases with THRON, it might be indispensable to retrieve a specific dataset in order to perform an import or a sync procedure starting from your assets; in some other cases you just need to monitor the status of content update, in order to ensure that the solutions to which you integrate are always synchronized with the present state of art in THRON.

To achieve these purposes, THRON provides specific APIs which must be invoked by means of a THRON Custom Application Manager.

 

Assets synchronization

 

In the first case you will have to use the export web service. This service is used to export all content matching given criteria. It will return for each content the deliveryInfo, the linked categories and the itagDefinitions.

The resultset is paginated (max page size is 200 elements), after the first request the service returns a "nextPage" parameter which provides an identifier to be used on the subsequent request in order to get the following elements. If the "nextPage" is missing it means that you are on the last page of the result set.

The url of the web service is structured as follows:

 

//<clientId>-view.thron.com/api/xcontents/resources/sync/export/<clientId>

 

In the body of the request you can paste the following JSON, filling required parameters:

 


{
    "criteria": {
        "contentType": [""],
        "linkedCategoryOp": {
            "linkedCategoryIds": [""],
            "cascade": false
        }
    },
    "options": {
        "returnLinkedCategories": false,
        "returnDeliveryInfo": false,
        "returnItags": false,
        "returnImetadata": false,
        "thumbDivArea": ""
    },
    "nextPage": "",
    "pageSize": 0
}
    

 

Where:

  • contentType: is used to filter the specific content type to be retrieved. Available values are IMAGE, VIDEO, AUDIO, PAGELET, OTHER.
  • linkedCategoryIds: the list of folders to be used in order to filter content to be retrieved. If you wish to extend filtering on subfolders you will have to set the "cascade" parameter to true.

 

Check content update status

 

In the second case you have to use the updatedContent web service. This service is used to retrieve the list of content which have been modified within a specific time range.

The response provides all the basic information of such content and the list of ids of the content removed within the time range.

Moreover, it can be configured to return for each content the deliveryInfo, the linked categories and the itagDefinitions.

The resultset is paginated (max page size is 200 elements), after the first request the service returns a "nextPage" parameter which provides an identifier to be used on the subsequent request in order to get the following elements. If the "nextPage" value is empty it means that you are on the last page of the result set. A 10 minutes interval between two initial requests should be considered; no wait is needed when requesting subsequent pages.

The url of the web service is structured as follows:

 

//<clientId>-view.thron.com/api/xcontents/resources/sync/updatedContent/<clientId>

 

In the body of the request you can paste the following JSON, filling required parameters:

 


{
    "criteria": {
        "fromDate": "",
        "toDate": "",
        "linkedCategoryOp": {
            "linkedCategoryIds": [""],
            "cascade": false
        },
        "contentType": [""]
    },
    "options": {
        "returnLinkedCategories": false,
        "returnDeliveryInfo": false,
        "returnItags": false,
        "returnImetadata": false,
        "thumbDivArea": ""
    },
    "nextPage": "",
    "pageSize": 0
}    

 

Where:

 

  • fromDate: it is the starting date of the time interval to be considered. It has to be expressed in the form: yyyy-mm-dd. The value of this parameter cannot be older than two months. If you need to retrieve content older than two months you will have to perform an extract request.
  • toDate: the end date of the time interval to be considered. It has to be expressed in the form: yyyy-mm-dd.
  • contentType: the array of content types to be considered in the request; available values are: VIDEO, AUDIO, IMAGE, DOCUMENT, PLAYLIST, OTHER, PAGELET.
  • linkedCategories: the array of categoryIds representing the folder which have to be considered in the request.

 

Notes

 

Dates are recorded into platform with the UTC format so that each user can retrieve it according to its timezone. Tagging a content will not change its "Last updated" timestamp, hence such content will not be retrieved by the request.

 

If a content was not present within the given folder in the selected time interval, the request does not return any information on that content; but if the selected time interval includes a specific period during which the content was in that folder even if it is not there any more at the moment of the request, the service returns the information that such content has been removed from the folder.

 

Was this article helpful?
1 out of 1 found this helpful

Have any question?

Open a ticket
Comments