api.video

Features

Tutorials

Video Tagging Best Practices

January 1, 2020 - Doug

Adding Tags is a great way to simplify searches in your video collection - you can simply search for a specific tag to show all of the videos.

Adding tags is easy, but there are a few tricks you should be aware of. For example this video has the tag "captions":

   "videoId": "vi5UNyaStzuuj0xTAGp7qtjf",
    "title": "Elephant's Dream",
    "description": "",
    "public": true,
    "panoramic": false,
    "mp4Support": true,
    "publishedAt": "2020-03-05T19:26:21+00:00",
    "updatedAt": "2020-03-11T08:23:04+00:00",
    "tags": [
        "captions"
    ],

if I want to add a tag "dialogue", I cannot simply Update the Video witha new caption. The PATCH command will rewrite the "tag" entry.

Best Practice

Show the Video to receive a JSON similar to the snippet above. Collect any existing tags, append the new tag, and then Update the video:

curl -X PATCH https://ws.api.video/videos/vi5UNyaStzuuj0xTAGp7qtjf  -H 'Authorization: Bearer {access_token}}'   -d '{   "tags":["captions", "dialogue"] }'

and you'll have the correct tags on the video:

  "title": "Elephant's Dream",
    "description": "",
    "public": true,
    "panoramic": false,
    "mp4Support": true,
    "publishedAt": "2020-03-05T19:26:21+00:00",
    "updatedAt": "2020-03-12T21:06:21+00:00",
    "tags": [
        "captions",
        "dialogue"
    ],

Doug

Developer Evangelist

Get started now

Connect your users with videos