{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "orgId": { "type": "string", "pattern": "^[A-Fa-f\\d]{24}$" }, "name": { "type": "string", "minLength": 1, "maxLength": 255 }, "blocks": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "blockType": { "type": "string" }, "title": { "type": "string", "maxLength": 255 }, "description": { "type": "string", "maxLength": 32767 }, "applicationId": { "type": "string", "pattern": "^[A-Fa-f\\d]{24}$" }, "startX": { "type": "number" }, "startY": { "type": "number" }, "width": { "type": "number" }, "height": { "type": "number" }, "config": { "type": "object" } }, "required": [ "blockType", "startX", "startY", "width", "height" ], "additionalProperties": false } }, "description": { "type": "string", "maxLength": 32767 }, "refreshRate": { "type": "number", "minimum": 5, "maximum": 600 }, "reportConfigs": { "type": "array", "max": 10, "items": { "type": "object", "additionalProperties": false, "required": [ "cron", "toEmail" ], "properties": { "id": { "type": "string", "max": 14 }, "cron": { "type": "string" }, "toEmail": { "type": "array", "min": 1, "max": 10, "items": { "type": "string", "format": "email", "maxLength": 1024 } }, "subject": { "type": "string", "max": 255 }, "message": { "type": "string", "max": 32767 }, "theme": { "type": "string", "enum": [ "dark", "light" ] }, "timezone": { "type": "string", "max": 255 } } } }, "public": { "type": "boolean" }, "password": { "type": [ "string", "null" ] }, "contextConfiguration": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "pattern": "^[0-9a-zA-Z_-]{1,255}$" }, "type": { "type": "string", "enum": [ "deviceId", "deviceAttribute", "string", "number" ] }, "applicationId": { "type": "string", "pattern": "^[A-Fa-f\\d]{24}$" }, "defaultValue": { "type": [ "string", "number" ] }, "validationEnabled": { "type": "boolean" }, "validationConfig": { "type": "object", "properties": { "min": { "type": "number" }, "max": { "type": "number" }, "regExp": { "type": "string", "maxLength": 1024 }, "attributes": { "type": "array", "items": { "type": "string", "pattern": "^[0-9a-zA-Z_-]{1,255}$" } }, "deviceIds": { "type": "array", "items": { "type": "string", "pattern": "^[A-Fa-f\\d]{24}$" }, "maxItems": 1000 }, "deviceTags": { "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 } }, "additionalProperties": false } }, "required": [ "name", "type", "defaultValue" ], "additionalProperties": false } } }, "additionalProperties": false, "required": [ "name" ] }