I'm trying to convert a set of SOAP-based services to a RESTful API.
I started by identifying resources by analyzing operation names and I got the resource
When I need to update the state of the subscription, I cannot simply send a
POST request to the server, because I don't have direct access to the resources, but I need to call some RPC-style operations to update their properties. Additionally, only and only if I'm changing the state of the subscription to "active", an additional call to an external service is required.
In these cases, what is the best practice to handle underlying operations?
The solution I came up with is to use query parameters, so that if I need to call activation service, I can use something like:
Considering that I cannot directly update my Subscription object fields, is there any best practice to handle this kind of conversion?
I can put in the body of my POST request some values, for instance "state":"active"
and check inside my service the proper operations to be triggered.