core-data API documentation version 1.1.x
http://localhost:48080/api
Welcome
Welcome to the Core Data Microservice API Documentation.
Event Resource
example - http://localhost:48080/api/v1/event
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 500) for unknown or unanticipated issues.
Update the event data (not including updating the readings). NotFoundException (HTTP 404) if the event cannot be found by id. ServiceException (HTTP 500) for unknown or unanticipated issues.
Fetch all events with their associated readings. LimitExceededException (HTTP 413) if the number of events exceeds the current max limit. ServiceException (HTTP 500) for unknown or unanticipated issues.
Event Resource (by id)
Fetch a specific event by database specified id - returning null if none are found. Note: does not yet handle device managers. ServiceException (HTTP 500) for unknown or unanticipated issues
Event Resource (by checksum)
Event Resource Count
Return a count of the number of events in core data. ServiceException (HTTP 500) for unknown or unanticipated issues..
Event Resource Count for a given device
Return a count of the number of events in core data for a given device - identified by id or name. InternalServerError (HTTP 500) for unknown or unanticipated issues..
Event Resource (by id)
Delete an event and all its readings given its database generated id. NotFoundException (HTTP 404) if the event cannot be found by id. ServiceException (HTTP 500) for unknown or unanticipated issues.
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. ServiceException (HTTP 500) 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)
Return list of events with their associated readings for a given device, sorted by event modified date. Newest events are at the top of list. 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. ServiceException (HTTP 500) 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 all events (and their readings) associated to a device given the device's id (either database generated id or name). ServiceException (HTTP 500) 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)
Return all events between a given begin and end date/time (in the form of longs) sorted by event modified date. Newest events are at the top of list. LimitExceededException (HTTP 413) if the number of events exceeds the current max limit. ServiceException (HTTP 500) for unknown or unanticipated issues.
Event Resource (by age)
Remove all old events (and associated readings) based on delimiting age. ServiceException (HTTP 500) for unknown or unanticipated issues. Should only be used by the scrubber micro service
Scrub Event Resource
Remove all pushed events and their associated readings.ServiceException (HTTP 500) for unknown or unanticipated issues. Should only be used by the scrubber micro service
Reading Resource
example - http://localhost:48080/api/v1/reading
Add a new reading. ServiceException (HTTP 500) for unknown or unanticipated issues. DataValidationException (HTTP 409) if the associated value descriptor is non-existent.
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 500) for unknown or unanticipated issues. DataValidationException if the associated value descriptor is non-existent.
Return list of all readings. Sorts by reading id. LimitExceededException (HTTP 413) if the number of readings exceeds the current max limit. ServiceException (HTTP 500) for unknown or unanticipated issues.
Reading Resource Count
Return a count of the number of readings in core dataServiceException (HTTP 500) for unknown or unanticipated issues..
Reading Resource (by id)
Retrieve a reading by its database generated id. NotFoundException (HTTP 404) if reading not found by id. ServiceException (HTTP 500) for unknown or unanticipated issues
Reading Resource (by id)
Delete the reading from persistent storage. NotFoundException (HTTP 404) if the reading cannot be found by id. ServiceException (HTTP 500) 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)
Return list of all readings for a given device, sorted by the readings modified date. Newest readings are at the top of list. Note: does not yet handle device managers. LimitExceededException (HTTP 413) if the number of readings exceeds the current max limit. ServiceException (HTTP 500) 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)
Return a list of readings that are associated to a ValueDescripter by name and Device by name (or id), sorted by the readings modified date. Newest readings are at the top of list. LimitExceededException (HTTP 413) if the number of readings exceeds the current max limit. ServiceException (HTTP 500) 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)
Return a list of readings that are associated to a ValueDescripter by name, sorted by the readings modified date. Newest readings are at the top of list. LimitExceededException (HTTP 413) if the number of readings exceeds the current max limit. ServiceException (HTTP 500) 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)
Return a list of readings with an associated value descriptor of the UoM label specified, sorted by the readings modified date. Newest readings are at the top of list. LimitExceededException (HTTP 413) if the number of readings exceeds the current max limit. ServiceException (HTTP 500) 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)
Return a list of readings with an associated value descriptor of the label specified, sorted by the readings modified date. Newest readings are at the top of list. LimitExceededException (HTTP 413) if the number of readings exceeds the current max limit. ServiceException (HTTP 500) 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)
Return a list of readings with an associated value descriptor of the type (IoTType) specified, sorted by the readings modified date. Newest readings are at the top of list. LimitExceededException (HTTP 413) if the number of readings exceeds the current max limit. ServiceException (HTTP 500) for unknown or unanticipated issues.
Reading Resource (by creation time)
Return a list of readings between two timestamps - limited by the number specified in the limit parameter, sorted by the readings modified date. Newest readings are at the top of list. LimitExceededException (HTTP 413) if the number of readings exceeds the current max limit. ServiceException (HTTP 500) for unknown or unanticipated issues.
Value Descriptor Resource
Add a new ValueDescriptor whose name must be unique. ServiceException (HTTP 500) for unknown or unanticipated issues. DataValidationException (HTTP 409) if the a formatting string of the value descriptor is not a valid printf format.
Update the ValueDescriptor identified by the id or name in the object provided. Id is used first, name is used second for identification purposes. ServiceException (HTTP 500) 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.
Return all ValueDescriptor objects. LimitExceededException (HTTP 413) if the number of value descriptors exceeds the current max limit. ServiceException (HTTP 500) for unknown or unanticipated issues.
Value Descriptor Resource (by id)
Remove the ValueDescriptor designated by database generated identifier. ServiceException (HTTP 500) 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)
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. ServiceException (HTTP 500) for unknown or unanticipated issues.
Remove the ValueDescriptor designated by name. ServiceException (HTTP 500) 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)
Fetch a specific ValueDescriptor by its database generated id. NotFoundException (HTTP 404) if the value descriptor cannot be found by id. ServiceException (HTTP 500) 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)
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. ServiceException (HTTP 500) for unknown or unanticipated issues
Value Descriptor Resources associated to the device identified by id
example - http://localhost:48080/api/v1/valuedescriptor/deviceid/5f79f674-a25e-44e6-bab0-1cc687420e40 (where 5f79f674-a25e-44e6-bab0-1cc687420e40 is the id of a device)
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. ServiceException (HTTP 500) 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)
Return ValueDescriptor objects with given UoM label. ServiceException (HTTP 500) 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)
Return ValueDescriptor objects with given label. ServiceException (HTTP 500) for unknown or unanticipated issues.
Value Descriptor Usage
Determines if value descriptors are currently in use. This API does not provide any guarantee that the value descriptor will not be in use in the near future and extra measure should be taken to ensure no race conditions exist.
Get a list of value descripors and usage state. True if the value descriptor is in use and should not be modified. Otherwise, false.
Ping Resource
example - http://localhost:48080/api/v1/ping
Config Resource
Example - http://localhost:48080/api/v1/config
Edgex API Version
Example - http://localhost:48080/api/version