Skip to content

Search Examples

By specifying a content type using the types parameter, the search will be limited to that specific type (valid options: asset, category, contentpanel). If no type is defined, the search will automatically include all content types (assets, categories, and content panels).

Search through all the existing assets by passing search words as query parameter.

curl -X GET \
'https://manage.api.{environment}.vmnd.tv/v1/search?from=0&size=25&query=Killers%2520Of%2520The%2520Flower%2520Moon&sortOrder=desc&sortBy=create-time&types=asset' \
--header 'Content-Type: application/json' \
--header 'Authorization: <auth_token>'

Sample response:

{
"data": [
{
"titles": {
"en_US": "Killers Of The Flower Moon"
},
"imagePack": null,
"publish": [
{
"platform": "web",
"published": false
},
{
"platform": "app",
"published": false
},
{
"platform": "stb",
"published": false
}
],
"type": "asset",
"id": "960017",
"levelTypeId": null,
"levelTypeName": null,
"highlights": {
"en_US": {
"title": "Killers Of The Flower Moon"
}
},
"parentId": "415259",
"liveBroadcastTime": "2024-03-21T05:28:39.000Z",
"createTime": "2024-03-21T05:28:39.000Z",
"updateTime": "2024-03-21T05:28:39.000Z",
"contentCreateTime": null,
"contentUpdateTime": null,
"duration": 0,
"externalSystem": "",
"isLiveAsset": false,
"contentType": null,
"listId": null,
"isParentAsset": true,
"assetTypeName": " ",
"curatedPaths": null
}
]
}

Metadata search on asset, category and contentpanel

Section titled “Metadata search on asset, category and contentpanel”

We can make a search request to search assets, category and contentpanel based on single and multiple metadata fields. Below example will search the assets based on title, genre and priority and the response will be sorted based on create-time field in ascending order:

curl -X GET \
'https://manage.api.{environment}.vmnd.tv/v1/search?query=genre%3Adrama%20AND%20title%3A%22Killers%20Of%20The%20Flower%20Moon%22%20AND%20priority%3Alow&sortOrder=asc&sortBy=create-time&types=asset' \
--header 'Content-Type: application/json' \
--header 'Authorization: <auth_token>'

Similarly

curl -X GET \
'https://manage.api.{environment}.vmnd.tv/v1/search?query=%22%27Killers%20Of%20The%20Flower%20Moon%27%22&sortOrder=desc&sortBy=update-time&types=asset%2Ccategory%2Ccontentpanel' \
--header 'Content-Type: application/json' \
--header 'Authorization: <auth_token>'

When searching for a specific phrase or multiple words, wrap the value in double quotes (”). For example, title:"All quiet on the western front" searches for documents with the exact title All quiet on the western front

curl -X GET \
'https://manage.api.{environment}.vmnd.tv/v1/search?query=title%3A%27%22All%20quiet%20on%20the%20western%20front%22%27&sortOrder=asc&sortBy=create-time'
--header 'Content-Type: application/json' \
--header 'Authorization: <auth_token>'

You can narrow the search down within a date range. You should only use AND operator for date range filtering.

curl -X GET \
'https://manage.api.{environment}.vmnd.tv/v1/search?query=update-time%3Agte1727820000000%20AND%20update-time%3Alte1729115999999&sortOrder=asc&sortBy=create-time&types=asset%2Ccategory%2Ccontentpanel' \
--header 'Content-Type: application/json' \
--header 'Authorization: <auth_token>'
curl -X GET \
'https://manage.api.{environment}.vmnd.tv/v1/search?query=transmissionEndTime%3A2024-10-16T22%5C%3A00%5C%3A00.000Z&sortOrder=asc&sortBy=create-time&types=asset%2Ccategory%2Ccontentpanel' \
--header 'Content-Type: application/json' \
--header 'Authorization: <auth_token>'

Search can be done to filter assets based on asset mode:

curl -X GET \
'https://manage.api.{environment}.vmnd.tv/v1/search?query=is-live-asset%3A%5Ctrue&sortOrder=desc&sortBy=update-time&from=0&size=10'\
--header 'Content-Type: application/json' \
--header 'Authorization: <auth_token>'

Narrow down the search using chain condition

Section titled “Narrow down the search using chain condition”

The search can be narrowed down using multiple conditions:

curl -X GET \
'https://manage.api.{environment}.vmnd.tv/v1/search?query=is-live-asset%3Atrue%20AND%20title%3AWorld%20War%20Zee%20AND%20update-time%3Alte1729375199999%20AND%20update-time%3Agte1729288800000&sortOrder=desc&sortBy=update-time&from=0&size=10' \
--header 'Content-Type: application/json' \
--header 'Authorization: <auth_token>'
  • The AND operator matches documents where both terms exist anywhere in the text of a single document.
  • This is equivalent to an intersection using sets. The symbol && can be used in place of the word AND.
  • For example, To search for documents that contain Flower Moon and Killers Ofuse the query:"Flower Moon" AND "Killers Of"

