Available search methods using content information

Business Case:

KPI to be measured

Bookmark this resource Follow

Ask a question

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

You have three different methods at your disposal to find content on THRON DAM Platform. This article will guide you through the choice and give you some best practices about content search in THRON to find your assets easily and quickly.

 

1. Find your content through simple filtering

Objective: in case you need to make a query based on a simple filtering, you can use the *findByProperties* service.

Here you find some examples of what you can do with this service:

  • See content details of an asset using its id
  • Retrieve all the content of a folder
  • Retrieve all the contents of a folders tree.

How to find your content through *findByProperties*

The "contentIds" parameter allows you to specify an array of content IDs. Fill this field with the Ids of the content you are looking for to retrieve all the assets associated with those IDs. The body of the request will be structured as follows:

 


{ "client": { "clientId": "" }, "criteria": { "contentIds": [""] } }    

 

If the content you are looking for has been assigned to an externalId (a reference to an identifier present on a third system), you can search for it using this information, through the form:

 


{
    "client": {
        "clientId": ""
    },
    "criteria": {
        "contentIds": ["id", "externalId-key:externalId-value"]
    }
}    

You can combine different filters to perform an advanced filtering. Here you find all the available parameters:

  • contentType: (string, optional) you can filter your search by content type, available values are: VIDEO, IMAGE, AUDIO, PLAYLIST, DOCUMENT, OTHER, PAGELET.
  • fromDate/toDate: (strings, optional) you can filter your search by a time interval to identify the creation date of the content you want to retrieve. Dates must be expressed in the form yyyy-mm-dd and they are recorded into platform with the UTC format, so that users can retrieve them according to their timezone.
  • linkedContentId: (string, optional) you can filter your search in order to retrieve content that are linked to another specific content, providing its contentId
  • acl: you can filter your search by the acl status of the content related to the token you are using to perform the request, providing the following parameters:
    • onContext: (string, optional) this parameter is used to identify wether the specific acl is acquired because it has been specifically assigned to the user (DIRECT), because it has been inherited from a folder (DERIVED), or becuase it is an exclusive prerogative of the user (EXCLUSIVE)
    • rules: (string, optional) the specific acl you want to filter by; available values are: SEEN_BY (default), MODIFIED_BY, SHARED_BY, BELONGS_TO. They can both be expressed in a positive way (include the rule in the search) or in a negative way (exclude the rule from the search): "!_RULENAME".
  • itagOp: you might want to filter your search in order to retrieve only those content with one or more specific itags. In order to do so you will have to fill the following array:
    • itags (array, optional):
      • id: (string) the Id of the tags you want to include in the search (must belong to the same classification).
      • classificationId: (string) the id of the classification where the tags have been defined.
  • imetadataKeyOp: you might want to filter your search in order to retrieve only those content with a specific key metadata value (one or more). In order to do so you will have to fill the following array:
    • imetadata (array, optional):
      • classificationId: (string) the id of the classification where the key metadata has been defined.
      • key: (string) the id of the key metadata.
      • value: (string) the value of the key metadata that must be set on the content in order to be retrieved.
  • linkedCategoryOp: you might want to filter your search in order to retrieve only those content which have been published in a specific folder (or in a specific set of folders). In order to do so, you will have to fill the following array:
    • linkedCategoryIds: (array) the categoryIds of the folders where the content you want to retrieve has to be published.
    • cascade: (boolean, optional) by setting this parameter to "true", the search will automatically look also in the subfolder of the provided categories.
  • orderBy: (string, optional) use this parameter to sort content by creation date or last update (available values are: creationDate, lastUpdate).

According to the information you want to retrieve, you can also flag a series of boolean parameters (true/false) of the contentFieldOption object. The value of these parameters is set on “false” by default:

  • returnItags – to retrieve the tags associated to a content
  • returnImetadata - to retrieve the metadata associated to a content
  • returnTotalResults - to see the total number of assets retrieved.

Note: set the value of the returnTotalResults on “false” to speed up the response time. In this way, the system will not count the total number of results.

 

2. Advanced search
Objective: in case you need to find a great number of contents related to associated products or tags, you can use the *search* service.

This search method is suggested for searches performed by integrations: please note that, to retrieve content using associated entities such as products or tags, information returned via advanced search can be not instantly updated.

 

How to find your content through the *search* service

Advanced search can be performed by content/search. For example, you can use it to perform a full-text search on content: the service will return the content that matches the text on Title, Description, Tags, metadata and Content's body, giving priority to the title if the sort order is ranking.

 


{
"criteria": {
"lemma": {
"text": "pagina",
"textMatch": "any_word_match"
}
},
"responseOptions": {
"resultsPageSize": 50,
"sort": [{
"ranking": {
"order": "desc"
}
}]
},
"clientId": ""
}    

You can combine different filters with text search as linkedProducts, itags, all type of metadata, owner, author, creationDate, lastUpdateDate ,contentType, sourceExtensions.


The advanced filters made available by this method can be found in the dedicated article: click here


The search method also provides some advanced order parameter as name, ranking, creationDate, lastUpdate.

 

3. Fast request to retrieve content

If you need a fast way to retrieve content you can use the showContents web service. Such web service is a GET request, it means that the response is cached, and eventual updates on the content might require some time to be displayed in the response.


For this reason we recommend to use this service only with particular attention, especially if you need to perform an integration which might involve a huge number of content, for which an export request is more suitable. More information can be found in this article.


The url of the showContents request is structured as follows:

https://-view.thron.com/api/xcontents/resources/contentlist/showContents?clientId=&locale=&categoryId=&searchOnSubCategories=true&xcontentIds=&contentType=&searchKey=&orderBy=

Available parameters are:

  • clientId: (string, mandatory) the domain name used to access your THRON, usually your company name.
  • locale: (string, optional) this parameter can be used to specify a specific locale which must be set on the retrieved content.
  • categoryId: (string, optional) this parameter allows you to limit your search to a specific folder by providing its categoryId.
  • searchOnSubCategories: (boolean, optional) if categoryId is defined, this parameter allows you to enable the search even on its subfolders.
  • xcontentIds: (string, optional) this parameter allows you to limit your search to a specific set of content.
  • contentType: (string, optional) this parameter allows you to limit your search to a specific set of content type.
  • searchKey: (string, optional) this parameter allows you to add a text filter on your search by providing a keyword. The search operates on the following fields: NAME, DESCRIPTION, OWNER.
  • orderBy: (string, optional) you can use this parameter to set the sorting order of the response.

NOTE: This method does not return advanced information on the content such as itags or imetadata. To retrieve them, you will have to use the findByProperties request, as illustrated above.

 

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

Have any question?

Open a ticket
Comments