I am implementing a REST api for setting and retrieving a resource.
I have been asked to implement a strange PUT, whereby a JSON object is stored, while another JSON object is returned.
PUT /object/{id} - stores the object with a specified identifier, and returns properties about that object in a different object
The upstream team is requesting this purely for convenience - one action (the storage of the object) is always followed by a request of derived information (based on the contents of the object).
In my mind, in a RESTful api, these would be two calls: one to store the object, then another to retrieve some data about that object id.
PUT /object/{id} - stores the object with a specified identifier
GET /object/{id} - retrieves the object with a specified identifier
GET /object/{id}/properties - retrieves properties about the object
One thought I had was to expand the object itself to include space for the "derived properties", so that the PUT sends in an object that is essentially incomplete, and then the returned object is returned with the completed properties data. I have seen many apis branded as RESTful that return a copy of the actual object stored, so this is the basis for this approach, but I have not seen an api that appended additional data.
What is the RESTful approach to obtain this derived data?