Create vRealize Operations Manager custom groups with REST API

There are lots of possibilities for customization within vRealize Operations manager, but one of the most simple and interesting of those are custom groups. You can create completely individual monitoring points, by defining exactly what objects are monitored together. You can even, thanks to the dynamic nature of membership criteria’s, define what kinds of objects are monitored, current or even future ones are possible. Because of the shear number of objects in a larger environment, this can be a lot of work and it could be helpful to automate using the REST API of vROps.

With the REST API of the vRealize Operations Manager we can create custom groups. However, with the official API you can only create a type of static group or groups, this is because the interface doesn’t allow you to define the criteria required for dynamic groups. There is a second API called „internal“, but this is not officially supported. VMware doesn’t guarantee that this API will continue to work in the future. That being said, using this second API enables you to create every kind of custom group.

To create a custom group you always need a group type, regardless of the route you choose. This group type is internally defined as a so called resourceKind. This is essentially a type defined in the default „container“. With the official API you cannot create this directly, but it will be created automatically when creating a custom group with a non-existent resourceKind. However, this lacks important metadata and also you will not see the group or the group type in the GUI. Therefore it’s not really that helpful.
Again there is a non-supported solution, by way of the internal API. However I guess the documentation of this API is not correct, as I got always internal errors when using it.
Unfortunately, for now at least, group types seem not to be creatable with the API.

The documentation can be found on your vrops server: https://vropsserver/suite-api/docs/rest/index.html


Some examples:

I have to start by manually creating a group type in the GUI, in this case „testGroupType“.



For this group type, I create a custom group by calling a POST to:


The ID at the end has to be the ID of the default container. You get it by calling GET:



The body of the POST request is:

<?xml version=“1.0″ encoding=“UTF-8″ standalone=“yes“?>

<ops:resource xmlns:xs=““ xmlns:xsi=““ xmlns:ops=“„>
<ops:description>Description of this group</ops:description>

In the API documentation you can also find several examples with json.
In the response I must save the created group ID, because it is needed to add objects to this group. To do this, I send a POST to:


With the body:

<?xml version=“1.0″ encoding=“UTF-8″ standalone=“yes“?>
<ops:uuid-values xmlns:xs=““ xmlns:xsi=““ xmlns:ops=“„>
<ops:uuids>{ID} {ID} {ID} {ID}</ops:uuids>

The IDs, of course, are the IDs of the objects I want to have within that group. I can get them inmuch the same way as the example given for the container above.

At the end, I start the monitoring for this new group with a simple PUT to:


The outcome is a static custom group, which is not manually changeable and also does not dynamically accept any new objects.

If we want to use the internal API, we have to add to every call an additional HEADER:


Now we can call a POST to:


With the body:

<?xml version=“1.0″ encoding=“UTF-8″ standalone=“yes“ ?>
<ops:group >
<ops:resourceIdentifiers />
<ops:description />
<ops:excludedResources />

Within the membershipDefinition we can directly add group elements or could even define a more complex dynamic definition of the custom group. The outcome is also changeable within the GUI.

You can also add elements with the API later, with a POST to:


Without any ‘body’, we have to add the additional ID to the query string. Yes, the internal API is somewhat dirty…

As I said, there is an interface for creating these resourceKinds, but I didn’t get it to work. If you want to try, you can call a POST to:


Again, with the ID of the container, the body is:

<?xml version=“1.0″ encoding=“UTF-8″ standalone=“yes“?>
<ops:resource-kind key=“newGroupType“ xmlns:xs=““ xmlns:xsi=““ xmlns:ops=“„>

The important types here are resourceKindType and subType, as they are necessary for us to see the outcome in the GUI.

Have fun!

1 Kommentar

Kommentar absenden

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert