Clear groups in vehicle through api


Currently I'm deleting groups through c# code. But if the group node is tagged to any other device then it will through error to clear the group from device first to delete. How to do clear selection of group from API?

Sundararajan Elangovan

Please sign in to leave a comment.

1 comment


You would have to do a Device edit, the steps would be:


1. Enter group you want to delete

2. Get(group) where name : DesiredGroup -> This gets you the group object which includes the ID which you will need

2. Get(Device) where group : DesiredGroup

3. Loop through the results and remove that specific group based on the group id

4. Create a multicall of Set(Device) for each device extracted in step 2, using the edited objects

5. Run the multicall

6. You're done.

Mauricio Muniz 0 votes