As Azure Digital Twins user, I'd like to be able to assign multiple sensors to equipment and unlink multiple sensors from equipment in one go and if there some error all changes should be rollback so data won't be broken. ADT API has an endpoint to single sensor update PATCH /api/v1.0/sensors/{id}, but I need to do it in one transaction. How I can do it?
Asked
Active
Viewed 166 times
1
-
Do I understand correctly that you are trying to move multiple sensors to a different device in one request? That seems to be impossible using the REST API. What kind of errors are you trying to avoid? – Matthijs van der Veer Jun 25 '19 at 06:14
-
@MatthijsvanderVeer f.e. I need to assign 100 sensors to equipment or unlink. I don't want to do 100 requests. I want to do it in one request and rollback if some sensor was not updated. Otherwise if f.e. 10 sensors were updated (f.e. changed equipment) and others 90 sensors catch some error with update and stiil assign to old equipment - there will be mess in data. – Alex Jun 26 '19 at 07:09
-
This doesn't seem to be supported by the API. It is possible to create multiple sensors in one request when you create a new device (POST), so I was hoping the PUT request allowed the same, but alas. – Matthijs van der Veer Jun 27 '19 at 07:57
1 Answers
0
Do you use any code to support your component? Like C# environment or something like that ? You could just multiply your request with some code, but i really don't think you could do that kind of request with the preview version of ADT right now. Maybe wait for the GA version of ADT.

Xyluun
- 288
- 1
- 2
- 8