Command Service APIs
The command microservice stores all device commands. It provide REST APIs to query the device command list.
Content
Command service's purpose
REST APIs outline
Reference
Command Service's Purpose
It enables the issuance of commands or actions to devices and sensors on behalf of other microservices withing EdgeX or other applications.
It also exposes the commands in a common, normalized to simplify communications with the devices
Command service doesn't act alone
It gets its knowledge about the devices and sensors from the Metadata service.
it relays commands and actions to the devices and sensors through the Device service.
It never communicates directly to a device or a sensor.
REST API Outline
Get all devices (and commands)
/api/v1/device/name/{name}
Get Commands by
Device ID: /api/v1/device/{id}
Device name: /api/v1/device/name/{name}
Issue command
/api/v1/device/{id}/command/{command id}
GET & PUT
Some API Examples
Get all Devices & Commands
It retrieves a list of (all) devices and their command offerings.
Get commands by device
It retrieves a device (by database generated id) and its command offerings.
Issue command
Issue the get or put command referenced by the command id to the device/sensor (also referenced by database generated id) it is associated to via the device service.
Reference
Core Command APIs: https://docs.edgexfoundry.org/Ch-APICoreCommand.html
Last updated
Was this helpful?