Event Resource

post

Add a new event (with its associated readings). Prefers the event device is a device name but can also be a device id (database generated). DataValidationException (HTTP 409) if the a reading is associated to a non-existent value descriptor. ServiceException (HTTP 503) for unknown or unanticipated issues.

put

Update the event data (not including updating the readings). NotFoundException (HTTP 404) if the event cannot be found by id. ServcieException (HTTP 503) for unknown or unanticipated issues.

get

Fetch all events with their associated readings. LimitExceededException (HTTP 413) if the number of events exceeds the current max limit. ServcieException (HTTP 503) for unknown or unanticipated issues.

Event Resource (by id)

get

Fetch a specific event by database specified id - returning null if none are found. Note: does not yet handle device managers. ServcieException (HTTP 503) for unknown or unanticipated issues

Event Resource Count

get

Return a count of the number of events in core data. ServcieException (HTTP 503) for unknown or unanticipated issues..

Event Resource Count for a given device

get

Return a count of the number of events in core data for a given device - identified by id or name. ServcieException (HTTP 503) for unknown or unanticipated issues..

Event Resource (by id)

delete

Delete an event and all its readings given its database generated id. NotFoundException (HTTP 404) if the event cannot be found by id. ServcieException (HTTP 503) for unknown or unanticipated issues.

put

Update the event to be pushed (out of EdgeX to an enterprise or cloud system) by setting the pushed timestamp to the current time. NotFoundException (HTTP 404) if the event cannot be found by id. ServcieException (HTTP 503) for unknown or unanticipated issues.

Event Resource (by device)

example - http://localhost:48080/api/v1/event/device/livingroomthermostat/10 (where livingroomthermostat is a device name)

get

Return list of events with their associated readings for a given device, sort by event creation date. May be an empty list if none are associated to the device. Note: does not yet handle device managers. LimitExceededException (HTTP 413) if the number of events exceeds the current max limit. ServcieException (HTTP 503) for unknown or unanticipated issues. NotFoundException (HTTP 404) if the meta data checks are on and no device is found for supplied id.

Event Resource (by device)

example - http://localhost:48080/api/v1/event/device/livingroomthermostat (where livingroomthermostat is a device name)

delete

Delete all events (and their readings) associated to a device given the device's id (either database generated id or name). ServiceException (HTTP 503) for unknown or unanticipated issues. NotFoundException (HTTP 404) if the meta data checks are on and no device is found for supplied id.

Event Resource (by creation time)

get

Return all events between a given begin and end date/time (in the form of longs). LimitExceededException (HTTP 413) if the number of events exceeds the current max limit. ServiceException (HTTP 503) for unknown or unanticipated issues.

Reading Resource (filtered for device and value descriptor)

get

Return all readings associated to the device via the event, and filtered by those readings associated to the provided value descriptor. LimitExceededException (HTTP 413) if the number of events (associated to the device) exceeds the current max limit. ServiceException (HTTP 503) for unknown or unanticipated issues.

Event Resource (by age)

delete

Remove all old events (and associated readings) based on delimiting age. ServiceException (HTTP 503) for unknown or unanticipated issues. Should only be used by the scrubber micro service

Scrub Event Resource

delete

Remove all pushed events and their associated readings.ServiceException (HTTP 503) for unknown or unanticipated issues. Should only be used by the scrubber micro service

Reading Resource

post

Add a new reading. ServiceException (HTTP 503) for unknown or unanticipated issues. DataValidationException (HTTP 409) if the associated value descriptor is non-existent.

put

Update the reading. Reading object needs to contain the database generated id of the existing reading. NotFoundException (HTTP 404) if the reading cannot be found by id. ServiceException (HTTP 503) for unknown or unanticipated issues. DataValidationException if the associated value descriptor is non-existent.

get

Return list of all readings. Sorts by reading id. LimitExceededException (HTTP 413) if the number of readings exceeds the current max limit. ServiceException (HTTP 503) for unknown or unanticipated issues.

Reading Resource Count

get

Return a count of the number of readings in core dataServcieException (HTTP 503) for unknown or unanticipated issues..

Reading Resource (by id)

get

Retrieve a reading by its database generated id. NotFoundException (HTTP 404) if reading not found by id. ServiceException (HTTP 503) for unknown or unanticipated issues

Reading Resource (by id)

delete

Delete the reading from persistent storage. NotFoundException (HTTP 404) if the reading cannot be found by id. ServiceException (HTTP 503) for unknown or unanticipated issues.

Reading Resource (by device)

example - http://localhost:48080/api/v1/reading/device/livingroomthermostat/10 (where livingroomthermostat is the name of a device)

get

Return list of all readings for a given device, sort by reading creation date. Note: does not yet handle device managers. LimitExceededException (HTTP 413) if the number of readings exceeds the current max limit. ServiceException (HTTP 503) for unknown or unanticipated issues. NotFoundException (HTTP 404) if meta checks are in place and if the device id or name does not match any existing devices.

Reading Resource (by value descriptor and device)

example - http://localhost:48080/api/v1/reading/name/temperature/device/livingroomthermostat/10 (where temperature is the name of a value descriptor and livingroomthermostat is the name of the device)

get

Return a list of readings that are associated to a ValueDescripter by name and Device by name (or id). LimitExceededException (HTTP 413) if the number of readings exceeds the current max limit. ServiceException (HTTP 503) for unknown or unanticipated issues.

