Let's assume you manage thousands, hundred of thousands things which shall now e.g. all get an additional attribute or e.g. set a property.
In such a case, it would be very cumbersome to
a) first find out all of the ids of the things to update
b) consume them as a stream of ids
c) for each found id, perform another API call applying the update
This would result in thousands or even hundred of thousands API interactions.
I think it would (with all of the tools Ditto has gathered) be rather easy to instead provide a bulk update API.
Example:
a manufacturer changes its name from e.g. "Raider" to "Twix"
you want to adjust all things with a "manufacturer" attribute being "Raider" to now instead being "Twix"
Example HTTP API
PUT /api/2/bulk/things/attributes/manufacturer?filter=eq(attributes/manufacturer,'Raider')
HTTP payload: "Twix"
Let's assume you manage thousands, hundred of thousands things which shall now e.g. all get an additional attribute or e.g. set a property. In such a case, it would be very cumbersome to a) first find out all of the ids of the things to update b) consume them as a stream of ids c) for each found id, perform another API call applying the update
This would result in thousands or even hundred of thousands API interactions. I think it would (with all of the tools Ditto has gathered) be rather easy to instead provide a bulk update API.
Example:
Example HTTP API
Deleting things could work in a very similar way:
Example Ditto Protocol