Open jbtrystram opened 4 years ago
That looks great! :+1: I like the idea of reusing existing concepts. Maybe you can add a link to the Kubernetes API as a reference.
I like it as well. I would propose to add one more field that would contain description of the error for the result if needed.
This is a pretty old issue. Did it ever go anywhere?
Also, bulk adding of devices would be nice. Any reason for not including that in this issue?
In the end, I guess there was not enough interest to go through with it.
Bulk adding of devices is, however, a different use case. This issue is about providing a PATCH operation for existing devices.
FMPOV adding large numbers of entities is probably best done at the DB level using corresponding ETL tools.
Having an operation to do bulk operation on devices would be helpful to allow UI to manage multiple devices.
I propose to have a PATCH operation working similarly to the kubernetes API :
For example, to enable devices 4711 and 4722 :
PATCH on
/v1/devices/{tenantId}
with the following json body :Where value is a JSON object describing the change.
The answer would contain the operation result for each resource :
The "op" field would be one of : "add, edit, delete".
Here are a couple of other examples :
update the viagroup field : PATCH on
/v1/devices/{tenantId}
:response :
delete a group of gateways in memberOf :
PATCH on
/v1/devices/{tenantId}
:response :
Add a field in "ext" : PATCH on
/v1/devices/{tenantId}
:response :