REST: deleting (and purging) a complex obs

Hi @teleivo,

Thanks, I think you definitely pointed me to the right direction. Indeed the purge param had to be set to true for the purging routines to be triggered. Which, by the way, is simply done like this in Angular:

Obs.delete({
  uuid: "44b6cc5e-30...",
  purge: true
});

However if one calls the above on a complex obs, it will not be purged and this exception gets thrown:

public void purgeObs(Obs obs, boolean cascade) throws APIException {
  if (!purgeComplexData(obs)) {
    throw new APIException("Obs.error.unable.purge.complex.data", new Object[] { obs });
  }
  ...
}

Long story short it is the same issue as the one I encountered and detailed in ‘REST: Cannot update complex obs because complex data is null’, and it can be solved with a similar overload (of the purge method this time.)
The bottom line being that ObsResource does not check whether the obs may be complex. And therefore doesn’t trigger complex obs specific behaviour(s).