Tag an Object

You can assign tags to an object by using the vRealize Orchestrator REST API.

You can create both private and global tags. You specify whether the tag is private or global in the body of the request.

Note: To create global tags, you must be logged in as a user with administrative privileges.

You can also assign a value to the tag that you create. The value is an optional parameter that you can use to filter tags.

Procedure

  1. Define the request body by using the following syntax.
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <tag-instance xmlns="http://www.vmware.com/vco" global="false">
      <name>tag_name</name>
      <value>tag_value</value>
    </tag-instance>
    Note: You can create a global tag by setting the global variable to "true".
  2. Make a POST request at the URL of the object:
    POST https://{orchestrator_fqdn}/vco/api/catalog/{namespace}/{objectType}/{objectId}/tags

Results

If the POST request is successful, you receive the status code 200.