I want to make a common change to all the resources an API exposes. For instance, suppose an API exposing all the students of a class, and you want to set a common course for all of the students.
One way would be to query the API, and one-by-one or in batch update a property of resources. However, that would require first getting all the resources, then update their property, and then send and post request.
Instead, I am interested in a RESTful design where you can send a property and its value, which will be applied on all the resources exposed via an API (e.g., students in the previous example).
Any suggestion on how this can be achieved via a RESTful design?
Update 1:
In other words, I would like to update one field of all the resources to a common value without having to fetch the resources first. So, I do not want to implement something as the following, because I have millions of resources that I do not want to fetch all their IDs first and then create a json object as the following:
PATCH /items
[ { id: 1, name: 'foo' }, { id: 2, name: 'bar' } ]