Show examples as:

The SesameVault API « Back to Developer Page

To retrieve a list of all the tags on a video, call /video/tags/. For example:

http://www.sesamevault.com/video/tags/[VIDEO ID].xml

Which would return something like this:

  <tags>
    <tag>
      <id>4</id>
      <taglet>genre</taglet>
      <taglet>action</taglet>
      <taglet>kungfu</taglet>
    </tag>

    <tag>
      <id>6</id>
      <taglet>another tag</taglet>
    </tag>
  </tags>

Every tag has an id and one or more "taglets" associated with it. The taglets are ordered descending from parent to child. In the first tag in the above example, the main parent taglet is "genre", which has the child "action", which itself has the child "kungfu" to form the complete tag "genre > action > kungfu".

To add, modify or delete tags, use a POST (rather than GET) request to the URL above. The body of the request has the same format as the results.

To edit an existing tag, simply provide the tag id along with the new taglets:

  <tags>
    <tag>
      <id>4</id>
      <taglet>genre</taglet>
      <taglet>comedy</taglet>
    </tag>
  </tags>

To delete a tag, provide the id but leave the taglets empty (thus emptying the tag):

  <tags>
    <tag>
      <id>4</id>
    </tag>
  </tags>

To add a tag, provide the taglets but no id:

  <tags>
    <tag>
      <taglet>computer</taglet>
      <taglet>apple</taglet>
    </tag>
  </tags>

You may combine the addition, deletion and modification of any number of tags into a single request. The result of a POST request is the complete list of video tags, which reflects any changes that have been made.