An extension service can request that vCloud Director add an event message to the event stream of an organization.

The system always creates an event message when a service posts a Task to an organization's tasks list. To create additional event messages, a service can POST an Event element to an organization's events URL.

Verify that you are logged in to the vCloud API as a system administrator.

1

Retrieve the XML representation of the organization in which you want to create the event.

Use a request like this one:

GET https://vcloud.example.com/api/admin/org/26
2

Examine the response to locate the Link element that contains the URL for adding events to the organization's events stream.

This element has a rel attribute value of event:create and a type attribute value of application/vnd.vmware.vcloud.event+xml, as the following example shows:

<Link
   rel="event:create"
   type="application/vnd.vmware.vcloud.event"
   href="https://vcloud.example.com/api/admin/org/26/events" />
3

Create an Event element that specifies the details of the task.

4

POST the Event element to the organization's events URL.

Request:

POST https://vcloud.example.com/api/admin/org/26/events
Content-Type: application/vnd.vmware.admin.event+xml
...
<?xml version="1.0" encoding="UTF-8"?>
<Event
   success="true"
   serviceNamespace="org.example.vcd.backup"
   type="backupComplete">
   <Owner
      type="application/vnd.vmware.vcloud.org+xml"
      name="Finance"
      href="https://vcloud.example.com/api/admin/org/26" />
   <User
      type="application/vnd.vmware.admin.user+xml"
      name="bob"
      href="https://vcloud.example.com/api/admin/user/39" />
</Event>

Response:

204 No Content