get https://ioe.droplit.io/v0/api/devices//services
Details
List the service properties of a device.
This endpoint lists the defined service properties of a device. Defined properties are those that have been assigned a value. If a device implements a service class, properties of that service class which are not set will not be returned. To list all properties of a device, including those that are not defined, get the properties of each service class implemented by the device.
An account token, server token, or user token may be used to run this endpoint.
Parameters
path
- id (required): The ID of the device.
Responses
200
{
"items": [
{
"ecosystemId": "ECOSYSTEM-ID",
"index": "SERVICE-INDEX",
"modifiedAt": "YYYY-MM-DD HH:MM:SS ENCODED",
"property": "PROPERTY-NAME",
"service": "SERVICE-NAME",
"value": "PROPERTY-VALUE"
}
]
}
400
- Device Invalid: The standard error structure defines this error as invalid parameters, with an invalid ID. In this context, it means that the ID given for a client is invalid.
- No Query String Allowed: The standard error structure defines this error as invalid parameters, with additional parameters in the query string. In this context, it means that no query string is allowed at all when calling this endpoint.
404
- Device Not Found: This error means that a device with the given ID was not found. This is distinct from an invalid device ID being specified; this means that the device ID once existed, but no longer does.
Examples
HTTP
GET https://ioe.droplit.io/api/devices/DEVICE-ID/services HTTP/1.1
authorization: TOKEN
Droplit Console
droplit device get-all DEVICE-ID
Droplit SDK
droplit.devices.getServices("DEVICE-ID");