How to inform the client of a deleted resource after a relationship update?


#1

Hello

Is there a specified way to inform the client about a deleted resource after a relationship update?

It’s allowed to do this:

A server may choose to delete the underlying resource if a relationship is deleted (as a garbage collection measure).

So if I have a bar resource with a relationship to multiple foo resources and the client has a cached list of all foo resources.
I dont want to allow foo resources without a bar resource so when the relationship from a bar resource to a foo resource is deleted, I also delete the corresponding foo resource.

Is there a specified way to inform the client about this?
If not. should there be such a way? Why not?

greetings,
Lux


#2

There’s no specified way, but a 200 response with top-level meta data would seem to be the obvious way to do this.