{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "items": { "type": "array", "items": { "title": "Device", "description": "Schema for a single Device", "type": "object", "properties": { "id": { "type": "string", "pattern": "^[A-Fa-f\\d]{24}$" }, "deviceId": { "type": "string", "pattern": "^[A-Fa-f\\d]{24}$" }, "applicationId": { "type": "string", "pattern": "^[A-Fa-f\\d]{24}$" }, "creationDate": { "type": "string", "format": "date-time" }, "lastUpdated": { "type": "string", "format": "date-time" }, "name": { "type": "string", "minLength": 1, "maxLength": 255 }, "description": { "type": "string", "maxLength": 32767 }, "tags": { "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string", "pattern": "^[0-9a-zA-Z_-]{1,255}$" }, "value": { "type": "string", "minLength": 1, "maxLength": 255 } }, "required": [ "key", "value" ], "additionalProperties": false }, "maxItems": 100 }, "attributes": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "pattern": "^[0-9a-zA-Z_-]{1,255}$" }, "dataType": { "type": "string", "enum": [ "string", "number", "gps", "boolean" ] } }, "required": [ "name", "dataType" ], "additionalProperties": false }, "maxItems": 256 }, "deviceClass": { "type": "string", "enum": [ "standalone", "gateway", "peripheral", "floating", "edgeCompute" ] }, "gatewayId": { "type": "string", "pattern": "^[A-Fa-f\\d]{24}$" }, "edgeAgentVersion": { "type": "string", "pattern": "^(0|([1-9]\\d*))\\.(0|([1-9]\\d*))\\.(0|([1-9]\\d*))$" }, "connectionInfo": { "type": "object", "properties": { "time": { "type": "string", "format": "date-time" }, "connected": { "enum": [ 1, 0, null ] } } } } } }, "count": { "type": "integer" }, "totalCount": { "type": "integer" }, "perPage": { "type": "integer" }, "page": { "type": "integer" }, "filter": { "type": "string" }, "filterField": { "type": "string" }, "sortField": { "type": "string" }, "sortDirection": { "type": "string", "enum": [ "asc", "desc", "ASC", "DESC", "" ] }, "applicationId": { "type": "string", "pattern": "^[A-Fa-f\\d]{24}$" }, "deviceClass": { "type": "string", "enum": [ "standalone", "gateway", "peripheral", "floating", "edgeCompute" ] }, "tagFilter": { "title": "Device Tag Filter", "description": "Array of Tags for filtering devices. Tag keys and tag values are optional.", "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string", "pattern": "^[0-9a-zA-Z_-]{1,255}$" }, "value": { "type": "string", "minLength": 1, "maxLength": 255 } }, "additionalProperties": false }, "maxItems": 100 } } }