How to add devices to a dynamic group with UIMAPI
search cancel

How to add devices to a dynamic group with UIMAPI


Article ID: 239944


Updated On:


DX Unified Infrastructure Management (Nimsoft / UIM)


Looking to create, and or add or change the contents of a group using UIMAPI. How can I do this?


Release: UIM 20.4
Component: UIMAPI


- First we want to get an understanding of how the payload is formulated based off of the creation in Operator Console
- select to create a new group, and in the configuration establish your rules, but do not select find devices yet
- select F12 to bring up the browsers development tool (for the purpose of this demonstration Chrome was used)
- select the network tab
- click on find devices (this will display an entry in the network log labeled -1)
- click the red record button to turn off the network recording
- select the -1 object > Payload > view source (this will display the payload line that you will need when creating the group with UIMAPI)

The section that is listed here in blue can be copied and pasted to notepad to be used in the swagger example.

- For the purpose of this exercise create the group with your name of choice but with the criteria removed. We will put it in place as part of the UIMAPI insert
- Login to the UIMAPI Swagger http://<operatorconsoleserver>/uimapi/swagger-ui.html
- execute the GET /groups in the swagger, and look for the ID that was given to your new group, along with the ID of the parent group if there is one

- Select /groups/dynamic/{groupid} operation > Try it out

- Fill in the related fields with the required entries. For the search criteria that we found initially, we will need to plug in the payload into the criteria field > select to execute 

If the process worked, you should see a response like the following. You can now take the curl command, and formulate that for future additions, changes.

Additional Information

NOTE: The process given here to get payload can in principal be used to determine payloads for other UIMAPI commands.