Update a Tag

A client program can update a tag as follows:

  1. GET an Atom entry describing the tag. For example:

    curl -u user:password -X GET http://host-ip-address/webservice/escenic/classification/tag/tag:folksonomy.escenic.com,2002:db:1346

    returns an Atom entry containing the required description:

    <entry xmlns="http://www.w3.org/2005/Atom">
      <id>tag:folksonomy.escenic.com,2002:db:1346</id>
      <title type="text">politics</title>
      <updated>2011-03-14T11:16:00.687Z</updated>
      <summary type="html">politics</summary>
      ...
    </entry>
  2. Save the Atom entry as a file.

  3. Modify the Atom entry. Currently only the description of the tag may be changed.

  4. PUT the file back to the same URI:

    curl -u user:password \
    > -X PUT http://host-ip-address/webservice/escenic/classification/tag/tag:folksonomy.escenic.com,2002:db:1346 \
    > --header "Content-Type:application/atom+xml" \
    > --header "If-Match:*" \              
    > --upload-file updatedTag.xml