Keeping Your Media Organized with Tags

Tagging your assets in MediaSilo is a great way to add more organization to large media catalogs. Tags are searchable using queries, so you can find assets based on a given tag or tags.

12801280

Any tags you create on an asset in MediaSilo will show up in the tag section for the asset. You can search for your asset using the same APIs that the MediaSilo app uses.

12801280

Let's start by adding a tag to an asset.

Adding a Tag

To add a tag, you just need to know the ID of the asset that you'd like to tag. (Please see the asset API reference for retrieving a list of the assets that you have access to). The following example shows how to tag an asset in MediaSilo.

curl --request POST \
  --url https://api.shift.io/v3/assets/YOUR_ASSET_ID/tags \
  --header 'accept: application/json' \
  --header 'content-type: */*' \
  --header 'x-key: YOUR_API_KEY' \
  --header 'x-secret: YOUR_API_SECRET'
  --data '{ "tags": ["ocean", "wave", "green-room"] }'

Let's see how to edit tags.

Editing Tags

It's important to keep your tag names consistent. If you change the name of a tag, it will update all of its uses across all of your assets. Here's an example of how to edit a tag.

curl --request PUT \
  --url https://api.shift.io/v3/tags \
  --header 'accept: application/json' \
  --header 'content-type: */*' \
  --header 'x-key: YOUR_API_KEY' \
  --header 'x-secret: YOUR_API_SECRET'
  --data '{ "currentName": "oshin", "newName": "ocean" }'

The above example will change any tag currently named "oshin" to "ocean."

Let's take a look at how to search for assets using tags.

Searching for Assets by Tag

You can find assets that have one or more tags by following the MediaSilo API query support.. The following examples show how to find assets tagged with a single tag and multiple tags.

Single tag search

curl --request GET \
  --url https://api.shiftio/v3/assets?tags={"in":"ocean"} \
  --header 'accept: application/json' \
  --header 'x-key: YOUR_API_KEY' \
  --header 'x-secret: YOUR_API_SECRET'

Multi tag search

curl --request GET \
  --url https://api.shiftio/v3/assets?tags={"in":"ocean,wave,surf"} \
  --header 'accept: application/json' \
  --header 'x-key: YOUR_API_KEY' \
  --header 'x-secret: YOUR_API_SECRET'

What’s Next