docs/_schemas.md in losant_rest-1.1.0 vs docs/_schemas.md in losant_rest-1.1.1
- old
+ new
@@ -17,10 +17,11 @@
* [Authenticated Device](#authenticated-device)
* [Authenticated Solution User](#authenticated-solution-user)
* [Authenticated User](#authenticated-user)
* [Composite Device State](#composite-device-state)
* [Dashboard](#dashboard)
+* [Dashboard Context Instance](#dashboard-context-instance)
* [Dashboard Patch](#dashboard-patch)
* [Dashboard Post](#dashboard-post)
* [Dashboards](#dashboards)
* [Device](#device)
* [Device Command](#device-command)
@@ -1532,11 +1533,11 @@
},
"deviceId": {
"type": "string",
"pattern": "^[A-Fa-f\\d]{24}$"
},
- "devicecClass": {
+ "deviceClass": {
"type": "string",
"enum": [
"standalone",
"gateway",
"peripheral",
@@ -1561,11 +1562,11 @@
```json
{
"applicationId": "575ec8687ae143cd83dc4a97",
"deviceId": "575ecf887ae143cd83dc4aa2",
- "devicecClass": "standalone",
+ "deviceClass": "standalone",
"token": "token_to_use_for_authenticating_subsequent_requests"
}
```
<br/>
@@ -1813,10 +1814,98 @@
"width",
"height"
],
"additionalProperties": false
}
+ },
+ "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}$"
+ }
+ },
+ "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
+ }
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ "required": [
+ "name",
+ "type",
+ "defaultValue"
+ ],
+ "additionalProperties": false
+ }
}
}
}
```
### <a name="dashboard-example"></a> Example
@@ -1837,10 +1926,42 @@
}
```
<br/>
+## Dashboard Context Instance
+
+Schema for a dashboard context instance
+
+### <a name="dashboard-context-instance-schema"></a> Schema
+
+```json
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "object",
+ "patternProperties": {
+ "^[0-9a-zA-Z_-]{1,255}$": {
+ "type": [
+ "string",
+ "number"
+ ]
+ }
+ },
+ "additionalProperties": false
+}
+```
+### <a name="dashboard-context-instance-example"></a> Example
+
+```json
+{
+ "myContextVariable": "myValue",
+ "myOtherVariable": "575ecf887ae143cd83dc4aa2"
+}
+```
+
+<br/>
+
## Dashboard Patch
Schema for the body of a Dashboard modification request
### <a name="dashboard-patch-schema"></a> Schema
@@ -1915,10 +2036,98 @@
"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}$"
+ }
+ },
+ "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
+ }
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ "required": [
+ "name",
+ "type",
+ "defaultValue"
+ ],
+ "additionalProperties": false
+ }
}
},
"additionalProperties": false
}
```
@@ -2015,10 +2224,98 @@
"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}$"
+ }
+ },
+ "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
+ }
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ "required": [
+ "name",
+ "type",
+ "defaultValue"
+ ],
+ "additionalProperties": false
+ }
}
},
"additionalProperties": false,
"required": [
"name"
@@ -2140,9 +2437,97 @@
"blockType",
"startX",
"startY",
"width",
"height"
+ ],
+ "additionalProperties": false
+ }
+ },
+ "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}$"
+ }
+ },
+ "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
+ }
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ "required": [
+ "name",
+ "type",
+ "defaultValue"
],
"additionalProperties": false
}
}
}