Add Notes to Alerts in vRealize Operations via REST API

As part of a larger project for a customer, I needed to add Notes to Alerts in vRealize Operations, via the REST API.

According to the REST API documentation of vRealize Operations, found at:


The request should be a POST against:


Where {id} is the ID of the Alert, you want to add the Note to.

But the vRealize Operations REST API documentation is faulty, which made using it somewhat difficult .

According to documentation, the body content of the request can either be en JSON format or XML format.

JSON sample according to documentation:

  "id" : "ea3f7bcc-12f0-432b-9ba4-a808b14b8891",
  "alertId" : "0d9ff4f7-1603-43c9-b51d-db2b5b47c65e",
  "creationTimeUTC" : 0,
  "type" : "USER",
  "userName" : "testUser",
  "note" : "sample note",
  "others" : [ ],
  "otherAttributes" : {

XML sample according to documenation:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ops:alert-note id="ea3f7bcc-12f0-432b-9ba4-a808b14b8891" xmlns:xs="" xmlns:xsi="" xmlns:ops="">
    <ops:note>sample note</ops:note>

There are at least two issues with these samples.

  1. How would I know the ID of the Note I am adding, before I have added it?
  2. They do not work at all.

Because the REST API calls not working, I reached out to Alan Renouf, Senior Product Manager for API/SDK/CLI at VMware, via Twitter and VMware {code} Slack.

Alan Renouf did not have the answers to these failing REST API calls him self, but managed to find some engineers who did work on this REST API.

So now I was in contact with 2 engineers, Nandu Mallapragada who had priviously work on this REST API and Suren Balikyan, who currently works on this REST API.

With there help we figured out what the correct body content of the REST API Request should be.

Correct JSON body content:

  "content": "Replace with note text"

Correct XML body content:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ops:alert-note-content xmlns:xsi="" xmlns:xs="" xmlns:ops="">
    <ops:content> Replace with note text </ops:content>

Nice and simple, but best of all, actually working :-)

A big thanks to Alan Renouf, Nandu Mallapragada and Suren Balikyan.

Tags: REST API · vRealize Operations