Searching by Title

A common way to search for media in SHIFT is by title. This is often when you are looking for a specific file or possibly for files matching a naming convention.

Searching for a specific title

Let's start by finding a file with a specific title "Catalina B Roll". Here an example of how we could find it.

curl --request GET \
  --url https://api.shift.io/v3/assets?title="Catalina B Roll" \
  --header 'accept: application/json' \
  --header 'x-key: YOUR_API_KEY' \
  --header 'x-secret: YOUR_API_SECRET'

In the above example we use the /assets endpoint to find any files whose title is "Catalina B Roll" We could also do this with a slightly different approach using the equality operator "eq".

curl --request GET \
  --url https://api.shift.io/v3/assets?title={"eq":"Catalina B Roll"} \
  --header 'accept: application/json' \
  --header 'x-key: YOUR_API_KEY' \
  --header 'x-secret: YOUR_API_SECRET'

This example produces the same result as the first with a slightly different syntax.

Searching for a partial title

Let's assume we don't completely remember the title of the file we're looking for. We just know it's "Catalina" something. In this case we can use the "contains" query operator to find all files whose title contains "Catalina". Here's an example.

curl --request GET \
  --url https://api.shift.io/v3/assets?title={"ct":"Catalina"} \
  --header 'accept: application/json' \
  --header 'x-key: YOUR_API_KEY' \
  --header 'x-secret: YOUR_API_SECRET'

This request may return more files than you're looking for since it will return every files that contains "Catalina". However, maybe you remember that the title start with "Catalina". In this case you can change the search slightly using the "starts with" operator to narrow down your results.

curl --request GET \
  --url https://api.shift.io/v3/assets?title={"sw":"Catalina"} \
  --header 'accept: application/json' \
  --header 'x-key: YOUR_API_KEY' \
  --header 'x-secret: YOUR_API_SECRET'

Similarly, you can do the same thing for strings at the end of the title using the "ends with" operator.

curl --request GET \
  --url https://api.shift.io/v3/assets?title={"ew":"Catalina"} \
  --header 'accept: application/json' \
  --header 'x-key: YOUR_API_KEY' \
  --header 'x-secret: YOUR_API_SECRET'

Did this page help you?