EdgeX-API doc
  • EdgeX Foundry Background
  • Getting Started
    • Install
    • UI Console
      • V1.0
      • V1.1
    • Experiencing EdgeX
  • Edge to Cloud
    • Azure
    • AWS
    • Aliyun
  • Edge to Edge
    • MQTT Export Service
    • MQTT Import Service
    • Grafana Dashboard Connection
  • Industrial SDK Setup
  • Device Connection
    • Configuration
    • Programming Basics
    • EdgeX Version
    • Platform
      • System Information
      • RF
    • Cold Chain
      • G1 Sensor
      • Gateway
    • Printer
    • Scanner SDK
    • Battery
    • IP Camera
    • SNMP
    • Modbus
    • Medical Cart
  • Advanced Services APIs
    • EdgeX Service Layers
    • Core Data Service APIs
    • Meta Data Service APIs
    • Command Service APIs
    • Alarm Service APIs
  • Edge AI
    • Face Detection
    • Facial Recognition
  • Edge to WISE-PaaS
    • Smart Pump Station Solution
    • Cloud Cold Chain Solution
    • Integration with WISE-PaaS
  • Edge to Cloud(for Delhi only)
    • Azure
    • AWS
  • Retail Utility
    • OPOS Manager
  • Medical Utility
    • AMiS Link
  • Vertical Utility
    • Self-Diagnostics
    • System Diagnostics
    • DeviceChecking / Kiosk
    • DeviceChecking / Server
    • Device Diagnostic Dashboard
    • Windows Lockdown/ Kiosk
    • Retail System Manager
    • Scanner Utility
  • Application Cases
    • Smart Warehouse
    • Smart Kiosk
    • Demo Video
Powered by GitBook
On this page
  • Command Service's Purpose
  • REST API Outline
  • Some API Examples
  • Reference

Was this helpful?

  1. Advanced Services APIs

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

http://localhost:48082/api/v1/device

It retrieves a list of (all) devices and their command offerings.

Get commands by device

http://localhost:48082/api/v1/device/{id}

It retrieves a device (by database generated id) and its command offerings.

Issue command

http://localhost:48082/api/v1/device/{id}/command/{commandid}

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

PreviousMeta Data Service APIsNextAlarm Service APIs

Last updated 3 years ago

Was this helpful?

Core Command APIs:

https://docs.edgexfoundry.org/Ch-APICoreCommand.html