Example:

curl -X GET 'https://manage.api.{environment}.vmnd.tv/v1/search?from=0&size=25&query=%22Flower%20Moon%22%20AND%20%22Killers%20Of%22&sortOrder=asc&sortBy=update-time&types=asset%2Ccategory%2Ccontentpanel' \
--header 'Content-Type: application/json' \
--header 'Authorization: <auth_token>'

We can use && and & operator to achieve the same result as AND operator. For example below search requests will return the same result:

curl -X GET 'https://manage.api.{environment}.vmnd.tv/v1/search?from=0&size=25&query=%22Flower%20Moon%22%20&&%20%22Killers%20Of%22&sortOrder=asc&sortBy=update-time&types=asset%2Ccategory%2Ccontentpanel' \
--header 'Content-Type: application/json' \
--header 'Authorization: <auth_token>'
curl -X GET 'https://manage.api.{environment}.vmnd.tv/v1/search?from=0&size=25&query=%22Flower%20Moon%22%20&%20%22Killers%20Of%22&sortOrder=asc&sortBy=update-time&types=asset%2Ccategory%2Ccontentpanel' \
--header 'Content-Type: application/json' \
--header 'Authorization: <auth_token>'
  • Specifies terms that a match must contain.
  • In the example +Killers Moon, the query engine looks for documents that must contain Killers and may contain Moon
    The plus character (+) can also be used directly in front of a term to make it required.
    For example, +Killers +Moon stipulates that both terms must appear somewhere in the field of a single document with the below query string:
    +Killers +Moon
curl -X GET 'https://manage.api.{environment}.vmnd.tv/v1/search?from=0&size=25&query=%2BKillers%20%2BMoon&sortOrder=asc&sortBy=update-time&types=asset%2Ccategory%2Ccontentpanel' \
--header 'Content-Type: application/json' \
--header 'Authorization: <auth_token>'
  • Allow users to perform searches that include results matching either of the given criteria.
  • Example: Searching Operation OR Normandy will return results that match either Operation or Normandy
curl -X GET 'https://manage.api.{environment}.vmnd.tv/v1/search?from=0&size=25&query=Operation%20OR%20Normandy&sortOrder=asc&sortBy=update-time&types=asset%2Ccategory%2Ccontentpanel' \
--header 'Content-Type: application/json' \
--header 'Authorization: <auth_token>'

We can use || and | operator for similar use cases. For example below search requests will return the same result

curl -X GET 'https://manage.api.{environment}.vmnd.tv/v1/search?from=0&size=25&query=Operation%20%7C%7C%20Normandy&sortOrder=asc&sortBy=update-time&types=asset%2Ccategory%2Ccontentpanel' \
--header 'Content-Type: application/json' \
--header 'Authorization: <auth_token>'
curl -X GET 'https://manage.api.{environment}.vmnd.tv/v1/search?from=0&size=25&query=Operation%20%7C%20Normandy&sortOrder=asc&sortBy=update-time&types=asset%2Ccategory%2Ccontentpanel' \
--header 'Content-Type: application/json' \
--header 'Authorization: <auth_token>'
  • Introduce the ability to exclude specific terms from search results.

Example: Searching Operation NOT Normandy will return results containing Operation but exclude those that contain Normandy

curl -X GET 'https://manage.api.{environment}.vmnd.tv/v1/search?from=0&size=25&query=Operation%20NOT%20Normandy&sortOrder=asc&sortBy=update-time&types=asset%2Ccategory%2Ccontentpanel' \
--header 'Content-Type: application/json' \
--header 'Authorization: <auth_token>'

We can use ! operator for similar use cases. For example Operation !Normandy search requests will return the same result:

curl -X GET 'https://manage.api.{environment}.vmnd.tv/v1/search?from=0&size=25&query=Operation%20!Normandy&sortOrder=asc&sortBy=update-time&types=asset%2Ccategory%2Ccontentpanel' \
--header 'Content-Type: application/json' \
--header 'Authorization: <auth_token>'

The - or prohibit operator excludes documents that contain the term after the - symbol.

To search for documents that contain Operation Overload but not Operation Edinburgh use the query:

"Operation Overload" -"Operation Edinburgh"

curl -X GET 'https://manage.api.{environment}.vmnd.tv/v1/search?from=0&size=25&query=%22Operation%20Overload%22%20-%22Operation%20Edinburgh%22&sortOrder=asc&sortBy=update-time&types=asset%2Ccategory%2Ccontentpanel' \
--header 'Content-Type: application/json' \
--header 'Authorization: <auth_token>'