You don’t need to use the REST API for this. Each Item has addGroup(groupName)
and removeGroup(groupName)
methods.
If you are using Rules DSL it’s as simple as
MyItem.addGroup("OpenItems")
If using one of the other languages you need to pull the Item from the ItemRegistry first
ir.getItem("MyItem").addGroup("OpenItems");
If you really want to use the REST API for this, you should use the sendHttpXRequest Actions to make the requests. But note that those API calls are protected and you’ll need to set up authentication in the headers of the requests.