Modify response to include change metadata

Is there an easy or standard way to respond to a POST request that performs an Add or Edit so that we can indicate the difference between what was added and edited?

For example, I want to send back a simple response that says:
{
  recordsReceived: 13,
  recordsAdded: 3,
  recordsChanged: 10
}

Is any of this exposed in the OUTPUT or by some kind of ADDON?
Working with APIs
2 replies