docs/_schemas.md in losant_rest-1.0.3 vs docs/_schemas.md in losant_rest-1.0.4
- old
+ new
@@ -30,11 +30,11 @@
* [Device Recipe Bulk Create](#device-recipe-bulk-create)
* [Device Recipe Bulk Create Post](#device-recipe-bulk-create-post)
* [Device Recipe Patch](#device-recipe-patch)
* [Device Recipe Post](#device-recipe-post)
* [Device Recipes](#device-recipes)
-* [Device State](#device-state)
+* [Single or Multiple Device States](#single-or-multiple-device-states)
* [Device States](#device-states)
* [Device Tag Filter](#device-tag-filter)
* [Devices](#devices)
* [Disable Two Factor Auth](#disable-two-factor-auth)
* [Enable Two Factor Auth](#enable-two-factor-auth)
@@ -61,10 +61,11 @@
* [Organization Invitations](#organization-invitations)
* [Organization Member Patch](#organization-member-patch)
* [Organization Patch](#organization-patch)
* [Organization Post](#organization-post)
* [Organizations](#organizations)
+* [Payload Counts](#payload-counts)
* [Recent Item](#recent-item)
* [Recent Item List](#recent-item-list)
* [Solution](#solution)
* [Solution Patch](#solution-patch)
* [Solution Post](#solution-post)
@@ -2901,50 +2902,93 @@
}
```
<br/>
-## Device State
+## Single or Multiple Device States
-Schema for a single Device state
+Schema for a single device state or an array of device states
-### <a name="device-state-schema"></a> Schema
+### <a name="single-or-multiple-device-states-schema"></a> Schema
```json
{
"$schema": "http://json-schema.org/draft-04/schema#",
- "type": "object",
- "properties": {
- "time": {
- "type": "string",
- "format": "date-time"
- },
- "relayId": {
- "type": "string"
- },
- "meta": {},
- "data": {
+ "oneOf": [
+ {
+ "title": "Device State",
+ "description": "Schema for a single Device state",
"type": "object",
- "patternProperties": {
- "^[0-9a-zA-Z_-]{1,255}$": {
- "type": [
- "number",
- "string",
- "boolean"
- ]
+ "properties": {
+ "time": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "relayId": {
+ "type": "string"
+ },
+ "meta": {},
+ "data": {
+ "type": "object",
+ "patternProperties": {
+ "^[0-9a-zA-Z_-]{1,255}$": {
+ "type": [
+ "number",
+ "string",
+ "boolean"
+ ]
+ }
+ },
+ "additionalProperties": false
}
},
+ "required": [
+ "data"
+ ],
"additionalProperties": false
+ },
+ {
+ "title": "Device States",
+ "description": "Schema for an array of Device states",
+ "type": "array",
+ "items": {
+ "title": "Device State",
+ "description": "Schema for a single Device state",
+ "type": "object",
+ "properties": {
+ "time": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "relayId": {
+ "type": "string"
+ },
+ "meta": {},
+ "data": {
+ "type": "object",
+ "patternProperties": {
+ "^[0-9a-zA-Z_-]{1,255}$": {
+ "type": [
+ "number",
+ "string",
+ "boolean"
+ ]
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ "required": [
+ "data"
+ ],
+ "additionalProperties": false
+ }
}
- },
- "required": [
- "data"
- ],
- "additionalProperties": false
+ ]
}
```
-### <a name="device-state-example"></a> Example
+### <a name="single-or-multiple-device-states-example"></a> Example
```json
{
"time": "2016-06-13T04:00:00.000Z",
"data": {
@@ -3006,10 +3050,16 @@
{
"time": "2016-06-13T04:00:00.000Z",
"data": {
"voltage": 22.4
}
+ },
+ {
+ "time": "2016-06-13T04:00:00.000Z",
+ "data": {
+ "voltage": 22.4
+ }
}
]
```
<br/>
@@ -4868,12 +4918,30 @@
},
"limits": {
"application": {
"type": "number"
},
+ "applicationkey": {
+ "type": "number"
+ },
"dashboard": {
"type": "number"
+ },
+ "device": {
+ "type": "number"
+ },
+ "devicerecipe": {
+ "type": "number"
+ },
+ "flow": {
+ "type": "number"
+ },
+ "webhook": {
+ "type": "number"
+ },
+ "dataTTL": {
+ "type": "number"
}
},
"recentDashboards": {
"title": "Recent Item List",
"description": "Schema for an array of recent items",
@@ -4946,11 +5014,10 @@
}
}
}
}
},
- "defaults": {},
"summary": {
"type": "object",
"properties": {
"appCount": {
"type": "number"
@@ -4958,10 +5025,28 @@
"dashCount": {
"type": "number"
},
"orgCount": {
"type": "number"
+ },
+ "deviceCount": {
+ "type": "number"
+ },
+ "flowCount": {
+ "type": "number"
+ },
+ "webhookCount": {
+ "type": "number"
+ },
+ "keyCount": {
+ "type": "number"
+ },
+ "eventCount": {
+ "type": "number"
+ },
+ "deviceRecipeCount": {
+ "type": "number"
}
}
}
}
}
@@ -4984,11 +5069,16 @@
"twoFactorAuthEnabled": false,
"fullName": "Example Name",
"summary": {
"appCount": 8,
"dashCount": 5,
- "orgCount": 2
+ "orgCount": 2,
+ "deviceCount": 12,
+ "flowCount": 3,
+ "webhookCount": 0,
+ "keyCount": 2,
+ "deviceRecipeCount": 0
}
}
```
<br/>
@@ -5212,18 +5302,68 @@
]
}
}
}
},
+ "limits": {
+ "application": {
+ "type": "number"
+ },
+ "applicationkey": {
+ "type": "number"
+ },
+ "dashboard": {
+ "type": "number"
+ },
+ "device": {
+ "type": "number"
+ },
+ "devicerecipe": {
+ "type": "number"
+ },
+ "flow": {
+ "type": "number"
+ },
+ "solution": {
+ "type": "number"
+ },
+ "webhook": {
+ "type": "number"
+ },
+ "dataTTL": {
+ "type": "number"
+ }
+ },
"summary": {
"type": "object",
"properties": {
"appCount": {
"type": "number"
},
"dashCount": {
"type": "number"
+ },
+ "solutionCount": {
+ "type": "number"
+ },
+ "deviceCount": {
+ "type": "number"
+ },
+ "flowCount": {
+ "type": "number"
+ },
+ "webhookCount": {
+ "type": "number"
+ },
+ "keyCount": {
+ "type": "number"
+ },
+ "eventCount": {
+ "type": "number"
+ },
+ "deviceRecipeCount": {
+ "type": "number"
}
}
}
}
}
@@ -5254,11 +5394,17 @@
"role": "view"
}
],
"summary": {
"appCount": 2,
- "dashCount": 1
+ "dashCount": 1,
+ "solutionCount": 0,
+ "deviceCount": 12,
+ "flowCount": 3,
+ "webhookCount": 0,
+ "keyCount": 2,
+ "deviceRecipeCount": 0
}
}
```
<br/>
@@ -5565,18 +5711,68 @@
]
}
}
}
},
+ "limits": {
+ "application": {
+ "type": "number"
+ },
+ "applicationkey": {
+ "type": "number"
+ },
+ "dashboard": {
+ "type": "number"
+ },
+ "device": {
+ "type": "number"
+ },
+ "devicerecipe": {
+ "type": "number"
+ },
+ "flow": {
+ "type": "number"
+ },
+ "solution": {
+ "type": "number"
+ },
+ "webhook": {
+ "type": "number"
+ },
+ "dataTTL": {
+ "type": "number"
+ }
+ },
"summary": {
"type": "object",
"properties": {
"appCount": {
"type": "number"
},
"dashCount": {
"type": "number"
+ },
+ "solutionCount": {
+ "type": "number"
+ },
+ "deviceCount": {
+ "type": "number"
+ },
+ "flowCount": {
+ "type": "number"
+ },
+ "webhookCount": {
+ "type": "number"
+ },
+ "keyCount": {
+ "type": "number"
+ },
+ "eventCount": {
+ "type": "number"
+ },
+ "deviceRecipeCount": {
+ "type": "number"
}
}
}
}
}
@@ -5640,19 +5836,147 @@
"role": "view"
}
],
"summary": {
"appCount": 2,
- "dashCount": 1
+ "dashCount": 1,
+ "solutionCount": 0,
+ "deviceCount": 12,
+ "flowCount": 3,
+ "webhookCount": 0,
+ "keyCount": 2,
+ "deviceRecipeCount": 0
}
}
],
"count": 1,
"totalCount": 2,
"perPage": 1,
"page": 0,
"sortField": "name",
"sortDirection": "asc"
+}
+```
+
+<br/>
+
+## Payload Counts
+
+Schema the result of a payload count request
+
+### <a name="payload-counts-schema"></a> Schema
+
+```json
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "type": "object",
+ "properties": {
+ "mqttOut": {
+ "type": "object",
+ "patternProperties": {
+ ".*": {
+ "type": "number"
+ }
+ }
+ },
+ "mqttIn": {
+ "type": "object",
+ "patternProperties": {
+ ".*": {
+ "type": "number"
+ }
+ }
+ },
+ "deviceState": {
+ "type": "object",
+ "patternProperties": {
+ ".*": {
+ "type": "number"
+ }
+ }
+ },
+ "deviceCommand": {
+ "type": "object",
+ "patternProperties": {
+ ".*": {
+ "type": "number"
+ }
+ }
+ },
+ "webhook": {
+ "type": "object",
+ "patternProperties": {
+ ".*": {
+ "type": "number"
+ }
+ }
+ },
+ "timer": {
+ "type": "object",
+ "patternProperties": {
+ ".*": {
+ "type": "number"
+ }
+ }
+ },
+ "event": {
+ "type": "object",
+ "patternProperties": {
+ ".*": {
+ "type": "number"
+ }
+ }
+ },
+ "virtualButton": {
+ "type": "object",
+ "patternProperties": {
+ ".*": {
+ "type": "number"
+ }
+ }
+ },
+ "deviceConnect": {
+ "type": "object",
+ "patternProperties": {
+ ".*": {
+ "type": "number"
+ }
+ }
+ },
+ "deviceDisconnect": {
+ "type": "object",
+ "patternProperties": {
+ ".*": {
+ "type": "number"
+ }
+ }
+ }
+ }
+}
+```
+### <a name="payload-counts-example"></a> Example
+
+```json
+{
+ "timer": {
+ "timer.flow": 19772
+ },
+ "deviceState": {
+ "flow.flow": 5215,
+ "device.mqtt": 1244049
+ },
+ "mqttOut": {
+ "device.mqtt": 12
+ },
+ "webhook": {
+ "public.rest": 1713284
+ },
+ "deviceConnect": {
+ "device.mqtt": 1016
+ },
+ "deviceDisconnect": {
+ "device.mqtt": 1016
+ }
}
```
<br/>