Searching by Title
A common way to search for media in MediaSilo is by title. This is often the case when you are looking for a specific file or files matching a particular naming convention.
Searching for a specific title
Let's start by finding a file with a specific title: "Catalina B Roll." Here is 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 by 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 say we don't remember the full title of the file we're looking for. We just know it includes the word "Catalina." 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 can return more files than you're looking for, since it returns every file that contains the word "Catalina." However, you might remember the title starts with "Catalina." In this case, you can use 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'
You can do the same thing for strings at the end of the title by 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'
Updated over 2 years ago