Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
4 contributors

Users who have contributed to this file

@tsconn23 @jduranf @difince @brandonforster
1917 lines (1916 sloc) 144 KB
#%RAML 0.8
title: core-metadata
version: "1.0.0"
baseUri: "http://localhost:48081/api/v1"
schemas:
-
deviceprofile: '{"type":"object","$schema":"http://json-schema.org/draft-03/schema#","description": "template describing devices and sensors of the same nature in reporting the same data and offering the same commands", "title":"deviceprofile","properties":{"id":{"type":"string","required":false,"title":"id"},"created":{"type":"integer","required":false,"title":"created"},"modified":{"type":"integer","required":false,"title":"modified"},"origin":{"type":"integer","required":false,"title":"origin"},"name":{"type":"string","required":false,"title":"name"},"manufacturer":{"type":"string","required":false,"title":"manufacturer"},"model":{"type":"string","required":false,"title":"model"},"labels":{"type":"array","required":false,"title":"labels","items":{"type":"string","title":"labels"},"uniqueItems":false},"description":{"type":"string","required":false,"title":"description"}, "resources":{"type":"array","required":false,"title":"resources","items":{"type":"string","title":"resources"},"uniqueItems":false}}}'
-
devicereport: '{"type":"object","$schema":"http://json-schema.org/draft-03/schema#","description": "description of values (value descriptors) that should be collected per device on a interval action", "title":"devicereport","properties":{"id":{"type":"string","required":false,"title":"id"},"created":{"type":"integer","required":false,"title":"created"},"modified":{"type":"integer","required":false,"title":"modified"},"origin":{"type":"integer","required":false,"title":"origin"},"name":{"type":"string","required":false,"title":"name"},"device":{"type":"string","required":false,"title":"device"},"action":{"type":"string","required":false,"title":"action"},"expected":{"type":"array","required":false,"title":"expected","items":{"type":"string","title":"expected"},"uniqueItems":false}}}'
-
deviceservice: '{"type":"object","$schema":"http://json-schema.org/draft-03/schema#","description":"manages devices and interfaces with core data","title":"deviceservice","properties":{"id":{"type":"string","required":false,"title":"id"},"created":{"type":"integer","required":false,"title":"created"},"modified":{"type":"integer","required":false,"title":"modified"},"origin":{"type":"integer","required":false,"title":"origin"},"name":{"type":"string","required":false,"title":"name"},"description":{"type":"string","required":false,"title":"description"},"lastConnected":{"type":"integer","required":false,"title":"lastConnected"},"lastReported":{"type":"integer","required":false,"title":"lastReported"},"labels":{"type":"array","required":false,"title":"labels","items":{"type":"string","title":"labels"},"uniqueItems":false},"adminState":{"type":"string","required":false,"title":"adminState"},"operatingState":{"type":"string","required":false,"title":"operatingState"},"addressable":{"type":"object","properties":{"id":{"type":"string","required":false,"title":"id"},"created":{"type":"integer","required":false,"title":"created"},"modified":{"type":"integer","required":false,"title":"modified"},"origin":{"type":"integer","required":false,"title":"origin"},"name":{"type":"string","required":false,"title":"name"},"protocol":{"type":"string","required":false,"title":"protocol"},"address":{"type":"string","required":false,"title":"address"},"port":{"type":"integer","required":false,"title":"port"},"path":{"type":"string","required":false,"title":"path"},"publisher":{"type":"string","required":false,"title":"publisher"},"user":{"type":"string","required":false,"title":"user"},"password":{"type":"string","required":false,"title":"password"},"topic":{"type":"string","required":false,"title":"topic"}}}}}'
-
device: '{"type":"object","$schema":"http://json-schema.org/draft-03/schema#","description":"device or sensor supplying data and taking actuation commands", "title":"device","properties":{"id":{"type":"string","required":false,"title":"id"},"created":{"type":"integer","required":false,"title":"created"},"modified":{"type":"integer","required":false,"title":"modified"},"origin":{"type":"integer","required":false,"title":"origin"},"name":{"type":"string","required":false,"title":"name"},"description":{"type":"string","required":false,"title":"description"},"lastConnected":{"type":"integer","required":false,"title":"lastConnected"},"lastReported":{"type":"integer","required":false,"title":"lastReported"},"labels":{"type":"array","required":false,"title":"labels","items":{"type":"string","title":"labels"},"uniqueItems":false},"adminState":{"type":"string","required":false,"title":"adminState"},"operatingState":{"type":"string","required":false,"title":"operatingState"},"addressable":{"type":"object","properties":{"id":{"type":"string","required":false,"title":"id"},"created":{"type":"integer","required":false,"title":"created"},"modified":{"type":"integer","required":false,"title":"modified"},"origin":{"type":"integer","required":false,"title":"origin"},"name":{"type":"string","required":false,"title":"name"},"protocol":{"type":"string","required":false,"title":"protocol"},"address":{"type":"string","required":false,"title":"address"},"port":{"type":"integer","required":false,"title":"port"},"path":{"type":"string","required":false,"title":"path"},"publisher":{"type":"string","required":false,"title":"publisher"},"user":{"type":"string","required":false,"title":"user"},"password":{"type":"string","required":false,"title":"password"},"topic":{"type":"string","required":false,"title":"topic"}}}}}'
-
addressable: '{"type":"object","$schema":"http://json-schema.org/draft-03/schema#","title":"addressable","properties":{"id":{"type":"string","required":false,"title":"id"},"created":{"type":"integer","required":false,"title":"created"},"modified":{"type":"integer","required":false,"title":"modified"},"origin":{"type":"integer","required":false,"title":"origin"},"name":{"type":"string","required":false,"title":"name"},"protocol":{"type":"string","required":false,"title":"protocol"},"address":{"type":"string","required":false,"title":"address"},"port":{"type":"integer","required":false,"title":"port"},"path":{"type":"string","required":false,"title":"path"},"publisher":{"type":"string","required":false,"title":"publisher"},"user":{"type":"string","required":false,"title":"user"},"password":{"type":"string","required":false,"title":"password"},"topic":{"type":"string","required":false,"title":"topic"},"method":{"type":"string","required":true,"title":"method"}}}'
-
command: '{"type":"object","$schema":"http://json-schema.org/draft-03/schema#","title":"command","properties":{"id":{"type":"string","required":false,"title":"id"},"created":{"type":"integer","required":false,"title":"created"},"modified":{"type":"integer","required":false,"title":"modified"},"origin":{"type":"integer","required":false,"title":"origin"},"name":{"type":"string","required":false,"title":"name"},"get":{"type":"object","properties":{"path":{"type":"string","required":false,"title":"path"},"responses":{"type":"object","properties":{"code":{"type":"string","required":false,"title":"code"},"description":{"type":"string","required":false,"title":"description"},"expectedValues":{"type":"string","required":false,"title":"expectedValues"}}}}},"put":{"type":"object","properties":{"path":{"type":"string","required":false,"title":"path"}}}}}'
-
provisionwatcher: '{"type":"object","$schema":"http://json-schema.org/draft-03/schema#","title":"provisionwatcher","properties":{"id":{"type":"string","required":false,"title":"id"},"created":{"type":"integer","required":false,"title":"created"},"modified":{"type":"integer","required":false,"title":"modified"},"origin":{"type":"integer","required":false,"title":"origin"},"name":{"type":"string","required":false,"title":"name"}}}'
/ping:
displayName: Ping Resource
description: Example - http://localhost:48081/api/v1/ping
get:
description: ping
responses:
"200":
description: Successful Response
/config:
displayName: Config Resource
description: Example - http://localhost:48081/api/v1/config
get:
description: Fetch the current state of the service's configuration.
responses:
"200":
description: The service's configuration as JSON document
/device/id/{id}:
displayName: Device Resource (by id)
description: Example - http://localhost:48081/api/v1/device/id/57bc6d80555e5218873e5a30
uriParameters:
id:
displayName: id
type: string
required: false
repeat: false
delete:
description: Remove the Device designated by database generated id. This does not remove associated objects (addressable, service, profile, etc.). Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device cannot be found by the identifier provided.
responses:
"200":
description: boolean indicating success of the remove operation
"400":
description: for incorrect or unparsable requests
"404":
description: if the device cannot be found by the id provided.
/device/check/{token}:
displayName: Device Resource by name (preferred) or id
description: Example - http://localhost:48081/api/v1/device/check/ohmmeter
uriParameters:
token:
displayName: token
type: string
required: true
repeat: false
get:
description: Obtain a device by either name (preferred) or id. Id must be a valid BSON identifier.
responses:
"200":
description: JSON payload representing the device
"400":
description: for incorrect or unparsable requests
"404":
description: device was not found
/device/name/{name}/lastreported/{time}:
displayName: Device Resource (set last reported by name)
description: Example - http://localhost:48081/api/v1/device/name/livingroomthermostat/lastreported/1471966597000 (where livingroomthermostat is the device name)
uriParameters:
time:
displayName: time
type: string
required: false
repeat: false
name:
displayName: name
type: string
required: false
repeat: false
put:
description: Update the last reported time of the device by unique name of the device. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device cannot be found by the name provided.
responses:
"200":
description: boolean indicating success of update
"400":
description: for incorrect or unparsable requests
"404":
description: if the device cannot be found by the name provided.
"500":
description: for unknown or unanticipated issues.
/device/name/{name}/lastreported/{time}/{notify}:
displayName: Device Resource (set last reported by name)
description: Example - http://localhost:48081/api/v1/device/name/livingroomthermostat/lastreported/1471966597000/true (where livingroomthermostat is the device name)
uriParameters:
time:
displayName: time
type: string
required: false
repeat: false
name:
displayName: name
type: string
required: false
repeat: false
notify:
displayName: notify
type: string
required: false
repeat: false
put:
description: Update the last reported time of the device by unique name of the device. The notify boolean indicates whether the owning device service should be notified of the change. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device cannot be found by the name provided.
responses:
"200":
description: boolean indicating success of update
"400":
description: for incorrect or unparsable requests
"404":
description: if the device cannot be found by the name provided.
"500":
description: for unknown or unanticipated issues.
/device/name/{name}/lastconnected/{time}:
displayName: Device Resource (set last connected by name)
description: Example - http://localhost:48081/api/v1/device/name/livingroomthermostat/lastconnected/1471966597000 (where livingroomthermostat is the device name)
uriParameters:
time:
displayName: time
type: string
required: false
repeat: false
name:
displayName: name
type: string
required: false
repeat: false
put:
description: Update the last connected time of the device by unique name of the device. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device cannot be found by the name provided.
responses:
"200":
description: boolean indicating success of update
"400":
description: for incorrect or unparsable requests
"404":
description: if the device cannot be found by the name provided.
"500":
description: for unknown or unanticipated issues.
/device/name/{name}/lastconnected/{time}/{notify}:
displayName: Device Resource (set last connected by name)
description: Example - http://localhost:48081/api/v1/device/name/livingroomthermostat/lastconnected/1471966597000/true (where livingroomthermostat is the device name)
uriParameters:
time:
displayName: time
type: string
required: false
repeat: false
name:
displayName: name
type: string
required: false
repeat: false
notify:
displayName: notify
type: string
required: false
repeat: false
put:
description: Update the last connected time of the device by unique name of the device. The notify boolean indicates whether the owning device service should be notified of the change. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device cannot be found by the name provided.
responses:
"200":
description: boolean indicating success of update
"400":
description: for incorrect or unparsable requests
"404":
description: if the device cannot be found by the name provided.
"500":
description: for unknown or unanticipated issues.
/device/name/{name}:
displayName: Device Resource (by name)
description: Example - http://localhost:48081/api/v1/device/name/livingroomthermostat (where livingroomthermostat is the device name)
uriParameters:
name:
displayName: name
type: string
required: false
repeat: false
delete:
description: Remove the Device designated by unique name. This does not remove associated objects (addressable, service, profile, etc.). Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device cannot be found by the identifier provided.
responses:
"200":
description: boolean indicating success of update
"400":
description: for incorrect or unparsable requests
"404":
description: if the device cannot be found by the name provided.
put:
description: Set the admin or operating state of the device by unique name of the device. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device cannot be found by the name provided.
body:
application/json:
example: '{"adminState":"unlocked"} or {"operatingState":"enabled"}'
responses:
"200":
description: indicating success of the operation
"400":
description: for incorrect or unparsable requests
"404":
description: if the device cannot be found by the name provided.
"500":
description: for unknown or unanticipated issues.
get:
description: Return Device matching given name (device names should be unique). May be null if no device matches on the name provided. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device cannot be found by the identifier provided.
responses:
"200":
description: device matching on name
body:
application/json:
schema: device
example: '{"id":"57bc6d80555e5218873e5a30","created":1471966592240,"modified":1471966592240,"origin":1471806386919,"name":"livingroomthermostat","description":"living room HVAC thermostat","adminState":null,"operatingState":"enabled","addressable":{"id":"57bc6d5d555e5218873e5a2c","created":1471966557670,"modified":1471966557670,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none"},"lastConnected":0,"lastReported":0,"labels":["home","hvac","thermostat"],"location":"{lat:45.45,long:47.80}","service":{"id":"57bc6d6a555e5218873e5a2d","created":1471966570667,"modified":1471966570667,"origin":1471806386919,"name":"home thermostat device service","description":"manage home thermostats","lastConnected":0,"lastReported":0,"labels":["hvac","thermostat"],"adminState":"unlocked","operatingState":"enabled","addressable":{"id":"57bc6d5d555e5218873e5a2c","created":1471966557670,"modified":1471966557670,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none"}},"profile":{"id":"57bc6d7b555e5218873e5a2f","created":1471966587727,"modified":1471966587727,"origin":1471806386919,"name":"thermostat profile","manufacturer":"Honeywell","model":"ABC123","labels":["bacnet","thermostat","Honeywell"],"description":"BACnet Honeywell thermostats","resources":[{"CurrentHumidity":{"get":[{"parameter":"CurrentHumidity","operation":"get","object":"AnalogValue_22"}]}}],"commands":[{"id":"57bc6d7b555e5218873e5a2e","created":1471966587724,"modified":1471966587724,"origin":1471806386919,"name":"cooling point","get":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}]},"put":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}],"parameterNames":["coolingpoint"]}}]}}'
"400":
description: for incorrect or unparsable requests
"404":
description: if the device cannot be found by the name provided.
"500":
description: for unknown or unanticipated issues.
/device/{id}/lastreported/{time}:
displayName: Device Resource (set last reported by id)
description: Example - http://localhost:48081/api/v1/device/57bc6d80555e5218873e5a30/lastreported/1471966597000
uriParameters:
id:
displayName: id
type: string
required: false
repeat: false
time:
displayName: time
type: string
required: false
repeat: false
put:
description: Update the last reported time of the device by database generated identifier. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device cannot be found by the identifier provided.
responses:
"200":
description: boolean indicating success of update
"400":
description: for incorrect or unparsable requests
"404":
description: if the device cannot be found by the name provided.
"500":
description: for unknown or unanticipated issues.
/device/{id}/lastreported/{time}/{notify}:
displayName: Device Resource (set last reported by id)
description: Example - http://localhost:48081/api/v1/device/57bc6d80555e5218873e5a30/lastreported/1471966597000/true
uriParameters:
id:
displayName: id
type: string
required: false
repeat: false
time:
displayName: time
type: string
required: false
repeat: false
notify:
displayName: notify
type: string
required: false
repeat: false
put:
description: Update the last reported time of the device by database generated identifier. The notify boolean indicates whether the owning device service should be notified of the change. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device cannot be found by the identifier provided.
responses:
"200":
description: boolean indicating success of update
"400":
description: for incorrect or unparsable requests
"404":
description: if the device cannot be found by the name provided.
"500":
description: for unknown or unanticipated issues.
/device/{id}/lastconnected/{time}:
displayName: Device Resource (set last connected by id)
description: Example - http://localhost:48081/api/v1/device/57bc6d80555e5218873e5a30/lastconnected/1471966597000
uriParameters:
id:
displayName: id
type: string
required: false
repeat: false
time:
displayName: time
type: string
required: false
repeat: false
put:
description: Update the last connected time of the device by database generated identifier. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device cannot be found by the identifier provided.
responses:
"200":
description: boolean indicating success of update
"400":
description: for incorrect or unparsable requests
"404":
description: if the device cannot be found by the name provided.
"500":
description: for unknown or unanticipated issues.
/device/{id}/lastconnected/{time}/{notify}:
displayName: Device Resource (set last connected by id)
description: Example - http://localhost:48081/api/v1/device/57bc6d80555e5218873e5a30/lastconnected/1471966597000/true
uriParameters:
id:
displayName: id
type: string
required: false
repeat: false
time:
displayName: time
type: string
required: false
repeat: false
notify:
displayName: notify
type: string
required: false
repeat: false
put:
description: Update the last connected time of the device by database generated identifier. The notify boolean indicates whether the owning device service should be notified of the change. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device cannot be found by the identifier provided.
responses:
"200":
description: boolean indicating success of update
"400":
description: for incorrect or unparsable requests
"404":
description: if the device cannot be found by the name provided.
"500":
description: for unknown or unanticipated issues.
/device/{id}:
displayName: Device Resource (by id)
description: Example - http://localhost:48081/api/v1/device/57bc6d80555e5218873e5a30
uriParameters:
id:
displayName: id
type: string
required: false
repeat: false
get:
description: Fetch a specific device by database generated id. May return null if no device with the id is found. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device cannot be found by the identifier provided.
responses:
"200":
description: device matching on the id
body:
application/json:
schema: device
example: '{"id":"57bc6d80555e5218873e5a30","created":1471966592240,"modified":1471966592240,"origin":1471806386919,"name":"livingroomthermostat","description":"living room HVAC thermostat","adminState":null,"operatingState":"enabled","addressable":{"id":"57bc6d5d555e5218873e5a2c","created":1471966557670,"modified":1471966557670,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none"},"lastConnected":0,"lastReported":0,"labels":["home","hvac","thermostat"],"location":"{lat:45.45,long:47.80}","service":{"id":"57bc6d6a555e5218873e5a2d","created":1471966570667,"modified":1471966570667,"origin":1471806386919,"name":"home thermostat device service","description":"manage home thermostats","lastConnected":0,"lastReported":0,"labels":["hvac","thermostat"],"adminState":"unlocked","operatingState":"enabled","addressable":{"id":"57bc6d5d555e5218873e5a2c","created":1471966557670,"modified":1471966557670,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none"}},"profile":{"id":"57bc6d7b555e5218873e5a2f","created":1471966587727,"modified":1471966587727,"origin":1471806386919,"name":"thermostat profile","manufacturer":"Honeywell","model":"ABC123","labels":["bacnet","thermostat","Honeywell"],"description":"BACnet Honeywell thermostats","resources":[{"CurrentHumidity":{"get":[{"parameter":"CurrentHumidity","operation":"get","object":"AnalogValue_22"}]}}],"commands":[{"id":"57bc6d7b555e5218873e5a2e","created":1471966587724,"modified":1471966587724,"origin":1471806386919,"name":"cooling point","get":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}]},"put":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}],"parameterNames":["coolingpoint"]}}]}}'
"400":
description: for incorrect or unparsable requests
"404":
description: if the device cannot be found by the name provided.
"500":
description: for unknown or unanticipated issues.
put:
description: Set the admin or operating state of the device (as referenced by the database generated id of the device) to the state provided (either enabled or disabled). ServiceException (HTTP 500) for unanticipated or unknown issues encountered. Throws NotFoundException (HTTP 404) if no device exists by the id provided.
body:
application/json:
example: '{"adminState":"unlocked"} or {"operatingState":"enabled"} '
responses:
"200":
description: status code indicating success
"400":
description: for incorrect or unparsable requests
"404":
description: if no device exists by the id provided.
"500":
description: for unanticipated or unknown issues encountered.
/device/label/{label}:
displayName: Device Resource (by label)
description: Example - http://localhost:48081/api/v1/device/label/hvac (where hvac is a device label)
uriParameters:
label:
displayName: label
type: string
required: false
repeat: false
get:
description: Find all Devices having at least one label matching the label provided. List may be empty if no device match. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues.
responses:
"200":
description: List of Device matching on specified label
body:
application/json:
schema: device
example: '[{"id":"57bc6d80555e5218873e5a30","created":1471966592240,"modified":1471966592240,"origin":1471806386919,"name":"livingroomthermostat","description":"living room HVAC thermostat","adminState":null,"operatingState":"enabled","addressable":{"id":"57bc6d5d555e5218873e5a2c","created":1471966557670,"modified":1471966557670,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none"},"lastConnected":0,"lastReported":0,"labels":["home","hvac","thermostat"],"location":"{lat:45.45,long:47.80}","service":{"id":"57bc6d6a555e5218873e5a2d","created":1471966570667,"modified":1471966570667,"origin":1471806386919,"name":"home thermostat device service","description":"manage home thermostats","lastConnected":0,"lastReported":0,"labels":["hvac","thermostat"],"adminState":"unlocked","operatingState":"enabled","addressable":{"id":"57bc6d5d555e5218873e5a2c","created":1471966557670,"modified":1471966557670,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none"}},"profile":{"id":"57bc6d7b555e5218873e5a2f","created":1471966587727,"modified":1471966587727,"origin":1471806386919,"name":"thermostat profile","manufacturer":"Honeywell","model":"ABC123","labels":["bacnet","thermostat","Honeywell"],"description":"BACnet Honeywell thermostats","resources":[{"CurrentHumidity":{"get":[{"parameter":"CurrentHumidity","operation":"get","object":"AnalogValue_22"}]}}],"commands":[{"id":"57bc6d7b555e5218873e5a2e","created":1471966587724,"modified":1471966587724,"origin":1471806386919,"name":"cooling point","get":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}]},"put":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}],"parameterNames":["coolingpoint"]}}]}}]'
"400":
description: for incorrect or unparsable requests
"500":
description: for unknown or unanticipated issues.
/device/profile/{profileId}:
displayName: Device Resource (by profile)
description: Example - http://localhost:48081/api/v1/device/profile/57bc6d7b555e5218873e5a2f (where the id is a device profile id)
uriParameters:
profileId:
displayName: profileId
type: string
required: false
repeat: false
get:
description: Find all devices associated to the DeviceProfile with the specified profile database generated identifier. List may be empty if no device match. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if no DeviceProfile match on the id provided.
responses:
"200":
description: List of Devices associated to the device profile
body:
application/json:
schema: device
example: '[{"id":"57bc6d80555e5218873e5a30","created":1471966592240,"modified":1471966592240,"origin":1471806386919,"name":"livingroomthermostat","description":"living room HVAC thermostat","adminState":null,"operatingState":"enabled","addressable":{"id":"57bc6d5d555e5218873e5a2c","created":1471966557670,"modified":1471966557670,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none"},"lastConnected":0,"lastReported":0,"labels":["home","hvac","thermostat"],"location":"{lat:45.45,long:47.80}","service":{"id":"57bc6d6a555e5218873e5a2d","created":1471966570667,"modified":1471966570667,"origin":1471806386919,"name":"home thermostat device service","description":"manage home thermostats","lastConnected":0,"lastReported":0,"labels":["hvac","thermostat"],"adminState":"unlocked","operatingState":"enabled","addressable":{"id":"57bc6d5d555e5218873e5a2c","created":1471966557670,"modified":1471966557670,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none"}},"profile":{"id":"57bc6d7b555e5218873e5a2f","created":1471966587727,"modified":1471966587727,"origin":1471806386919,"name":"thermostat profile","manufacturer":"Honeywell","model":"ABC123","labels":["bacnet","thermostat","Honeywell"],"description":"BACnet Honeywell thermostats","resources":[{"CurrentHumidity":{"get":[{"parameter":"CurrentHumidity","operation":"get","object":"AnalogValue_22"}]}}],"commands":[{"id":"57bc6d7b555e5218873e5a2e","created":1471966587724,"modified":1471966587724,"origin":1471806386919,"name":"cooling point","get":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}]},"put":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}],"parameterNames":["coolingpoint"]}}]}}]'
"404":
description: if no device profile match on the id provided.
"500":
description: for unknown or unanticipated issues.
/device/service/{serviceId}:
displayName: Device Resource (by service)
description: Example - http://localhost:48081/api/v1/device/service/57bc6d6a555e5218873e5a2d (where the id is the associated device service id)
uriParameters:
serviceId:
displayName: serviceId
type: string
required: false
repeat: false
get:
description: Find all devices associated to the DeviceService with the specified DeviceService database generated identifier. List may be empty if no device match. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if no DeviceService match on the id provided.
responses:
"200":
description: List of Devices associated to the device service
body:
application/json:
schema: device
example: '[{"id":"57bc6d80555e5218873e5a30","created":1471966592240,"modified":1471966592240,"origin":1471806386919,"name":"livingroomthermostat","description":"living room HVAC thermostat","adminState":null,"operatingState":"enabled","addressable":{"id":"57bc6d5d555e5218873e5a2c","created":1471966557670,"modified":1471966557670,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none"},"lastConnected":0,"lastReported":0,"labels":["home","hvac","thermostat"],"location":"{lat:45.45,long:47.80}","service":{"id":"57bc6d6a555e5218873e5a2d","created":1471966570667,"modified":1471966570667,"origin":1471806386919,"name":"home thermostat device service","description":"manage home thermostats","lastConnected":0,"lastReported":0,"labels":["hvac","thermostat"],"adminState":"unlocked","operatingState":"enabled","addressable":{"id":"57bc6d5d555e5218873e5a2c","created":1471966557670,"modified":1471966557670,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none"}},"profile":{"id":"57bc6d7b555e5218873e5a2f","created":1471966587727,"modified":1471966587727,"origin":1471806386919,"name":"thermostat profile","manufacturer":"Honeywell","model":"ABC123","labels":["bacnet","thermostat","Honeywell"],"description":"BACnet Honeywell thermostats","resources":[{"CurrentHumidity":{"get":[{"parameter":"CurrentHumidity","operation":"get","object":"AnalogValue_22"}]}}],"commands":[{"id":"57bc6d7b555e5218873e5a2e","created":1471966587724,"modified":1471966587724,"origin":1471806386919,"name":"cooling point","get":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}]},"put":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}],"parameterNames":["coolingpoint"]}}]}}]'
"404":
description: if no device service match on the id provided.
"500":
description: for unknown or unanticipated issues.
/device/servicename/{servicename}:
displayName: Device Resource (by service name)
description: Example - http://localhost:48081/api/v1/device/servicename/home thermostat device service (where home thermostat device service is the name of the device service)
uriParameters:
servicename:
displayName: servicename
type: string
required: false
repeat: false
get:
description: Find all devices associated to the DeviceService with the specified service name (DeviceService names must be unique). List may be empty if no device match. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if no DeviceService match on the name provided.
responses:
"200":
description: List of Devices associated to the device service
body:
application/json:
schema: device
example: '[{"id":"57bc6d80555e5218873e5a30","created":1471966592240,"modified":1471966592240,"origin":1471806386919,"name":"livingroomthermostat","description":"living room HVAC thermostat","adminState":null,"operatingState":"enabled","addressable":{"id":"57bc6d5d555e5218873e5a2c","created":1471966557670,"modified":1471966557670,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none"},"lastConnected":0,"lastReported":0,"labels":["home","hvac","thermostat"],"location":"{lat:45.45,long:47.80}","service":{"id":"57bc6d6a555e5218873e5a2d","created":1471966570667,"modified":1471966570667,"origin":1471806386919,"name":"home thermostat device service","description":"manage home thermostats","lastConnected":0,"lastReported":0,"labels":["hvac","thermostat"],"adminState":"unlocked","operatingState":"enabled","addressable":{"id":"57bc6d5d555e5218873e5a2c","created":1471966557670,"modified":1471966557670,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none"}},"profile":{"id":"57bc6d7b555e5218873e5a2f","created":1471966587727,"modified":1471966587727,"origin":1471806386919,"name":"thermostat profile","manufacturer":"Honeywell","model":"ABC123","labels":["bacnet","thermostat","Honeywell"],"description":"BACnet Honeywell thermostats","resources":[{"CurrentHumidity":{"get":[{"parameter":"CurrentHumidity","operation":"get","object":"AnalogValue_22"}]}}],"commands":[{"id":"57bc6d7b555e5218873e5a2e","created":1471966587724,"modified":1471966587724,"origin":1471806386919,"name":"cooling point","get":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}]},"put":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}],"parameterNames":["coolingpoint"]}}]}}]'
"400":
description: for incorrect or unparsable requests
"404":
description: if the device cannot be found by the name provided.
"500":
description: for unknown or unanticipated issues.
/device/profilename/{profilename}:
displayName: Device Resource (by profile name)
description: Example - http://localhost:48081/api/v1/device/profilename/thermostat profile (where 'thermostat profile' is the name of a device profile)
uriParameters:
profilename:
displayName: profilename
type: string
required: false
repeat: false
get:
description: Find all devices associated to the DeviceProfile with the specified profile name. List may be empty if no device match. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if no DeviceProfile match on the name provided.
responses:
"200":
description: List of Devices associated to the profile
body:
application/json:
schema: device
example: '[{"id":"57bc6d80555e5218873e5a30","created":1471966592240,"modified":1471966592240,"origin":1471806386919,"name":"livingroomthermostat","description":"living room HVAC thermostat","adminState":null,"operatingState":"enabled","addressable":{"id":"57bc6d5d555e5218873e5a2c","created":1471966557670,"modified":1471966557670,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none"},"lastConnected":0,"lastReported":0,"labels":["home","hvac","thermostat"],"location":"{lat:45.45,long:47.80}","service":{"id":"57bc6d6a555e5218873e5a2d","created":1471966570667,"modified":1471966570667,"origin":1471806386919,"name":"home thermostat device service","description":"manage home thermostats","lastConnected":0,"lastReported":0,"labels":["hvac","thermostat"],"adminState":"unlocked","operatingState":"enabled","addressable":{"id":"57bc6d5d555e5218873e5a2c","created":1471966557670,"modified":1471966557670,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none"}},"profile":{"id":"57bc6d7b555e5218873e5a2f","created":1471966587727,"modified":1471966587727,"origin":1471806386919,"name":"thermostat profile","manufacturer":"Honeywell","model":"ABC123","labels":["bacnet","thermostat","Honeywell"],"description":"BACnet Honeywell thermostats","resources":[{"CurrentHumidity":{"get":[{"parameter":"CurrentHumidity","operation":"get","object":"AnalogValue_22"}]}}],"commands":[{"id":"57bc6d7b555e5218873e5a2e","created":1471966587724,"modified":1471966587724,"origin":1471806386919,"name":"cooling point","get":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}]},"put":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}],"parameterNames":["coolingpoint"]}}]}}]'
"400":
description: for incorrect or unparsable requests
"404":
description: if the device cannot be found by the identifier provided.
"500":
description: for unknown or unanticipated issues.
/device:
displayName: Device Resource
description: Example - http://localhost:48081/api/v1/device
post:
description: Add a new Device - name must be unique. Embedded objects (device, service, profile, addressable) are all referenced in the new Device object by id or name to associated objects. All other data in the embedded objects will be ignored. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns DataValidationException (HTTP 409) if an associated object (Addressable, Profile, Service) cannot be found with the id or name provided.
body:
application/json:
schema: device
example: '{"origin":1471806386919,"name":"livingroomthermostat","description":"living room HVAC thermostat","adminState":"unlocked","operatingState":"enabled","protocols":{"example":{"host":"localhost","port":"1234","unitID":"1"}},"labels":["home","hvac","thermostat"],"location":"{lat:45.45,long:47.80}","service":{"name":"home thermostat device service"},"profile":{"name":"thermostat profile"},"autoEvents":[{"frequency":123,"onChange":true,"resource":"TestDevice"}]}'
responses:
"200":
description: database generated identifier for the new device
"400":
description: if the request is malformed or unparsable or if an associated object (Addressable, Profile, Service) cannot be found with the id or name provided
"409":
description: if the name is determined to not be unique with regard to others.
"500":
description: for unknown or unanticipated issues.
put:
description: Update the Device identified by the id or name stored in the object provided. Id is used first, name is used second for identification purposes. New device services & profiles cannot be created with a PUT, but the service and profile can replaced by referring to a new device service or profile id or name. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device cannot be found by the identifier provided.
body:
application/json:
schema: device
example: '{"id":"57bc6d80555e5218873e5a30", "description":"living room thermostat","adminState":"locked"}'
responses:
"200":
description: boolean indicating success of the update
"400":
description: if the request is malformed or unparsable
"404":
description: if the device cannot be found by the identifier provided.
"500":
description: for unknown or unanticipated issues.
get:
description: Return all devices sorted by id. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns LimitExceededException (HTTP 413) if the number returned exceeds the max limit.
responses:
"200":
description: list of device
body:
application/json:
schema: device
example: '[{"id":"57bc6d80555e5218873e5a30","created":1471966592240,"modified":1471966592240,"origin":1471806386919,"name":"livingroomthermostat","description":"living room HVAC thermostat","adminState":null,"operatingState":"enabled","protocols":{"example":{"host":"localhost","port":"1234","unitID":"1"}}},"lastConnected":0,"lastReported":0,"labels":["home","hvac","thermostat"],"location":"{lat:45.45,long:47.80}","service":{"id":"57bc6d6a555e5218873e5a2d","created":1471966570667,"modified":1471966570667,"origin":1471806386919,"name":"home thermostat device service","description":"manage home thermostats","lastConnected":0,"lastReported":0,"labels":["hvac","thermostat"],"adminState":"unlocked","operatingState":"enabled","addressable":{"id":"57bc6d5d555e5218873e5a2c","created":1471966557670,"modified":1471966557670,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none"}},"profile":{"id":"57bc6d7b555e5218873e5a2f","created":1471966587727,"modified":1471966587727,"origin":1471806386919,"name":"thermostat profile","manufacturer":"Honeywell","model":"ABC123","labels":["bacnet","thermostat","Honeywell"],"description":"BACnet Honeywell thermostats","resources":[{"CurrentHumidity":{"get":[{"parameter":"CurrentHumidity","operation":"get","object":"AnalogValue_22"}]}}],"commands":[{"id":"57bc6d7b555e5218873e5a2e","created":1471966587724,"modified":1471966587724,"origin":1471806386919,"name":"cooling point","get":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}]},"put":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}],"parameterNames":["coolingpoint"]}}]}}]'
"413":
description: if the number returned exceeds the max limit
"500":
description: for unknown or unanticipated issues
/deviceprofile/id/{id}:
displayName: DeviceProfile Resource (by id)
description: Example - http://localhost:48081/api/v1/deviceprofile/id/57bb718f555e5218873e5a27
uriParameters:
id:
displayName: id
type: string
required: false
repeat: false
delete:
description: Remove the DeviceProfile designated by database generated id. This does not remove associated commands. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device profile cannot be found by the identifier provided. Returns DataValidationException (HTTP 413) if devices still reference the profile.
responses:
"200":
description: boolean indicating success of the remove operation
"404":
description: if the device profile cannot be found with the identifier provided
"500":
description: for unknown or unanticipated issues
/deviceprofile/manufacturer/{manufacturer}/model/{model}:
displayName: DeviceProfile Resource (by manufacturer or model)
description: Example - http://localhost:48081/api/v1/deviceprofile/manufacturer/Honeywell/model/ABC123 (where Honeywell is the manufacturer associated to profiles and ABC123 is the model associated to profiles)
uriParameters:
model:
displayName: model
type: string
required: false
repeat: false
manufacturer:
displayName: manufacturer
type: string
required: false
repeat: false
get:
description: Find all DeviceProfiles with a manufacture or model attribute matching that provided (either matching provides a hit). List may be empty if no profiles match. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues.
responses:
"200":
description: List of DeviceProfile matching on specified manufacturer and/or model.
body:
application/json:
schema: devicereport
example: '[{"id":"57bb718f555e5218873e5a27","created":1471902095821,"modified":1471902095821,"origin":1471806386919,"name":"thermostat profile","manufacturer":"Honeywell","model":"ABC123","labels":["bacnet","thermostat","Honeywell"],"description":"BACnet Honeywell thermostats","resources":[{"CurrentHumidity":{"get":[{"parameter":"CurrentHumidity","operation":"get","object":"AnalogValue_22"}]}}],"commands":[{"id":"57bb718f555e5218873e5a26","created":1471902095810,"modified":1471902095810,"origin":1471806386919,"name":"cooling point","get":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}]},"put":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}],"parameterNames":["coolingpoint"]}}]}]'
"400":
description: for malformed or unparsable requests
"500":
description: for unknown or unanticipated issues
/deviceprofile/manufacturer/{manufacturer}:
displayName: DeviceProfile Resource (by manufacturer)
description: Example - http://localhost:48081/api/v1/deviceprofile/manufacturer/Honeywell (where Honeywell is the manufacturer associated to profiles)
uriParameters:
manufacturer:
displayName: manufacturer
type: string
required: false
repeat: false
get:
description: Find all DeviceProfiles with a manufacture attribute matching that provided. List may be empty if no profiles match. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues.
responses:
"200":
description: List of DeviceProfile matching on specified manufacturer.
body:
application/json:
schema: deviceprofile
example: '[{"id":"57bb718f555e5218873e5a27","created":1471902095821,"modified":1471902095821,"origin":1471806386919,"name":"thermostat profile","manufacturer":"Honeywell","model":"ABC123","labels":["bacnet","thermostat","Honeywell"],"description":"BACnet Honeywell thermostats","resources":[{"CurrentHumidity":{"get":[{"parameter":"CurrentHumidity","operation":"get","object":"AnalogValue_22"}]}}],"commands":[{"id":"57bb718f555e5218873e5a26","created":1471902095810,"modified":1471902095810,"origin":1471806386919,"name":"cooling point","get":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}]},"put":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}],"parameterNames":["coolingpoint"]}}]}]'
"400":
description: for malformed or unparsable requests
"500":
description: for unknown or unanticipated issues
/deviceprofile/name/{name}:
displayName: DeviceProfile Resource (by name)
description: Example - http://localhost:48081/api/v1/deviceprofile/name/thermostat profile (where thermostat profile is the name of a profile)
uriParameters:
name:
displayName: name
type: string
required: false
repeat: false
delete:
description: Remove the DeviceProfile designated by unique name. This does not remove associated commands. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device profile cannot be found by the name provided. Returns DataValidationException (HTTP 409) if devices still reference the profile.
responses:
"200":
description: boolean indicating success of the remove operation
"400":
description: for malformed or unparsable requests
"404":
description: if the device profile cannot be found by the name provided
"409":
description: if devices still reference the profile
"500":
description: for unknown or unanticipated issues
get:
description: Return the DeviceProfile matching given name (profile names should be unique). May be null if no profiles matches on the name provided. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device profile cannot be found by the name provided.
responses:
"200":
description: device profile matching on name
body:
application/json:
schema: deviceprofile
example: '{"id":"57bb718f555e5218873e5a27","created":1471902095821,"modified":1471902095821,"origin":1471806386919,"name":"thermostat profile","manufacturer":"Honeywell","model":"ABC123","labels":["bacnet","thermostat","Honeywell"],"description":"BACnet Honeywell thermostats","resources":[{"CurrentHumidity":{"get":[{"parameter":"CurrentHumidity","operation":"get","object":"AnalogValue_22"}]}}],"commands":[{"id":"57bb718f555e5218873e5a26","created":1471902095810,"modified":1471902095810,"origin":1471806386919,"name":"cooling point","get":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}]},"put":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}],"parameterNames":["coolingpoint"]}}]}'
"400":
description: for malformed or unparsable requests
"404":
description: if the device profile cannot be found by the name provided
"500":
description: for unknown or unanticipated issues
/deviceprofile/uploadfile:
displayName: DeviceProfile Resource (upload YAML file)
description: Example - http://localhost:48081/api/v1/deviceprofile/uploadfile
post:
description: Add a new DeviceProfile (and associated Command objects) via YAML profile file - name must be unique. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns DataValidationException (HTTP 409) if an associated command's name is a duplicate for the profile. Returns ClientException (HTTP 400) if the YAML file is empty.
responses:
"200":
description: database generated identifier for the new device profile
"400":
description: if the YAML file is empty
"409":
description: if an associated command's name is a duplicate for the profile or if the name is determined to not be unique with regard to others
"500":
description: for unknown or unanticipated issues
/deviceprofile/{id}:
displayName: DeviceProfile Resource (by id)
description: Example - http://localhost:48081/api/v1/deviceprofile/57bb718f555e5218873e5a27
uriParameters:
id:
displayName: id
type: string
required: false
repeat: false
get:
description: Fetch a specific profile by database generated id. May return null if no profile with the id is found. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device profile cannot be found by the id provided.
responses:
"200":
description: device profile matching on id
body:
application/json:
schema: deviceprofile
example: '{"id":"57bb718f555e5218873e5a27","created":1471902095821,"modified":1471902095821,"origin":1471806386919,"name":"thermostat profile","manufacturer":"Honeywell","model":"ABC123","labels":["bacnet","thermostat","Honeywell"],"description":"BACnet Honeywell thermostats","resources":[{"CurrentHumidity":{"get":[{"parameter":"CurrentHumidity","operation":"get","object":"AnalogValue_22"}]}}],"commands":[{"id":"57bb718f555e5218873e5a26","created":1471902095810,"modified":1471902095810,"origin":1471806386919,"name":"cooling point","get":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}]},"put":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}],"parameterNames":["coolingpoint"]}}]}'
"404":
description: if the device profile cannot be found by the id provided
"500":
description: for unknown or unanticipated issues
/deviceprofile/upload:
displayName: DeviceProfile Resource (upload YAML)
description: Example - http://localhost:48081/api/v1/deviceprofile/upload
post:
description: Add a new DeviceProfile (and associated Command objects) via YAML content - name must be unique. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns DataValidationException (HTTP 409) if an associated command's name is a duplicate for the profile.
responses:
"200":
description: database generated identifier for the new device profile
"400":
description: if the YAML file is empty
"409":
description: if an associated command's name is a duplicate for the profile or if the name is determined to not be unique with regard to others
"500":
description: for unknown or unanticipated issues
/deviceprofile/yaml/name/{name}:
displayName: DeviceProfile Resource (by name)
description: Example - http://localhost:48081/api/v1/deviceprofile/yaml/name/thermostat profile (where thermostat profile is the name of a profile)
uriParameters:
name:
displayName: name
type: string
required: false
repeat: false
get:
description: Return, in yaml form, the DeviceProfiles matching given name (profile names should be unique). May be null if no profiles matches on the name provided. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device profile cannot be found by the name provided.
responses:
"200":
description: device profile in YAML matching on name
body:
application/json:
schema: deviceprofile
"400":
description: for malformed or unparsable requests
"404":
description: if the device profile cannot be found by the name provided
"500":
description: for unknown or unanticipated issues
/deviceprofile/yaml/{id}:
displayName: DeviceProfile Resource (by id)
description: Example - http://localhost:48081/api/v1/deviceprofile/yaml/57bb718f555e5218873e5a27
uriParameters:
id:
displayName: id
type: string
required: false
repeat: false
get:
description: Fetch the profile identified by database generated id and return as a YAML string. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. eturns NotFoundException (HTTP 404) if the device profile cannot be found by the name provided.
responses:
"200":
description: device profile in YAML format
body:
application/json:
schema: deviceprofile
"404":
description: if the device profile cannot be found by the id provided
"500":
description: for unknown or unanticipated issues
/deviceprofile/model/{model}:
displayName: DeviceProfile Resource (by model)
description: Example - http://localhost:48081/api/v1/deviceprofile/model/ABC123 (where ABC123 is a model associated to a profile)
uriParameters:
model:
displayName: model
type: string
required: false
repeat: false
get:
description: Find all DeviceProfiles with a model attribute matching that provided. List may be empty if no profiles match. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues.
responses:
"200":
description: List of DeviceProfile matching on specified model.
body:
application/json:
schema: deviceprofile
example: '[{"id":"57bb718f555e5218873e5a27","created":1471902095821,"modified":1471902095821,"origin":1471806386919,"name":"thermostat profile","manufacturer":"Honeywell","model":"ABC123","labels":["bacnet","thermostat","Honeywell"],"description":"BACnet Honeywell thermostats","resources":[{"CurrentHumidity":{"get":[{"parameter":"CurrentHumidity","operation":"get","object":"AnalogValue_22"}]}}],"commands":[{"id":"57bb718f555e5218873e5a26","created":1471902095810,"modified":1471902095810,"origin":1471806386919,"name":"cooling point","get":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}]},"put":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}],"parameterNames":["coolingpoint"]}}]}]'
"400":
description: for malformed or unparsable requests
"500":
description: for unknown or unanticipated issues
/deviceprofile/label/{label}:
displayName: DeviceProfile Resource (by label)
description: Example - http://localhost:48081/api/v1/deviceprofile/label/bacnet (where bacnet is a label associated to profiles)
uriParameters:
label:
displayName: label
type: string
required: false
repeat: false
get:
description: Find all DeviceProfiles having at least one label matching the label provided. List may be empty if no profiles match. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues.
responses:
"200":
description: List of DeviceProfile matching on specified label
body:
application/json:
schema: deviceprofile
example: '[{"id":"57bb718f555e5218873e5a27","created":1471902095821,"modified":1471902095821,"origin":1471806386919,"name":"thermostat profile","manufacturer":"Honeywell","model":"ABC123","labels":["bacnet","thermostat","Honeywell"],"description":"BACnet Honeywell thermostats","resources":[{"CurrentHumidity":{"get":[{"parameter":"CurrentHumidity","operation":"get","object":"AnalogValue_22"}]}}],"commands":[{"id":"57bb718f555e5218873e5a26","created":1471902095810,"modified":1471902095810,"origin":1471806386919,"name":"cooling point","get":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}]},"put":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}],"parameterNames":["coolingpoint"]}}]}]'
"400":
description: for malformed or unparsable requests
"500":
description: for unknown or unanticipated issues
/deviceprofile:
displayName: DeviceProfile Resource
description: Example - http://localhost:48081/api/v1/deviceprofile
post:
description: Add a new DeviceProfile (and associated Command objects) - name must be unique. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns DataValidationException (HTTP 409) if an associated command's name is a duplicate for the profile.
body:
application/json:
schema: deviceprofile
example: '{"origin":1471806386919,"name":"thermostat profile","description":"BACnet Honeywell thermostats","manufacturer":"Honeywell","model":"ABC123", "labels":["bacnet","thermostat","Honeywell"],"commands":[{"origin":1471806386919,"name":"cooling point","get":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}]},"put":{"path":"/cooling", "responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}], "parameterNames":["coolingpoint"]}}],"resources":[{"CurrentHumidity":{"get":[{"parameter":"CurrentHumidity","operation":"get","object":"AnalogValue_22"}]}}]}'
responses:
"200":
description: database generated identifier for the new device profile
"400":
description: for malformed or unparsable requests
"409":
description: if an associated command's name is a duplicate for the profile or if the name is determined to not be unique with regard to others.
"500":
description: for unknown or unanticipated issues
put:
description: Update the DeviceProfile identified by the id or name stored in the object provided. Id is used first, name is used second for identification purposes. Associated commands must be updated directly. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the profile cannot be found by the identifier provided.
body:
application/json:
schema: deviceprofile
example: '{"id":"57bb718f555e5218873e5a27","description":"HTTP Honeywell thermostats"}'
responses:
"200":
description: boolean indicating success of the update
"404":
description: if the profile cannot be found by the identifier provided
"400":
description: for malformed or unparsable requests
"500":
description: for unknown or unanticipated issues
get:
description: Return all profiles sorted by id. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns LimitExceededException (HTTP 413) if the number returned exceeds the max limit.
responses:
"200":
description: list of profiles
body:
application/json:
schema: deviceprofile
example: '[{"id":"57bb718f555e5218873e5a27","created":1471902095821,"modified":1471902095821,"origin":1471806386919,"name":"thermostat profile","manufacturer":"Honeywell","model":"ABC123","labels":["bacnet","thermostat","Honeywell"],"description":"BACnet Honeywell thermostats","resources":[{"CurrentHumidity":{"get":[{"parameter":"CurrentHumidity","operation":"get","object":"AnalogValue_22"}]}}],"commands":[{"id":"57bb718f555e5218873e5a26","created":1471902095810,"modified":1471902095810,"origin":1471806386919,"name":"cooling point","get":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}]},"put":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}],"parameterNames":["coolingpoint"]}}]}]'
"413":
description: if the number returned exceeds the max limit
"500":
description: for unknown or unanticipated issues
/devicereport/id/{id}:
displayName: DeviceReport Resource (by id)
description: Example - http://localhost:48081/api/v1/devicereport/id/57bb6491555e5218873e5a35
uriParameters:
id:
displayName: id
type: string
required: false
repeat: false
delete:
description: Remove the DevicReport designated by database generated id. Internal Service Error (HTTP 500) for unknown or unanticipated issues. NotFoundException (HTTP 404) if no DeviceReport is found with the provided id.
responses:
"200":
description: boolean indicating success of the remove operation
"404":
description: if no DeviceReport is found with the provided id
"500":
description: for unknown or unanticipated issues
/devicereport/name/{name}:
displayName: DeviceReport Resource (by name)
description: Example - http://localhost:48081/api/v1/devicereport/name/livingroom collection report (where livingroom collection report is the name of a device report)
uriParameters:
name:
displayName: name
type: string
required: false
repeat: false
delete:
description: Remove the DevicReport designated by name. Internal Service Error (HTTP 500) for unknown or unanticipated issues. NotFoundException (HTTP 404) if no DeviceReport is found with the provided name.
responses:
"200":
description: boolean indicating success of the remove operation
"400":
description: for malformed or unparsable requests
"404":
description: if no DeviceReport is found with the provided name
"500":
description: for unknown or unanticipated issues
get:
description: Return DeviceReport matching given name (device report names should be unique). May be null if no report matches on the name provided. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. NotFoundException (HTTP 404) if no DeviceReport is found with the provided name.
responses:
"200":
description: device report matching on name
body:
application/json:
schema: devicereport
example: '{"id":"57bc88d8555e5218873e5a34","created":1471973592027,"modified":1471973592027,"origin":1471806386919,"name":"livingroom collection report","device":"livingroomthermostat","event":"temperature collection","expected":["temperature"]}'
"400":
description: for malformed or unparsable requests
"404":
description: if no DeviceReport is found with the provided name
"500":
description: for unknown or unanticipated issues
/devicereport/{id}:
displayName: DeviceReport Resource (by id)
description: Example - http://localhost:48081/api/v1/devicereport/57bb6491555e5218873e5a35
uriParameters:
id:
displayName: id
type: string
required: false
repeat: false
get:
description: Fetch a specific DeviceReport by database generated id. May return null if no report with the id is found. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. NotFoundException (HTTP 404) if no DeviceReport is found with the provided id.
responses:
"200":
description: device report matching on the id
body:
application/json:
schema: devicereport
example: '{"id":"57bc88d8555e5218873e5a34","created":1471973592027,"modified":1471973592027,"origin":1471806386919,"name":"livingroom collection report","device":"livingroomthermostat","event":"temperature collection","expected":["temperature"]}'
"404":
description: if no DeviceReport is found with the provided id
"500":
description: for unknown or unanticipated issues
/devicereport/devicename/{devicename}:
displayName: DeviceReport Resources (by device name)
description: Example - http://localhost:48081/api/v1/devicereport/devicename/livingroomthermostat (where livingroomthermostat is the name of a device )
uriParameters:
devicename:
displayName: devicename
type: string
required: false
repeat: false
get:
description: Return DeviceReports with associated device matching given name (device names should be unique). May be an empty list if no device matches on the name provided. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues.
responses:
"200":
description: device reports matching on device name
body:
application/json:
schema: devicereport
example: '[{"id":"57bc88d8555e5218873e5a34","created":1471973592027,"modified":1471973592027,"origin":1471806386919,"name":"livingroom collection report","device":"livingroomthermostat","event":"temperature collection","expected":["temperature"]}]'
"400":
description: for malformed or unparsable requests
"500":
description: for unknown or unanticipated issues
/devicereport/valueDescriptorsFor/{devicename}:
displayName: Value Descriptor names (associated to device reports for given device name)
description: Example - http://localhost:48081/api/v1/devicereport/valueDescriptorsFor/livingroomthermostat (where livingroomthermostat is the name of a device )
uriParameters:
devicename:
displayName: devicename
type: string
required: false
repeat: false
get:
description: Return list of value descriptor names associated to device reports associated to name of the device provided. May be an empty list if no device matches on the name provided. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues.
responses:
"200":
description: value descriptor names
body:
application/json:
example: '["temperature", "rpm"]'
"400":
description: for malformed or unparsable requests
"500":
description: for unknown or unanticipated issues
/devicereport:
displayName: DeviceReport Resource
description: Example - http://localhost:48081/api/v1/devicereport
post:
description: Add a new DeviceReport - name must be unique. Referenced objects (device, interval action) are all referenced in the new DeviceReport by name and must already be persisted. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. NotFoundException (HTTP 404) if any referenced object cannot be found by its provided name.
body:
application/json:
schema: devicereport
example: '{"origin":1471806386919,"name":"livingroom collection report","device":"livingroomthermostat","action":"temperature collection","expected":["temperature"]}'
responses:
"200":
description: database generated identifier for the new device report
"400":
description: for malformed or unparsable requests
"404":
description: if any referenced object cannot be found by its provided name
"500":
description: for unknown or unanticipated issues
put:
description: Update the DeviceReport identified by the id or name in the object provided. Id is used first, name is used second for identification purposes. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. NotFoundException (HTTP 404) if any referenced object cannot be found by its provided name.
body:
application/json:
schema: devicereport
example: '{"id":"57bb6491555e5218873e5a35","expected":["hvactemp"]}'
responses:
"200":
description: boolean indicating success of the update
"400":
description: for malformed or unparsable requests
"404":
description: if any referenced object cannot be found by its provided name
"500":
description: for unknown or unanticipated issues
get:
description: Return all device reports sorted by id. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns LimitExceededException (HTTP 413) if the number returned exceeds the max limit.
responses:
"200":
description: list of device reports
body:
application/json:
schema: devicereport
example: '[{"id":"57bc88d8555e5218873e5a34","created":1471973592027,"modified":1471973592027,"origin":1471806386919,"name":"livingroom collection report","device":"livingroomthermostat","action":"temperature collection","expected":["temperature"]}]'
"413":
description: if the number returned exceeds the max limit.
"500":
description: for unknown or unanticipated issues
/deviceservice/id/{id}:
displayName: DeviceService Resource (by id)
description: Example - http://localhost:48081/api/v1/deviceservice/id/57bbbf8432d22c1c33934c61
uriParameters:
id:
displayName: id
type: string
required: false
repeat: false
delete:
description: Remove the DeviceService designated by database generated id. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device service cannot be found by the identifier provided.
responses:
"200":
description: boolean indicating success of the remove operation
"404":
description: if no device service is found for the provided id
"500":
description: for unknown or unanticipated issues
/deviceservice/addressablename/{addressablename}:
displayName: DeviceService Resource (by addressable name)
description: Example - http://localhost:48081/api/v1/deviceservice/addressablename/hvac thermo address (where hvac thermo address is the name of an addressable)
uriParameters:
addressablename:
displayName: addressablename
type: string
required: false
repeat: false
get:
description: Find all device serices associated to the Addressable with the specified addressable name. List may be empty if no device services match. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if no Addressable match on the name provided.
responses:
"200":
description: List of DeviceServices associated to the addressable
body:
application/json:
schema: deviceservice
example: '[{"id":"57bbbf8432d22c1c33934c61","created":1471922052444,"modified":1471922478043,"origin":1471806386919,"name":"home thermostat device service","description":"manager service for home thermostats","lastConnected":0,"lastReported":0,"labels":["hvac","thermostat","home"],"adminState":"unlocked","operatingState":"enabled","addressable":{"id":"57bbac0332d22c1c33934c60","created":1471917059552,"modified":1471917059552,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none"}}]'
"404":
description: if no addressable is found for the provided id
"500":
description: for unknown or unanticipated issues
/deviceservice/name/{name}/opstate/{opState}:
displayName: DeviceService Resource (update op state by name)
description: Example - http://localhost:48081/api/v1/deviceservice/name/home thermostat device service/opstate/enabled (where home thermostat device service is the name of a device service)
uriParameters:
opState:
displayName: opState
type: string
required: false
repeat: false
name:
displayName: name
type: string
required: false
repeat: false
put:
description: Update the op status time of the device service by unique name of the device service. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device service cannot be found by the name provided.
responses:
"200":
description: boolean indicating success of the operation
"400":
description: for malformed or unparsable requests
"404":
description: if no device service is found for the provided id
"500":
description: for unknown or unanticipated issues
/deviceservice/name/{name}/adminstate/{adminState}:
displayName: DeviceService Resource (update admin state by name)
description: Example - http://localhost:48081/api/v1/deviceservice/name/home thermostat device service/adminstate/unlocked (where home thermostat device service is the name of a device service)
uriParameters:
name:
displayName: name
type: string
required: false
repeat: false
adminState:
displayName: adminState
type: string
required: false
repeat: false
put:
description: Update the admin state of the device service by device service name. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device service cannot be found by the identifier provided.
responses:
"200":
description: boolean indicating success of the operation
"400":
description: for malformed or unparsable requests
"404":
description: if no device service is found for the provided id
"500":
description: for unknown or unanticipated issues
/deviceservice/name/{name}/lastreported/{time}:
displayName: DeviceService Resource (update last reported by name)
description: Example - http://localhost:48081/api/v1/deviceservice/name/home thermostat device service/lastreported/1471922060000 (where home thermostat device service is the name of a device service)
uriParameters:
time:
displayName: time
type: string
required: false
repeat: false
name:
displayName: name
type: string
required: false
repeat: false
put:
description: Update the last reported time of the device service by unique name of the device service. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device service cannot be found by the name provided.
responses:
"200":
description: boolean indicating success of update
"400":
description: for malformed or unparsable requests
"404":
description: if no device service is found for the provided id
"500":
description: for unknown or unanticipated issues
/deviceservice/name/{name}/lastconnected/{time}:
displayName: DeviceService Resource (update last connected by name)
description: Example - http://localhost:48081/api/v1/deviceservice/name/home thermostat device service/lastconnected/1471922060000 (where home thermostat device service is the name of a device service)
uriParameters:
time:
displayName: time
type: string
required: false
repeat: false
name:
displayName: name
type: string
required: false
repeat: false
put:
description: Update the last connected time of the device service by unique name of the device service. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device service cannot be found by the name provided.
responses:
"200":
description: boolean indicating success of update
"400":
description: for malformed or unparsable requests
"404":
description: if no device service is found for the provided id
"503":
description: for unknown or unanticipated issues
/deviceservice/name/{name}:
displayName: DeviceService Resource (by name)
description: Example - http://localhost:48081/api/v1/deviceservice/name/home thermostat device service (where home thermostat device service is the name of a device service)
uriParameters:
name:
displayName: name
type: string
required: false
repeat: false
delete:
description: Remove the DeviceService designated by name. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device service cannot be found by the name provided.
responses:
"200":
description: boolean indicating success of the remove operation
"400":
description: for malformed or unparsable requests
"404":
description: if no device service is found for the provided id
"503":
description: for unknown or unanticipated issues
get:
description: Return the DeviceService matching given name (service names should be unique). May be null if no services matches on the name provided. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device service cannot be found by the name provided.
responses:
"200":
description: device service matching on name
"400":
description: for malformed or unparsable requests
"404":
description: if no device service is found for the provided id
"500":
description: for unknown or unanticipated issues
/deviceservice/{id}/opstate/{opState}:
displayName: DeviceService Resource (update op state)
description: Example - http://localhost:48081/api/v1/deviceservice/57bbbf8432d22c1c33934c61/opstate/disabled
uriParameters:
id:
displayName: id
type: string
required: false
repeat: false
opState:
displayName: opState
type: string
required: false
repeat: false
put:
description: Update the op state of the device service by database generated identifier. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device service cannot be found by the identifier provided.
responses:
"200":
description: boolean indicating success of the operation
"400":
description: for malformed or unparsable requests
"404":
description: if no device service is found for the provided id
"500":
description: for unknown or unanticipated issues
/deviceservice/{id}/adminstate/{adminState}:
displayName: DeviceService Resource (update admin state)
description: Example - http://localhost:48081/api/v1/deviceservice/57bbbf8432d22c1c33934c61/adminstate/locked
uriParameters:
id:
displayName: id
type: string
required: false
repeat: false
adminState:
displayName: adminState
type: string
required: false
repeat: false
put:
description: Update the admin state of the device service by database generated identifier. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device service cannot be found by the identifier provided.
responses:
"200":
description: boolean indicating success of the operation
"400":
description: for malformed or unparsable requests
"404":
description: if no device service is found for the provided id
"500":
description: for unknown or unanticipated issues
/deviceservice/{id}/lastreported/{time}:
displayName: DeviceService Resource (update last reported)
description: Example - http://localhost:48081/api/v1/deviceservice/57bbbf8432d22c1c33934c61/lastreported/1471922060100
uriParameters:
id:
displayName: id
type: string
required: false
repeat: false
time:
displayName: time
type: string
required: false
repeat: false
put:
description: Update the last reported time of the device service by database generated identifier. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device service cannot be found by the identifier provided.
responses:
"200":
description: boolean indicating success of update
"400":
description: for malformed or unparsable requests
"404":
description: if no device service is found for the provided id
"503":
description: for unknown or unanticipated issues
/deviceservice/{id}/lastconnected/{time}:
displayName: DeviceService Resource (update last connected)
description: Example - http://localhost:48081/api/v1/deviceservice/57bbbf8432d22c1c33934c61/lastconnected/1471922060000
uriParameters:
id:
displayName: id
type: string
required: false
repeat: false
time:
displayName: time
type: string
required: false
repeat: false
put:
description: Update the last connected time of the device service by database generated identifier. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device service cannot be found by the identifier provided.
responses:
"200":
description: boolean indicating success of update
"400":
description: for malformed or unparsable requests
"404":
description: if no device service is found for the provided id
"500":
description: for unknown or unanticipated issues
/deviceservice/{id}:
displayName: DeviceService Resource (by id)
description: Example - http://localhost:48081/api/v1/deviceservice/57bbbf8432d22c1c33934c61
uriParameters:
id:
displayName: id
type: string
required: false
repeat: false
get:
description: Fetch a specific device service by database generated id. May return null if no service with the id is found. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device service cannot be found by the identifier provided.
responses:
"200":
description: device service matching on id
body:
application/json:
schema: deviceservice
example: '{"id":"57bbbf8432d22c1c33934c61","created":1471922052444,"modified":1471922478043,"origin":1471806386919,"name":"home thermostat device service","description":"manager service for home thermostats","lastConnected":0,"lastReported":0,"labels":["hvac","thermostat","home"],"adminState":"unlocked","operatingState":"enabled","addressable":{"id":"57bbac0332d22c1c33934c60","created":1471917059552,"modified":1471917059552,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none"}}'
"404":
description: if no device service is found for the provided id
"500":
description: for unknown or unanticipated issues
/deviceservice/addressable/{addressableId}:
displayName: DeviceService Resource (by addressable)
description: Example - http://localhost:48081/api/v1/deviceservice/addressable/57bbac0332d22c1c33934c60 (the id is an addressable id)
uriParameters:
addressableId:
displayName: addressableId
type: string
required: false
repeat: false
get:
description: Find all device servicess associated to the Addressable with the specified addressable database generated identifier. List may be empty if no device service match. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if no Addressable match on the id provided.
responses:
"200":
description: List of DeviceServices associated to the addressable
body:
application/json:
schema: deviceservice
example: '[{"id":"57bbbf8432d22c1c33934c61","created":1471922052444,"modified":1471922478043,"origin":1471806386919,"name":"home thermostat device service","description":"manager service for home thermostats","lastConnected":0,"lastReported":0,"labels":["hvac","thermostat","home"],"adminState":"unlocked","operatingState":"enabled","addressable":{"id":"57bbac0332d22c1c33934c60","created":1471917059552,"modified":1471917059552,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none"}}]'
"404":
description: if no addressablee is found for the provided id
"500":
description: for unknown or unanticipated issues
/deviceservice/label/{label}:
displayName: DeviceService Resource (by label)
description: Example - http://localhost:48081/api/v1/deviceservice/label/hvac (where hvac is a label associated to device services)
uriParameters:
label:
displayName: label
type: string
required: false
repeat: false
get:
description: Find all DeviceServices having at least one label matching the label provided. List may be empty if no device services match. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues.
responses:
"200":
description: List of DeviceService matching on specified label
body:
application/json:
schema: deviceservice
example: '[{"id":"57bbbf8432d22c1c33934c61","created":1471922052444,"modified":1471922478043,"origin":1471806386919,"name":"home thermostat device service","description":"manager service for home thermostats","lastConnected":0,"lastReported":0,"labels":["hvac","thermostat","home"],"adminState":"unlocked","operatingState":"enabled","addressable":{"id":"57bbac0332d22c1c33934c60","created":1471917059552,"modified":1471917059552,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none"}}]'
"400":
description: for malformed or unparsable requests
"500":
description: for unknown or unanticipated issues
/deviceservice:
displayName: DeviceService Resource
description: Example - http://localhost:48081/api/v1/deviceservice
post:
description: Add a new DeviceService - name must be unique. The Addressable must already exist and can be referenced by an included Addressable object containing the Addressable's id or name. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns DataValidationException (HTTP 409) if an associated addressable (by id or name) is not found.
body:
application/json:
schema: deviceservice
example: '{"origin":1471806386919,"name":"home thermostat device service","description":"manage home thermostats","labels":["hvac","thermostat"],"adminState":"unlocked","operatingState":"enabled","addressable":{"name":"hvac thermo address"}}'
responses:
"200":
description: database generated identifier for the new device service
"400":
description: no addressable was provided for the new device service
"404":
description: if an associated addressable (by id or name) is not found
"409":
description: if the addressable name is determined to not be unique with regard to others
"500":
description: for unknown or unanticipated issues
put:
description: Update the DeviceServcie identified by the id or name stored in the object provided. Id is used first, name is used second for identification purposes. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if the device service cannot be found by the identifier provided.
body:
application/json:
schema: deviceservice
example: '{"id":"57bbbf8432d22c1c33934c61","description":"manager service for home thermostats","labels":["hvac","thermostat","home"]}'
responses:
"200":
description: boolean indicating success of the update
"400":
description: for malformed or unparsable requests
"404":
description: if no device service is found with the provided name or id
"503":
description: for unknown or unanticipated issues
get:
description: Return all device services sorted by id. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns LimitExceededException (HTTP 413) if the number returned exceeds the max limit.
responses:
"200":
description: list of profiles
body:
application/json:
schema: deviceservice
example: '[{"id":"57bbbf8432d22c1c33934c61","created":1471922052444,"modified":1471922478043,"origin":1471806386919,"name":"home thermostat device service","description":"manager service for home thermostats","lastConnected":0,"lastReported":0,"labels":["hvac","thermostat","home"],"adminState":"unlocked","operatingState":"enabled","addressable":{"id":"57bbac0332d22c1c33934c60","created":1471917059552,"modified":1471917059552,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none"}}]'
"413":
description: if the number of device services exceeds the current max limit.
"500":
description: for unknown or unanticipated issues
/provisionwatcher/id/{id}:
displayName: ProvisionWatcher Resource (by id)
description: Example - http://localhost:48081/api/v1/provisionwatcher/id/57ce0461add4b99e5d020534
uriParameters:
id:
displayName: id
description: database generated id
type: string
required: false
repeat: false
delete:
description: Remove the ProvisionWatcher designated by the database generated id for the ProvisionWatcher. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if no provision watcher with the provided id is found.
displayName: delete provision watcher by id
responses:
"200":
description: boolean indicating success of the remove operation
"404":
description: if no provision watcher with the provided id is found.
"500":
description: for unknown or unanticipated issues
/provisionwatcher/{id}:
displayName: ProvisionWatcher Resource (by id)
description: Example - http://localhost:48081/api/v1/provisionwatcher/57ce0523add4b99e5d020535
uriParameters:
id:
displayName: id
description: database generated id
type: string
required: false
repeat: false
get:
description: Fetch a specific provision watcher by database generated id. May return null if no provision watcher matches on id. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if no provision watcher with the provided id is found.
displayName: get provision watcher by id
responses:
"200":
description: provision watcher
body:
application/json:
schema: provisionwatcher
example: '{"id":"57cf3a13555ebf53636e2654","created":1473198611772,"modified":1473198611772,"origin":1471806386919,"name":"bacnet watcher","identifiers":{"MAC":"00-05-1B-A1-99-99","HTTP":"10.0.0.1"},"profile":{"id":"57cf3849555ebf53636e2651","created":1473198153474,"modified":1473198153474,"origin":1471806386919,"name":"thermostat profile","manufacturer":"Honeywell","model":"ABC123","labels":["bacnet","thermostat","Honeywell"],"description":"BACnet Honeywell thermostats","resources":[{"CurrentHumidity":{"get":[{"parameter":"CurrentHumidity","operation":"get","object":"AnalogValue_22"}]}}],"commands":[{"id":"57cf3849555ebf53636e2650","created":1473198153434,"modified":1473198153434,"origin":1471806386919,"name":"cooling point","get":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}]},"put":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}],"parameterNames":["coolingpoint"]}}]},"service":{"id":"57cf3882555ebf53636e2653","created":1473198210365,"modified":1473198210365,"origin":1471806386919,"name":"home thermostat device service","description":"manage home thermostats","lastConnected":0,"lastReported":0,"labels":["hvac","thermostat"],"adminState":"unlocked","operatingState":"enabled","addressable":{"id":"57cf3875555ebf53636e2652","created":1473198197783,"modified":1473198197783,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none"}}}'
"404":
description: if no provision watcher with the provided id is found.
"500":
description: for unknown or unanticipated issues
/provisionwatcher/name/{name}:
displayName: ProvisionWatcher Resource (by name)
description: Example - http://localhost:48081/api/v1/provisionwatcher/name/bacnet watcher (where bacnet watcher is the unique name of an ProvisionWatcher)
uriParameters:
name:
displayName: name
description: unique name of provision watcher
type: string
required: false
repeat: false
delete:
description: Remove the ProvisionWatcher designated by unique name identifier. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if no provision watcher with the provided name is found.
displayName: delete provision watcher by name
responses:
"200":
description: boolean indicating success of the remove operation
"400":
description: for malformed or unparsable requests
"404":
description: if no provision watcher with the provided name is found.
"500":
description: for unknown or unanticipated issues.
get:
description: Return ProvisionWatcher with matching name (name should be unique). May be null if none match. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if no provision watcher with the provided name is found.
displayName: get provision watcher by name
responses:
"200":
description: provision watcher matching on name
body:
application/json:
schema: provisionwatcher
example: '{"id":"57cf3a13555ebf53636e2654","created":1473198611772,"modified":1473198611772,"origin":1471806386919,"name":"bacnet watcher","identifiers":{"MAC":"00-05-1B-A1-99-99","HTTP":"10.0.0.1"},"profile":{"id":"57cf3849555ebf53636e2651","created":1473198153474,"modified":1473198153474,"origin":1471806386919,"name":"thermostat profile","manufacturer":"Honeywell","model":"ABC123","labels":["bacnet","thermostat","Honeywell"],"description":"BACnet Honeywell thermostats","resources":[{"CurrentHumidity":{"get":[{"parameter":"CurrentHumidity","operation":"get","object":"AnalogValue_22"}]}}],"commands":[{"id":"57cf3849555ebf53636e2650","created":1473198153434,"modified":1473198153434,"origin":1471806386919,"name":"cooling point","get":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}]},"put":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}],"parameterNames":["coolingpoint"]}}]},"service":{"id":"57cf3882555ebf53636e2653","created":1473198210365,"modified":1473198210365,"origin":1471806386919,"name":"home thermostat device service","description":"manage home thermostats","lastConnected":0,"lastReported":0,"labels":["hvac","thermostat"],"adminState":"unlocked","operatingState":"enabled","addressable":{"id":"57cf3875555ebf53636e2652","created":1473198197783,"modified":1473198197783,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none"}}}'
"400":
description: for malformed or unparsable requests
"404":
description: if no provision watcher with the provided name is found.
"500":
description: for unknown or unanticipated issues.
/provisionwatcher/profile/{profileId}:
displayName: ProvisionWatcher Resource (by profile)
description: Example - http://localhost:48081/api/v1/provisionwatcher/profile/57ce033aadd4b99e5d020532 (where the id is a device profile id)
uriParameters:
profileId:
displayName: profileId
type: string
required: false
repeat: false
get:
description: Find all provision watchers associated to the DeviceProfile with the specified profile database generated identifier. List may be empty if no provision watchers match. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if no DeviceProfile match on the id provided.
responses:
"200":
description: List of ProvisionWatchers associated to the device profile
body:
application/json:
schema: provisionwatcher
example: '[{"id":"57ce0523add4b99e5d020535","created":1473119523238,"modified":1473119523238,"origin":1471806386919,"name":"bacnet watcher","identifiers":{"MAC":"00-05-1B-A1-99-99","HTTP":"10.0.0.1"},"profile":{"id":"57ce033aadd4b99e5d020532","created":1473119034719,"modified":1473119034719,"origin":1471806386919,"name":"thermostat profile","manufacturer":"Honeywell","model":"ABC123","labels":["bacnet","thermostat","Honeywell"],"description":"BACnet Honeywell thermostats","resources":[{"CurrentHumidity":{"get":[{"parameter":"CurrentHumidity","operation":"get","object":"AnalogValue_22"}]}}],"commands":[{"id":"57ce033aadd4b99e5d020531","created":1473119034697,"modified":1473119034697,"origin":1471806386919,"name":"cooling point","get":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}]},"put":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}],"parameterNames":["coolingpoint"]}}]}}]'
"404":
description: if no device profile match on the id provided.
"500":
description: for unknown or unanticipated issues.
/provisionwatcher/profilename/{profilename}:
displayName: ProvisionWatcher Resource (by profile name)
description: Example - http://localhost:48081/api/v1/provisionwatcher/profilename/thermostat profile (where 'thermostat profile' is the name of a device profile)
uriParameters:
profilename:
displayName: profilename
type: string
required: false
repeat: false
get:
description: Find all provision watchers associated to the DeviceProfile with the specified profile name. List may be empty if no provision watcher match. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if no DeviceProfile match on the name provided.
responses:
"200":
description: List of ProvisionWatcher associated to the profile
body:
application/json:
schema: provisionwatcher
example: '[{"id":"57cf3a13555ebf53636e2654","created":1473198611772,"modified":1473198611772,"origin":1471806386919,"name":"bacnet watcher","identifiers":{"MAC":"00-05-1B-A1-99-99","HTTP":"10.0.0.1"},"profile":{"id":"57cf3849555ebf53636e2651","created":1473198153474,"modified":1473198153474,"origin":1471806386919,"name":"thermostat profile","manufacturer":"Honeywell","model":"ABC123","labels":["bacnet","thermostat","Honeywell"],"description":"BACnet Honeywell thermostats","resources":[{"CurrentHumidity":{"get":[{"parameter":"CurrentHumidity","operation":"get","object":"AnalogValue_22"}]}}],"commands":[{"id":"57cf3849555ebf53636e2650","created":1473198153434,"modified":1473198153434,"origin":1471806386919,"name":"cooling point","get":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}]},"put":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}],"parameterNames":["coolingpoint"]}}]},"service":{"id":"57cf3882555ebf53636e2653","created":1473198210365,"modified":1473198210365,"origin":1471806386919,"name":"home thermostat device service","description":"manage home thermostats","lastConnected":0,"lastReported":0,"labels":["hvac","thermostat"],"adminState":"unlocked","operatingState":"enabled","addressable":{"id":"57cf3875555ebf53636e2652","created":1473198197783,"modified":1473198197783,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none"}}}]'
"400":
description: for malformed or unparsable requests
"404":
description: if no DeviceProfile match on the id provided.
"500":
description: for unknown or unanticipated issues.
/provisionwatcher/service/{serviceId}:
displayName: ProvisionWatcher Resource (by service)
description: Example - http://localhost:48081/api/v1/provisionwatcher/service/57ce033aadd4b99e5d020532 (where the id is a device service id)
uriParameters:
serviceId:
displayName: serviceId
type: string
required: false
repeat: false
get:
description: Find the provision watchers associated to the DeviceService with the specified service database generated identifier. List may be empty if no provision watchers match. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if no DeviceService match on the id provided.
responses:
"200":
description: List of ProvisionWatchers associated to the device service
body:
application/json:
schema: provisionwatcher
example: '[{"id":"57cf3a13555ebf53636e2654","created":1473198611772,"modified":1473198611772,"origin":1471806386919,"name":"bacnet watcher","identifiers":{"MAC":"00-05-1B-A1-99-99","HTTP":"10.0.0.1"},"profile":{"id":"57cf3849555ebf53636e2651","created":1473198153474,"modified":1473198153474,"origin":1471806386919,"name":"thermostat profile","manufacturer":"Honeywell","model":"ABC123","labels":["bacnet","thermostat","Honeywell"],"description":"BACnet Honeywell thermostats","resources":[{"CurrentHumidity":{"get":[{"parameter":"CurrentHumidity","operation":"get","object":"AnalogValue_22"}]}}],"commands":[{"id":"57cf3849555ebf53636e2650","created":1473198153434,"modified":1473198153434,"origin":1471806386919,"name":"cooling point","get":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}]},"put":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}],"parameterNames":["coolingpoint"]}}]},"service":{"id":"57cf3882555ebf53636e2653","created":1473198210365,"modified":1473198210365,"origin":1471806386919,"name":"home thermostat device service","description":"manage home thermostats","lastConnected":0,"lastReported":0,"labels":["hvac","thermostat"],"adminState":"unlocked","operatingState":"enabled","addressable":{"id":"57cf3875555ebf53636e2652","created":1473198197783,"modified":1473198197783,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none"}}}]'
"404":
description: if no device service match on the id provided.
"500":
description: for unknown or unanticipated issues.
/provisionwatcher/servicename/{servicename}:
displayName: ProvisionWatcher Resource (by service name)
description: Example - http://localhost:48081/api/v1/provisionwatcher/servicename/home thermostat device service (where 'home thermostat device service' is the name of a device service)
uriParameters:
servicename:
displayName: servicename
type: string
required: false
repeat: false
get:
description: Find the provision watchers associated to the DeviceService with the specified service name. List may be none if no provision watcher match. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if no DeviceService match on the name provided.
responses:
"200":
description: List of ProvisionWatcher associated to the device service
body:
application/json:
schema: provisionwatcher
example: '[{"id":"57cf3a13555ebf53636e2654","created":1473198611772,"modified":1473198611772,"origin":1471806386919,"name":"bacnet watcher","identifiers":{"MAC":"00-05-1B-A1-99-99","HTTP":"10.0.0.1"},"profile":{"id":"57cf3849555ebf53636e2651","created":1473198153474,"modified":1473198153474,"origin":1471806386919,"name":"thermostat profile","manufacturer":"Honeywell","model":"ABC123","labels":["bacnet","thermostat","Honeywell"],"description":"BACnet Honeywell thermostats","resources":[{"CurrentHumidity":{"get":[{"parameter":"CurrentHumidity","operation":"get","object":"AnalogValue_22"}]}}],"commands":[{"id":"57cf3849555ebf53636e2650","created":1473198153434,"modified":1473198153434,"origin":1471806386919,"name":"cooling point","get":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}]},"put":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}],"parameterNames":["coolingpoint"]}}]},"service":{"id":"57cf3882555ebf53636e2653","created":1473198210365,"modified":1473198210365,"origin":1471806386919,"name":"home thermostat device service","description":"manage home thermostats","lastConnected":0,"lastReported":0,"labels":["hvac","thermostat"],"adminState":"unlocked","operatingState":"enabled","addressable":{"id":"57cf3875555ebf53636e2652","created":1473198197783,"modified":1473198197783,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none"}}}]'
"400":
description: for malformed or unparsable requests
"404":
description: if no DeviceService match on the id provided.
"500":
description: for unknown or unanticipated issues.
/provisionwatcher/identifier/{key}/{value}:
displayName: ProvisionWatcher Resource (by identifier key value pair)
description: Example - http://localhost:48081/api/v1/provisionwatcher/identifier/HTTP/10.0.1.1 (where HTTP and 10.0.1.1 are the key value pair of the provision watcher identifier to be searched for )
uriParameters:
key:
displayName: key
type: string
required: false
repeat: false
value:
displayName: value
type: string
required: false
repeat: false
get:
description: Find the provision watchers associated to the identifier key/value pair. The identifier key/value pair identify a protocol and address of the protocol to watch for by the Device Service. List may be none if no provision watcher match. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues.
responses:
"200":
description: List of ProvisionWatcher associated to the device service
body:
application/json:
schema: provisionwatcher
example: '[{"id":"57cf3a13555ebf53636e2654","created":1473198611772,"modified":1473198611772,"origin":1471806386919,"name":"bacnet watcher","identifiers":{"MAC":"00-05-1B-A1-99-99","HTTP":"10.0.1.1"},"profile":{"id":"57cf3849555ebf53636e2651","created":1473198153474,"modified":1473198153474,"origin":1471806386919,"name":"thermostat profile","manufacturer":"Honeywell","model":"ABC123","labels":["bacnet","thermostat","Honeywell"],"description":"BACnet Honeywell thermostats","resources":[{"CurrentHumidity":{"get":[{"parameter":"CurrentHumidity","operation":"get","object":"AnalogValue_22"}]}}],"commands":[{"id":"57cf3849555ebf53636e2650","created":1473198153434,"modified":1473198153434,"origin":1471806386919,"name":"cooling point","get":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}]},"put":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}],"parameterNames":["coolingpoint"]}}]},"service":{"id":"57cf3882555ebf53636e2653","created":1473198210365,"modified":1473198210365,"origin":1471806386919,"name":"home thermostat device service","description":"manage home thermostats","lastConnected":0,"lastReported":0,"labels":["hvac","thermostat"],"adminState":"unlocked","operatingState":"enabled","addressable":{"id":"57cf3875555ebf53636e2652","created":1473198197783,"modified":1473198197783,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none"}}}]'
"400":
description: for malformed or unparsable requests
"500":
description: for unknown or unanticipated issues.
/provisionwatcher:
displayName: ProvisionWatcher Resource
description: "Example - http://localhost:48081/api/v1/provisionwatcher"
post:
description: Add a new ProvisionWatcher - name must be unique. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns DataValidationException (HTTP 409) if profile service are unknown
displayName: add provision watcher
body:
application/json:
schema: provisionwatcher
example: '{"name":"bacnet watcher", "origin":1471806386919, "identifiers":{"MAC":"00-05-1B-A1-99-99","HTTP":"10.0.0.1"},"profile":{"id":"57ce033aadd4b99e5d020532"},"service":{"id":"57ce033aadd4b99e5d020538"}} or {"name":"bacnet watcher", "origin":1471806386919, "identifiers":{"MAC":"00-05-1B-A1-99-99","HTTP":"10.0.0.1"},"profile":{"name":"thermostat profile"},"service":{"name":"home thermostat device service"}}'
responses:
"200":
description: new database generated id for the new ProvisionWatcher
"400":
description: for malformed or unparsable requests
"409":
description: if an associated object (Profile, Service) cannot be found with the id or name provided or if the watcher name is determined to not be unique with regard to others
"500":
description: for unknown or unanticipated issues or for any duplicate name (key) error.
put:
description: Update the ProvisionWatcher identified by the id or name in the object provided. Id is used first, name is used second for identification purposes. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if no provision watcher with the provided id is found.
displayName: update provision watcher
body:
application/json:
schema: provisionwatcher
example: '{"name":"bacnet watcher", "origin":14718063870000} or {"id":"57ce0523add4b99e5d020535", "origin":14718063870000}'
responses:
"200":
description: boolean indicating success of the update
"400":
description: for malformed or unparsable requests
"404":
description: if no provision watcher with the provided id is found.
"500":
description: for unknown or unanticipated issues or for any duplicate name (key) error.
get:
description: Return all provision watcher objects sorted by database generated id. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns LimitExceededException (HTTP 413) if the number returned exceeds the max limit.
displayName: get all provision watchers
responses:
"200":
description: list of provision watcher
body:
application/json:
schema: provisionwatcher
example: '[{"id":"57cf3a13555ebf53636e2654","created":1473198611772,"modified":1473198611772,"origin":1471806386919,"name":"bacnet watcher","identifiers":{"MAC":"00-05-1B-A1-99-99","HTTP":"10.0.0.1"},"profile":{"id":"57cf3849555ebf53636e2651","created":1473198153474,"modified":1473198153474,"origin":1471806386919,"name":"thermostat profile","manufacturer":"Honeywell","model":"ABC123","labels":["bacnet","thermostat","Honeywell"],"description":"BACnet Honeywell thermostats","resources":[{"CurrentHumidity":{"get":[{"parameter":"CurrentHumidity","operation":"get","object":"AnalogValue_22"}]}}],"commands":[{"id":"57cf3849555ebf53636e2650","created":1473198153434,"modified":1473198153434,"origin":1471806386919,"name":"cooling point","get":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}]},"put":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}],"parameterNames":["coolingpoint"]}}]},"service":{"id":"57cf3882555ebf53636e2653","created":1473198210365,"modified":1473198210365,"origin":1471806386919,"name":"home thermostat device service","description":"manage home thermostats","lastConnected":0,"lastReported":0,"labels":["hvac","thermostat"],"adminState":"unlocked","operatingState":"enabled","addressable":{"id":"57cf3875555ebf53636e2652","created":1473198197783,"modified":1473198197783,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none"}}}]'
"413":
description: if the number returned exceeds the max limit.
"500":
description: for unknown or unanticipated issues.
/addressable/id/{id}:
displayName: Addressable Resource (by id)
description: Example - http://localhost:48081/api/v1/addressable/id/57bb276e555e5218873e5a13
uriParameters:
id:
displayName: id
description: database generated id
type: string
required: false
repeat: false
delete:
description: Remove the Addressable designated by the database generated id for the Addressable. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if no addressable with the provided id is found.
displayName: delete addressable by id
responses:
"200":
description: boolean indicating success of the remove operation
"404":
description: if no addressable with the provided id is found.
"409":
description: if the adressable is still in use
"500":
description: for unknown or unanticipated issues
/addressable/{id}:
displayName: Addressable Resource (by id)
description: Example - http://localhost:48081/api/v1/addressable/57bb276e555e5218873e5a13
uriParameters:
id:
displayName: id
description: database generated id
type: string
required: false
repeat: false
get:
description: Fetch a specific addressable by database generated id. May return null if no addressable matches on id. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if not found by the id.
displayName: get addressable by id
responses:
"200":
description: addressable
body:
application/json:
schema: addressable
example: '{"id":"57bb276e555e5218873e5a13","created":1471883118326,"modified":1471883691145,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomhvac","publisher":"none","user":"none","password":"none","topic":"none","method":"GET"}'
"404":
description: if no addressable with the provided id is found
"500":
description: for unknown or unanticipated issues
/addressable/name/{name}:
displayName: Addressable Resource (by name)
description: Example - http://localhost:48081/api/v1/addressable/name/hvac thermo address (where hvac thermo address is the unique name of an Addressable)
uriParameters:
name:
displayName: name
description: unique name of addressable
type: string
required: false
repeat: false
delete:
description: Remove the Addressable designated by unique name identifier. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if no addressable with the provided name is found.
displayName: delete addressable by name
responses:
"200":
description: boolean indicating success of the remove operation
"400":
description: for malformed or unparsable requests
"404":
description: if no addressable with the provided name is found.
"500":
description: for unknown or unanticipated issues.
get:
description: Return Addressable with matching name (name should be unique). May be null if none match. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if not found by name.
displayName: get addressable by name
responses:
"200":
description: addressable matching on name
body:
application/json:
schema: addressable
example: '{"id":"57bb2a31555e5218873e5a14","created":1471883825676,"modified":1471883825676,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none","method":"GET"}'
"404":
description: if no addressable with the provided name is found
"400":
description: for malformed or unparsable requests
"500":
description: for unknown or unanticipated issues.
/addressable/topic/{topic}:
displayName: Addressable Resource (by topic)
description: Example - http://localhost:48081/api/v1/addressable/topic/thermodata (where thermodata is the name of Addressables' topic)
uriParameters:
topic:
displayName: topic
description: topic name (as in MQTT topic name)
type: string
required: false
repeat: false
get:
description: Return Addressable objects with given topic. List may be empty if none are associated to the topic. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues.
displayName: get addressable by topic
responses:
"200":
description: list of addressable matching topic
body:
application/json:
schema: addressable
example: '[{"id":"57bb2bca555e5218873e5a17","created":1471884234787,"modified":1471884234787,"origin":1471806386919,"name":"hvac thermo address2","protocol":"TCP","address":"172.17.0.1","port":60601,"path":"none","publisher":"DELLPUB","user":"dell","password":"abc123","topic":"thermodata","method":"GET"}]'
"400":
description: for malformed or unparsable requests
"500":
description: for unknown or unanticipated issues.
/addressable/port/{port}:
displayName: "Addressable Resource (by port)"
description: Example - http://localhost:48081/api/v1/addressable/port/48089 (where 48089 is the name of Addressables' topic)
uriParameters:
port:
displayName: port
type: string
required: false
repeat: false
get:
description: Return Addressable objects with given port. List may be empty if none are associated to the port. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues.
displayName: get addressable by port
responses:
"200":
description: list of addressable matching port
body:
application/json:
schema: addressable
example: '[{"id":"57bb2b08555e5218873e5a15","created":1471884040857,"modified":1471884040857,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none","method":"GET"}]'
"400":
description: for malformed or unparsable requests
"500":
description: for unknown or unanticipated issues
/addressable/publisher/{publisher}:
displayName: Addressable Resource (by publisher)
description: Example - http://localhost:48081/api/v1/addressable/publisher/DELLPUB (where DELLPUB is an Addressable publisher)
uriParameters:
publisher:
displayName: publisher
description: publisher name (as in MQTT publisher)
type: string
required: false
repeat: false
get:
description: Return Addressable objects with given publisher. List may be empty if none are associated to the publisher. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues.
displayName: get addressable by publisher
responses:
"200":
description: list of addressable matching publisher
body:
application/json:
schema: addressable
example: '[{"id":"57bb2bca555e5218873e5a17","created":1471884234787,"modified":1471884234787,"origin":1471806386919,"name":"hvac thermo address2","protocol":"TCP","address":"172.17.0.1","port":60601,"path":"none","publisher":"DELLPUB","user":"dell","password":"abc123","topic":"thermodata","method":"GET"}]'
"400":
description: for malformed or unparsable requests
"500":
description: for unknown or unanticipated issues.
/addressable/address/{address}:
displayName: Addressable Resource (by address)
description: Example - http://localhost:48081/api/v1/addressable/address/172.17.0.1
uriParameters:
address:
displayName: address
description: address (as in URL address)
type: string
required: false
repeat: false
get:
description: Return Addressable objects with given address. List may be empty if none are associated to the address. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues.
displayName: get addressable by address
responses:
"200":
description: list of addressable matching address
body:
application/json:
schema: addressable
example: '[{"id":"57bb2b08555e5218873e5a15","created":1471884040857,"modified":1471884040857,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none"},{"id":"57bb2bca555e5218873e5a17","created":1471884234787,"modified":1471884234787,"origin":1471806386919,"name":"hvac thermo address2","protocol":"TCP","address":"172.17.0.1","port":60601,"path":"none","publisher":"DELLPUB","user":"dell","password":"abc123","topic":"thermodata","method":"GET"}]'
"400":
description: for malformed or unparsable requests
"500":
description: for unknown or unanticipated issues.
/addressable:
displayName: Addressable Resource
description: "Example - http://localhost:48081/api/v1/addressable"
post:
description: Add a new Addressable - name must be unique. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues.
displayName: add addressable
body:
application/json:
schema: addressable
example: '{"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none"}'
responses:
"200":
description: new database generated id for the new Addressable
"400":
description: for malformed or unparsable requests
"409":
description: if the name is determined to not be unique with regard to others
"500":
description: for unknown or unanticipated issues or for any duplicate name (key) error.
put:
description: Update the Addressable identified by the id or name in the object provided. Id is used first, name is used second for identification purposes. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if no addressable with the provided id is found.
displayName: update addressable
body:
application/json:
schema: addressable
example: '{"id":"57bb276e555e5218873e5a13", "path":"/livingroomhvac"}'
responses:
"200":
description: boolean indicating success of the update
"400":
description: for malformed or unparsable requests
"404":
description: if no addressable with the provided id is found.
"409":
description: if the addressable is currently in use
"500":
description: for unknown or unanticipated issues or for any duplicate name (key) error.
get:
description: Return all addressable objects sorted by database generated id. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns LimitExceededException (HTTP 413) if the number returned exceeds the max limit.
displayName: get all addressables
responses:
"200":
description: list of addressable
body:
application/json:
schema: addressable
example: '[{"id":"57bb2b08555e5218873e5a15","created":1471884040857,"modified":1471884040857,"origin":1471806386919,"name":"hvac thermo address","protocol":"HTTP","address":"172.17.0.1","port":48089,"path":"/livingroomthermostat","publisher":"none","user":"none","password":"none","topic":"none"},{"id":"57bb2bca555e5218873e5a17","created":1471884234787,"modified":1471884234787,"origin":1471806386919,"name":"hvac thermo address2","protocol":"TCP","address":"172.17.0.1","port":60601,"path":"none","publisher":"DELLPUB","user":"dell","password":"abc123","topic":"thermodata"}]'
"413":
description: if the number returned exceeds the max limit.
"500":
description: for unknown or unanticipated issues.
/command/{id}:
displayName: Command Resource (by id)
description: Example - http://localhost:48081/api/v1/command/57bb3195555e5218873e5a1a
uriParameters:
id:
displayName: id
type: string
required: false
repeat: false
get:
description: Fetch a specific command by database generated id. May return null if no commands with the id is found. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns NotFoundException (HTTP 404) if no command with the provided id is found.
displayName: get command by id
responses:
"200":
description: Successful Response
body:
application/json:
schema: command
example: '{"id":"57bb3195555e5218873e5a1a","created":1471885717486,"modified":1471885944737,"origin":1471806386919,"name":"cooling point","get":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}]},"put":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}],"parameterNames":["coolingpoint"]}}'
"404":
description: if no command with the provided id is found.
"500":
description: for unknown or unanticipated issues.
/command/name/{name}:
displayName: Command Resource
description: Example - http://localhost:48081/api/v1/command/name/cooling point (where cooling point is the name of a command)
uriParameters:
name:
displayName: name
type: string
required: false
repeat: false
get:
description: Return Command objects with given name. Name is not unique for all of EdgeX but is unique per any associated Device Profile. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues.
displayName: get commands by name
responses:
"200":
description: Successful Response
body:
application/json:
schema: command
example: '[{"id":"57bb3195555e5218873e5a1a","created":1471885717486,"modified":1471885944737,"origin":1471806386919,"name":"cooling point","get":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}]},"put":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}],"parameterNames":["coolingpoint"]}}]'
"400":
description: for malformed or unparsable requests
"500":
description: for unknown or unanticipated issues.
/command:
displayName: Command Resource
description: Example - http://localhost:48081/api/v1/command
get:
description: Return all command objects. Returns Internal Service Error (HTTP 500) for unknown or unanticipated issues. Returns LimitExceededException (HTTP 413) if the number returned exceeds the max limit.
displayName: get all commands
responses:
"200":
description: Successful Response
body:
application/json:
schema: command
example: '[{"id":"57bb3195555e5218873e5a1a","created":1471885717486,"modified":1471885717486,"origin":1471806386919,"name":"cooling point","get":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}]},"put":{"path":"/cooling","responses":[{"code":"200","description":"ok","expectedValues":["temperature"]}],"parameterNames":["coolingpoint"]}}]'
"413":
description: if the number returned exceeds the max limit.
"500":
description: for unknown or unanticipated errors
You can’t perform that action at this time.