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
  • Core Data’s Purpose
  • Event & Reading
  • REST API Outline
  • Some API examples
  • Reference

Was this helpful?

  1. Advanced Services APIs

Core Data Service APIs

The Core Data microservice provides a centralized persistence facility for data readings collected by devices and sensors.

Content

  • Core Data's purpose

  • Event & Reading

  • REST API outline

  • Reference

Core Data’s Purpose

  • Provides a centralized persistence facility for data readings collected by devices and sensors.

  • Device services for devices and sensors that collect data, call on Core Data to store the device and sensor data on the edge system (such as a gateway)

    • Allows for store and forward technology

    • Supports actuation decisions at the edge

  • Data is stored until…

    • It can be moved "north" and exported to Enterprise and cloud systems

    • It is “scrubbed” to make way for new sensor data

  • Provides an API that other services can use to access the historical data

    • Should be used sparingly as not to impact data collection

Event & Reading

  • Events are collections of Readings

    • Associated to a device

  • Readings represent a sensing on the part of a device/sensor

    • Simple Key/Value pair

    • Key is a value descriptor

    • Value is the sensed value

    • Ex: Temperature: 72

  • Event would need to have one Reading to make sense

REST API Outline

  • Event APIs

    • DELETE – should really only be used by data clean up facilities

    • GET’s galore to query for Events, by

      • id

      • Associated Device

      • timestamp (range start & end)

      • Associated Device and Reading with particular Value Descriptor

    • GET Event count

  • Reading APIs

    • GET’s galore to query for Readings, by

      • id

      • Associated Device (via Event)

      • uomLabel (of associated Value Descriptor)

      • label (of associated Value Descriptor)

      • type (of associated Value Descriptor)

      • Timestamp (via Event)

    • GET Reading count (good debug/checking mechanism)

Some API examples

GET Event Count

http://localhost:48080/api/v1/event/count/{deviceId}

Return a count of the number of events in core data for a given device - identified by id or name.

GET Events

http://localhost:48080/api/v1/event/device/{deviceId}/{limit}

Return list of events with their associated readings for a given device, sort by event creation date.

DELETE Events by deviceId

http://localhost:48080/api/v1/event/device/{deviceId}

Delete all events (and their readings) associated to a device given the device's id (either database generated id or name).

DELETE All Events

http://localhost:48080/api/v1/event/scrub

Remove all pushed events and their associated readings.

GET Reading by device

http://localhost:48080/api/v1/reading/device/{deviceId}/{limit}

Return list of all readings for a given device, sort by reading creation date.

GET Reading by value descriptor and device

http://localhost:48080/api/v1/reading/name/{name}/device/{deviceId}/{limit}

Return a list of readings that are associated to a ValueDescripter by name and Device by name (or id).

Reference

PreviousEdgeX Service LayersNextMeta Data Service APIs

Last updated 3 years ago

Was this helpful?

Core-data API document link:

https://docs.edgexfoundry.org/core-data.html