I have a set of resources in a REST API, lets say it something like this:
GET /folders
[{ "id": "x", "watched": true }, { "id": "y", "watched": true }, ...]
I've implemented "stop watching" command as a PATCH:
PATCH /folders/x { "watched": false }
What is the right way to implement "stop watching all folders"? I thought of
PATCH /folders { "watched": false }
But I am not sure if this makes sense (the collection itself does not have a watched
property).
Or is it something that shouldn't be implemented on API level at all (and instead iterated by client)?
That would seem inefficient though.