Reading Resource (by value descriptor)

example - http://localhost:48080/api/v1/reading/name/temperature/10 (where temperature is the name of a value descriptor)

get

Return a list of readings that are associated to a ValueDescripter by name. LimitExceededException (HTTP 413) if the number of readings exceeds the current max limit. ServiceException (HTTP 503) for unknown or unanticipated issues.

Reading Resource (by unit of measure)

example - http://localhost:48080/api/v1/reading/uomlabel/degree cel/10 (where degree cel is the unit of measure for an assocaited value descriptor)

get

Return a list of readings with an associated value descriptor of the UoM label specified. LimitExceededException (HTTP 413) if the number of readings exceeds the current max limit. ServiceException (HTTP 503) for unknown or unanticipated issues.

Reading Resource (by label)

example - http://localhost:48080/api/v1/reading/label/hvac/10 (where hvac is a label on an associated value descriptor)

get

Return a list of readings with an associated value descriptor of the label specified. LimitExceededException (HTTP 413) if the number of readings exceeds the current max limit. ServiceException (HTTP 503) for unknown or unanticipated issues.

Reading Resource (by value data type)

example - http://localhost:48080/api/v1/reading/type/F/10 (where F, which is IoTtype for float, is in the type for an associated value descriptor)

get

Return a list of readings with an associated value descriptor of the type (IoTType) specified. LimitExceededException (HTTP 413) if the number of readings exceeds the current max limit. ServiceException (HTTP 503) for unknown or unanticipated issues.

Reading Resource (by creation time)

get

Return a list of readings between two timestamps - limited by the number specified in the limit parameter. LimitExceededException (HTTP 413) if the number of readings exceeds the current max limit. ServiceException (HTTP 503) for unknown or unanticipated issues.

Value Descriptor Resource

post

Add a new ValueDescriptor whose name must be unique. ServcieException (HTTP 503) for unknown or unanticipated issues. DataValidationException (HTTP 409) if the a formatting string of the value descriptor is not a valid printf format.

put

Update the ValueDescriptor identified by the id or name in the object provided. Id is used first, name is used second for identification purposes. ServcieException (HTTP 503) for unknown or unanticipated issues. DataValidationException (HTTP 409) if the a formatting string of the value descriptor is not a valid printf format. NotFoundException (404) if the value descriptor cannot be located by the identifier.

get

Return all ValueDescriptor objects. LimitExceededException (HTTP 413) if the number of value descriptors exceeds the current max limit. ServcieException (HTTP 503) for unknown or unanticipated issues.

Value Descriptor Resource (by id)

delete

Remove the ValueDescriptor designated by database generated identifier. ServcieException (HTTP 503) for unknown or unanticipated issues. DataValidationException (HTTP 409) if the value descriptor is still referenced in Readings. NotFoundException (404) if the value descriptor cannot be located by the identifier.

Value Descriptor Resource (by name)

example - http://localhost:48080/api/v1/valuedescriptor/name/temperature (where temperature is the unique name of a value descriptor)

get

Return ValueDescriptor object with given name. Could be null if no value descriptors found by the name (name is unique across all value descriptors). NotFoundException (HTTP 404) if the value descriptor cannont be found by nmee. ServcieException (HTTP 503) for unknown or unanticipated issues.

delete

Remove the ValueDescriptor designated by name. ServcieException (HTTP 503) for unknown or unanticipated issues. DataValidationException (HTTP 409) if the value descriptor is still referenced in Readings. NotFoundException (404) if the value descriptor cannot be located by the identifier.

Value Descriptor Resource (by id)

get

Fetch a specific ValueDescriptor by its database generated id. NotFoundException (HTTP 404) if the value descriptor cannot be found by id. ServcieException (HTTP 503) for unknown or unanticipated issues

Value Descriptor Resources associated to the device identified by name

example - http://localhost:48080/api/v1/valuedescriptor/devicename/hallthermostat (where hallthermostat is the name of a device)

get

Fetch all ValueDescriptors that are associated to a Device's command set as either a put command parameter name or get/put response expected value. NotFoundException (HTTP 404) if the Device cannot be found by name. ServcieException (HTTP 503) for unknown or unanticipated issues

Value Descriptor Resources associated to the device identified by id

example - http://localhost:48080/api/v1/valuedescriptor/deviceid/57b9fbb2189b95b8afcdabb1 (where 57b9fbb2189b95b8afcdabb1 is the id of a device)

get

Fetch all ValueDescriptors that are associated to a Device's command set as either a put command parameter name or get/put response expected value. NotFoundException (HTTP 404) if the Device cannot be found by name. ServcieException (HTTP 503) for unknown or unanticipated issues

Value Descriptor Resource (by unit of measure)

example - http://localhost:48080/api/v1/valuedescriptor/uomlabel/degree cel (where degree cel is the UoM for value descriptors)

get

Return ValueDescriptor objects with given UoM label. ServcieException (HTTP 503) for unknown or unanticipated issues.

Value Descriptor Resource (by label)

example - http://localhost:48080/api/v1/valuedescriptor/label/hvac (where hvac is one of the labels for value descriptors)

get

Return ValueDescriptor objects with given label. ServcieException (HTTP 503) for unknown or unanticipated issues.

Ping Resource

get

Test service providing an indication that the service is available.