Tags

Each copy of an object also maintains a set of tags associated with it. Tags are strings of nonzero length and can be associated to objects in order to help organize them or annotate them.

Tags are returned by the "describe" method, and modified by the "addTags" and "removeTags" methods.

API method: /class-xxxx/addTags

Specification

Adds the specified tags to the object in the specified project. If any of the tags are already present, no action is taken for those tags.

Inputs

  • project string ID of the project or container containing the object to be modified
  • tags array of strings Tags to be added

Outputs

  • id string ID of the manipulated object

Errors

  • InvalidInput (the input is not a hash, project is missing or is not a string, the key tags is missing, or its value is not an array, or the array contains at least one invalid (not a string of nonzero length) tag)
  • ResourceNotFound (the specified object does not exist, the specified project does not exist, or the specified project does not contain the specified object)
  • PermissionDenied (If the object is open, UPLOAD access is required, otherwise CONTRIBUTE access is required for the specified project)

API method: /class-xxxx/removeTags

Specification

Removes the specified tags from the object in the specified project. Ensures that the specified tags are not part of the object -- if any of the tags are already missing, no action is taken for those tags.

Inputs

  • project string ID of the project or container containing the object to be modified
  • tags array of strings Tags to be removed

Outputs

  • id string ID of the manipulated object

Errors

  • InvalidInput (the input is not a hash, project is missing or is not a string, or the key tags is missing, or its value is not an array, or the array contains at least one invalid (not a string of nonzero length) tag)
  • ResourceNotFound (the specified object does not exist, the specified project does not exist, or the specified project does not contain the specified object)
  • PermissionDenied (If the object is open, UPLOAD access is required, otherwise CONTRIBUTE access is required for the specified project)

Last edited by Katherine Lai, 2013-11-21 18:41:10

 Feedback