Command Invocations via REST api to all device assignments with a specific device specification

21 views
Skip to first unread message

Alessio Harri

unread,
Jan 1, 2018, 7:37:00 AM1/1/18
to SiteWhere
Is there a way to send a command invocation via the REST API to all device assignments that have a specific device specification?

I can currently send to a one assignment at a time. It looks like the only way is to send to each assignment at a time , which means if I have 100 assignments it would be 100 calls.

Would be great if I could just do one call and all the devices receive the command. Is this possible?

Derek Adams

unread,
Jan 1, 2018, 9:53:50 AM1/1/18
to SiteWhere
We support batch command invocations which should cover your use case. You can specify the command details and a list of additional filter criteria that are used to determine the target of the command. Take a look at the following REST method:


The entire operation is executed as a batch operation so that the status of each command invocation can be tracked individually. The batch operation manager handles throttling of requests so that the system is not flooded if thousands of devices match the criteria.

Hope that helps!
Derek

Alessio Harri

unread,
Jan 2, 2018, 3:44:03 AM1/2/18
to SiteWhere
Will test the batch command , thanks.
Reply all
Reply to author
Forward
0 new messages