RaOperationUtil is using a very unorthodox method of reading the address of the operation:
final List<ModelNode> address = operation.get(ModelDescriptionConstants.ADDRESS).asList();
final String id = address.get(address.size()-1).get(0).asString();
The issue is the ModelNode returned by "address.get(address.size()-1)".
When you use the CLI, the ModelNode is of ModelType.PROPERTY.
To create a ModelNode of ModelType.PROPERTY using JSON syntax is difficult. (TBH I'm not sure how to do it.) The syntax in a typical curl command results in a node of ModelType.OBJECT.
That get(0) call fails on ModelType.OBJECT. It's quite the quirk that it works for ModelType.PROPERTY.
I'll replace that logic with standard stuff using PathAddress.