losant_rest 1.10.2 → 1.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/docs/_schemas.md +21561 -8561
  4. data/docs/application.md +83 -0
  5. data/docs/applicationApiTokens.md +2 -2
  6. data/docs/applicationCertificateAuthorities.md +1 -1
  7. data/docs/applicationCertificates.md +1 -1
  8. data/docs/applicationDashboard.md +133 -0
  9. data/docs/applicationDashboards.md +93 -0
  10. data/docs/applicationKeys.md +4 -3
  11. data/docs/applicationTemplate.md +46 -0
  12. data/docs/applicationTemplates.md +77 -2
  13. data/docs/applications.md +1 -1
  14. data/docs/auditLogs.md +1 -1
  15. data/docs/dashboards.md +1 -1
  16. data/docs/dataTables.md +1 -1
  17. data/docs/device.md +6 -3
  18. data/docs/deviceRecipes.md +1 -1
  19. data/docs/devices.md +130 -4
  20. data/docs/edgeDeployments.md +1 -1
  21. data/docs/events.md +1 -1
  22. data/docs/experienceEndpoint.md +1 -0
  23. data/docs/experienceEndpoints.md +1 -0
  24. data/docs/experienceGroups.md +1 -1
  25. data/docs/experienceUsers.md +1 -1
  26. data/docs/experienceVersions.md +1 -1
  27. data/docs/experienceViews.md +1 -1
  28. data/docs/file.md +4 -4
  29. data/docs/files.md +1 -1
  30. data/docs/flow.md +94 -1
  31. data/docs/flowVersion.md +96 -1
  32. data/docs/flowVersions.md +2 -1
  33. data/docs/flows.md +5 -2
  34. data/docs/integration.md +1 -0
  35. data/docs/integrations.md +1 -1
  36. data/docs/me.md +0 -36
  37. data/docs/notebooks.md +1 -1
  38. data/docs/orgs.md +1 -1
  39. data/docs/webhook.md +1 -0
  40. data/docs/webhooks.md +1 -1
  41. data/lib/losant_rest.rb +3 -0
  42. data/lib/losant_rest/application.rb +95 -0
  43. data/lib/losant_rest/application_api_tokens.rb +1 -1
  44. data/lib/losant_rest/application_dashboard.rb +176 -0
  45. data/lib/losant_rest/application_dashboards.rb +138 -0
  46. data/lib/losant_rest/application_keys.rb +3 -0
  47. data/lib/losant_rest/application_template.rb +79 -0
  48. data/lib/losant_rest/application_templates.rb +89 -1
  49. data/lib/losant_rest/client.rb +14 -2
  50. data/lib/losant_rest/device.rb +9 -3
  51. data/lib/losant_rest/devices.rb +154 -1
  52. data/lib/losant_rest/experience_endpoint.rb +2 -0
  53. data/lib/losant_rest/experience_endpoints.rb +2 -0
  54. data/lib/losant_rest/file.rb +3 -3
  55. data/lib/losant_rest/flow.rb +115 -1
  56. data/lib/losant_rest/flow_version.rb +115 -1
  57. data/lib/losant_rest/flow_versions.rb +3 -0
  58. data/lib/losant_rest/flows.rb +8 -0
  59. data/lib/losant_rest/integration.rb +2 -0
  60. data/lib/losant_rest/me.rb +0 -41
  61. data/lib/losant_rest/version.rb +1 -1
  62. data/lib/losant_rest/webhook.rb +2 -0
  63. data/schemas/advancedApplicationKeyQuery.json +1082 -0
  64. data/schemas/advancedFlowByVersionQuery.json +665 -0
  65. data/schemas/advancedFlowQuery.json +883 -0
  66. data/schemas/advancedFlowVersionQuery.json +925 -0
  67. data/schemas/application.json +8 -0
  68. data/schemas/applicationApiTokenPost.json +16 -1
  69. data/schemas/applicationApplyTemplatePatch.json +19 -0
  70. data/schemas/applicationCreationByTemplateResult.json +8 -0
  71. data/schemas/applicationDashboardPost.json +5665 -0
  72. data/schemas/applicationGlobalPatch.json +33 -0
  73. data/schemas/applicationPost.json +8 -0
  74. data/schemas/applicationTemplate.json +20 -0
  75. data/schemas/applicationTemplateCategories.json +43 -0
  76. data/schemas/applicationTemplateCategory.json +23 -0
  77. data/schemas/applicationTemplates.json +32 -0
  78. data/schemas/applications.json +8 -0
  79. data/schemas/attributeNamesResponse.json +14 -0
  80. data/schemas/authedUser.json +3 -0
  81. data/schemas/changePassword.json +2 -2
  82. data/schemas/dashboard.json +195 -26
  83. data/schemas/dashboardPatch.json +195 -26
  84. data/schemas/dashboardPost.json +195 -26
  85. data/schemas/dashboards.json +195 -26
  86. data/schemas/dataExport.json +132 -1
  87. data/schemas/deviceAttributeDataTypeFilter.json +29 -0
  88. data/schemas/deviceClassFilter.json +1 -2
  89. data/schemas/eventPost.json +22 -0
  90. data/schemas/experienceDomain.json +1 -1
  91. data/schemas/experienceDomainPatch.json +1 -1
  92. data/schemas/experienceDomainPost.json +1 -1
  93. data/schemas/experienceDomains.json +1 -1
  94. data/schemas/experienceLinkedResources.json +96 -0
  95. data/schemas/experienceVersion.json +10 -1
  96. data/schemas/experienceVersionPatch.json +9 -0
  97. data/schemas/experienceVersions.json +10 -1
  98. data/schemas/files.json +3 -0
  99. data/schemas/flow.json +32 -0
  100. data/schemas/flowErrors.json +87 -0
  101. data/schemas/flowPatch.json +32 -0
  102. data/schemas/flowPost.json +32 -0
  103. data/schemas/flowStats.json +54 -0
  104. data/schemas/flowVersion.json +64 -0
  105. data/schemas/flowVersionPost.json +32 -0
  106. data/schemas/flowVersions.json +64 -0
  107. data/schemas/flows.json +32 -0
  108. data/schemas/flowsImportPost.json +64 -0
  109. data/schemas/flowsImportResult.json +96 -0
  110. data/schemas/githubLogin.json +33 -4
  111. data/schemas/instance.json +132 -0
  112. data/schemas/instanceOrg.json +119 -0
  113. data/schemas/instanceOrgPatch.json +103 -0
  114. data/schemas/instanceOrgPost.json +114 -0
  115. data/schemas/instanceOrgs.json +160 -0
  116. data/schemas/instances.json +43 -0
  117. data/schemas/integration.json +3 -0
  118. data/schemas/integrationPatch.json +3 -0
  119. data/schemas/integrationPost.json +3 -0
  120. data/schemas/integrations.json +3 -0
  121. data/schemas/me.json +3 -3
  122. data/schemas/mePatch.json +2 -2
  123. data/schemas/notebook.json +96 -0
  124. data/schemas/notebookExecutionLogs.json +7 -0
  125. data/schemas/notebookPatch.json +96 -0
  126. data/schemas/notebookPost.json +96 -0
  127. data/schemas/notebooks.json +96 -0
  128. data/schemas/org.json +1 -1
  129. data/schemas/orgInviteInfo.json +3 -0
  130. data/schemas/orgInvitePost.json +3 -0
  131. data/schemas/orgInvites.json +3 -0
  132. data/schemas/orgPatch.json +1 -1
  133. data/schemas/orgs.json +1 -1
  134. data/schemas/passwordResetFinish.json +2 -2
  135. data/schemas/samlResponse.json +1 -1
  136. data/schemas/tagKeysResponse.json +14 -0
  137. data/schemas/tagValuesResponse.json +19 -0
  138. data/schemas/templateKeywords.json +14 -0
  139. data/schemas/timeSeriesData.json +12 -2
  140. data/schemas/timeSeriesQuery.json +94 -14
  141. data/schemas/userCredentials.json +31 -3
  142. data/schemas/userPost.json +39 -7
  143. metadata +34 -6
@@ -0,0 +1,29 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "oneOf": [
4
+ {
5
+ "type": "string",
6
+ "enum": [
7
+ "string",
8
+ "number",
9
+ "gps",
10
+ "boolean",
11
+ "blob"
12
+ ]
13
+ },
14
+ {
15
+ "type": "array",
16
+ "minItems": 1,
17
+ "items": {
18
+ "type": "string",
19
+ "enum": [
20
+ "string",
21
+ "number",
22
+ "gps",
23
+ "boolean",
24
+ "blob"
25
+ ]
26
+ }
27
+ }
28
+ ]
29
+ }
@@ -24,8 +24,7 @@
24
24
  "edgeCompute",
25
25
  "system"
26
26
  ]
27
- },
28
- "additionalProperties": false
27
+ }
29
28
  }
30
29
  ]
31
30
  }
@@ -43,6 +43,28 @@
43
43
  }
44
44
  },
45
45
  "additionalProperties": false
46
+ },
47
+ "creationDate": {
48
+ "oneOf": [
49
+ {
50
+ "type": "string"
51
+ },
52
+ {
53
+ "type": "number"
54
+ },
55
+ {
56
+ "type": "object",
57
+ "properties": {
58
+ "$date": {
59
+ "type": "string"
60
+ }
61
+ },
62
+ "additionalProperties": false,
63
+ "required": [
64
+ "$date"
65
+ ]
66
+ }
67
+ ]
46
68
  }
47
69
  },
48
70
  "required": [
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "domainName": {
36
36
  "type": "string",
37
- "maxLength": 1024,
37
+ "maxLength": 45,
38
38
  "minLength": 3
39
39
  },
40
40
  "version": {
@@ -52,7 +52,7 @@
52
52
  },
53
53
  "domainName": {
54
54
  "type": "string",
55
- "maxLength": 1024,
55
+ "maxLength": 45,
56
56
  "minLength": 3
57
57
  }
58
58
  },
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "domainName": {
21
21
  "type": "string",
22
- "maxLength": 1024,
22
+ "maxLength": 45,
23
23
  "minLength": 3
24
24
  },
25
25
  "version": {
@@ -41,7 +41,7 @@
41
41
  },
42
42
  "domainName": {
43
43
  "type": "string",
44
- "maxLength": 1024,
44
+ "maxLength": 45,
45
45
  "minLength": 3
46
46
  },
47
47
  "version": {
@@ -1330,6 +1330,17 @@
1330
1330
  },
1331
1331
  "config": {
1332
1332
  "type": "object",
1333
+ "properties": {
1334
+ "scope": {
1335
+ "type": "string",
1336
+ "enum": [
1337
+ "local",
1338
+ "global",
1339
+ "experience",
1340
+ "cloud"
1341
+ ]
1342
+ }
1343
+ },
1333
1344
  "additionalProperties": false
1334
1345
  },
1335
1346
  "meta": {
@@ -1794,6 +1805,19 @@
1794
1805
  "baudRate": {
1795
1806
  "type": "number"
1796
1807
  },
1808
+ "dataBits": {
1809
+ "type": "number"
1810
+ },
1811
+ "stopBits": {
1812
+ "type": "number"
1813
+ },
1814
+ "parity": {
1815
+ "type": "string",
1816
+ "maxLength": 8
1817
+ },
1818
+ "rtscts": {
1819
+ "type": "boolean"
1820
+ },
1797
1821
  "encoding": {
1798
1822
  "type": "string",
1799
1823
  "maxLength": 48
@@ -1802,6 +1826,10 @@
1802
1826
  "type": "string",
1803
1827
  "maxLength": 1024
1804
1828
  },
1829
+ "writeOnOpenEncoding": {
1830
+ "type": "string",
1831
+ "maxLength": 48
1832
+ },
1805
1833
  "byteLength": {
1806
1834
  "type": "string",
1807
1835
  "maxLength": 48
@@ -1809,6 +1837,10 @@
1809
1837
  "delimiter": {
1810
1838
  "type": "string",
1811
1839
  "maxLength": 48
1840
+ },
1841
+ "delimiterEncoding": {
1842
+ "type": "string",
1843
+ "maxLength": 48
1812
1844
  }
1813
1845
  },
1814
1846
  "additionalProperties": false
@@ -3546,6 +3578,17 @@
3546
3578
  },
3547
3579
  "config": {
3548
3580
  "type": "object",
3581
+ "properties": {
3582
+ "scope": {
3583
+ "type": "string",
3584
+ "enum": [
3585
+ "local",
3586
+ "global",
3587
+ "experience",
3588
+ "cloud"
3589
+ ]
3590
+ }
3591
+ },
3549
3592
  "additionalProperties": false
3550
3593
  },
3551
3594
  "meta": {
@@ -4010,6 +4053,19 @@
4010
4053
  "baudRate": {
4011
4054
  "type": "number"
4012
4055
  },
4056
+ "dataBits": {
4057
+ "type": "number"
4058
+ },
4059
+ "stopBits": {
4060
+ "type": "number"
4061
+ },
4062
+ "parity": {
4063
+ "type": "string",
4064
+ "maxLength": 8
4065
+ },
4066
+ "rtscts": {
4067
+ "type": "boolean"
4068
+ },
4013
4069
  "encoding": {
4014
4070
  "type": "string",
4015
4071
  "maxLength": 48
@@ -4018,6 +4074,10 @@
4018
4074
  "type": "string",
4019
4075
  "maxLength": 1024
4020
4076
  },
4077
+ "writeOnOpenEncoding": {
4078
+ "type": "string",
4079
+ "maxLength": 48
4080
+ },
4021
4081
  "byteLength": {
4022
4082
  "type": "string",
4023
4083
  "maxLength": 48
@@ -4025,6 +4085,10 @@
4025
4085
  "delimiter": {
4026
4086
  "type": "string",
4027
4087
  "maxLength": 48
4088
+ },
4089
+ "delimiterEncoding": {
4090
+ "type": "string",
4091
+ "maxLength": 48
4028
4092
  }
4029
4093
  },
4030
4094
  "additionalProperties": false
@@ -5712,6 +5776,17 @@
5712
5776
  },
5713
5777
  "config": {
5714
5778
  "type": "object",
5779
+ "properties": {
5780
+ "scope": {
5781
+ "type": "string",
5782
+ "enum": [
5783
+ "local",
5784
+ "global",
5785
+ "experience",
5786
+ "cloud"
5787
+ ]
5788
+ }
5789
+ },
5715
5790
  "additionalProperties": false
5716
5791
  },
5717
5792
  "meta": {
@@ -6176,6 +6251,19 @@
6176
6251
  "baudRate": {
6177
6252
  "type": "number"
6178
6253
  },
6254
+ "dataBits": {
6255
+ "type": "number"
6256
+ },
6257
+ "stopBits": {
6258
+ "type": "number"
6259
+ },
6260
+ "parity": {
6261
+ "type": "string",
6262
+ "maxLength": 8
6263
+ },
6264
+ "rtscts": {
6265
+ "type": "boolean"
6266
+ },
6179
6267
  "encoding": {
6180
6268
  "type": "string",
6181
6269
  "maxLength": 48
@@ -6184,6 +6272,10 @@
6184
6272
  "type": "string",
6185
6273
  "maxLength": 1024
6186
6274
  },
6275
+ "writeOnOpenEncoding": {
6276
+ "type": "string",
6277
+ "maxLength": 48
6278
+ },
6187
6279
  "byteLength": {
6188
6280
  "type": "string",
6189
6281
  "maxLength": 48
@@ -6191,6 +6283,10 @@
6191
6283
  "delimiter": {
6192
6284
  "type": "string",
6193
6285
  "maxLength": 48
6286
+ },
6287
+ "delimiterEncoding": {
6288
+ "type": "string",
6289
+ "maxLength": 48
6194
6290
  }
6195
6291
  },
6196
6292
  "additionalProperties": false
@@ -37,6 +37,15 @@
37
37
  "endpointDefaultCors": {
38
38
  "type": "boolean"
39
39
  },
40
+ "allowedCorsOrigins": {
41
+ "type": "array",
42
+ "items": {
43
+ "type": "string",
44
+ "minLength": 8,
45
+ "maxLength": 270
46
+ },
47
+ "maxItems": 100
48
+ },
40
49
  "version": {
41
50
  "type": "string",
42
51
  "minLength": 1,
@@ -53,7 +62,7 @@
53
62
  "properties": {
54
63
  "domainName": {
55
64
  "type": "string",
56
- "maxLength": 1024,
65
+ "maxLength": 45,
57
66
  "minLength": 3
58
67
  },
59
68
  "id": {
@@ -5,6 +5,15 @@
5
5
  "endpointDefaultCors": {
6
6
  "type": "boolean"
7
7
  },
8
+ "allowedCorsOrigins": {
9
+ "type": "array",
10
+ "items": {
11
+ "type": "string",
12
+ "minLength": 8,
13
+ "maxLength": 270
14
+ },
15
+ "maxItems": 100
16
+ },
8
17
  "description": {
9
18
  "type": "string",
10
19
  "maxLength": 32767
@@ -44,6 +44,15 @@
44
44
  "endpointDefaultCors": {
45
45
  "type": "boolean"
46
46
  },
47
+ "allowedCorsOrigins": {
48
+ "type": "array",
49
+ "items": {
50
+ "type": "string",
51
+ "minLength": 8,
52
+ "maxLength": 270
53
+ },
54
+ "maxItems": 100
55
+ },
47
56
  "version": {
48
57
  "type": "string",
49
58
  "minLength": 1,
@@ -60,7 +69,7 @@
60
69
  "properties": {
61
70
  "domainName": {
62
71
  "type": "string",
63
- "maxLength": 1024,
72
+ "maxLength": 45,
64
73
  "minLength": 3
65
74
  },
66
75
  "id": {
data/schemas/files.json CHANGED
@@ -125,6 +125,9 @@
125
125
  "DESC",
126
126
  ""
127
127
  ]
128
+ },
129
+ "parentExists": {
130
+ "type": "boolean"
128
131
  }
129
132
  }
130
133
  }
data/schemas/flow.json CHANGED
@@ -947,6 +947,17 @@
947
947
  },
948
948
  "config": {
949
949
  "type": "object",
950
+ "properties": {
951
+ "scope": {
952
+ "type": "string",
953
+ "enum": [
954
+ "local",
955
+ "global",
956
+ "experience",
957
+ "cloud"
958
+ ]
959
+ }
960
+ },
950
961
  "additionalProperties": false
951
962
  },
952
963
  "meta": {
@@ -1411,6 +1422,19 @@
1411
1422
  "baudRate": {
1412
1423
  "type": "number"
1413
1424
  },
1425
+ "dataBits": {
1426
+ "type": "number"
1427
+ },
1428
+ "stopBits": {
1429
+ "type": "number"
1430
+ },
1431
+ "parity": {
1432
+ "type": "string",
1433
+ "maxLength": 8
1434
+ },
1435
+ "rtscts": {
1436
+ "type": "boolean"
1437
+ },
1414
1438
  "encoding": {
1415
1439
  "type": "string",
1416
1440
  "maxLength": 48
@@ -1419,6 +1443,10 @@
1419
1443
  "type": "string",
1420
1444
  "maxLength": 1024
1421
1445
  },
1446
+ "writeOnOpenEncoding": {
1447
+ "type": "string",
1448
+ "maxLength": 48
1449
+ },
1422
1450
  "byteLength": {
1423
1451
  "type": "string",
1424
1452
  "maxLength": 48
@@ -1426,6 +1454,10 @@
1426
1454
  "delimiter": {
1427
1455
  "type": "string",
1428
1456
  "maxLength": 48
1457
+ },
1458
+ "delimiterEncoding": {
1459
+ "type": "string",
1460
+ "maxLength": 48
1429
1461
  }
1430
1462
  },
1431
1463
  "additionalProperties": false
@@ -0,0 +1,87 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "flowVersion": {
6
+ "type": "string",
7
+ "minLength": 1,
8
+ "maxLength": 255
9
+ },
10
+ "flowVersionId": {
11
+ "type": "string",
12
+ "pattern": "^[A-Fa-f\\d]{24}$"
13
+ },
14
+ "deviceId": {
15
+ "type": "string",
16
+ "pattern": "^[A-Fa-f\\d]{24}$"
17
+ },
18
+ "start": {
19
+ "type": "string",
20
+ "format": "date-time"
21
+ },
22
+ "end": {
23
+ "type": "string",
24
+ "format": "date-time"
25
+ },
26
+ "limit": {
27
+ "type": "number"
28
+ },
29
+ "sortDirection": {
30
+ "type": "string",
31
+ "enum": [
32
+ "asc",
33
+ "desc",
34
+ "ASC",
35
+ "DESC",
36
+ ""
37
+ ]
38
+ },
39
+ "errors": {
40
+ "type": "array",
41
+ "items": {
42
+ "type": "object",
43
+ "properties": {
44
+ "time": {
45
+ "type": "string",
46
+ "format": "date-time"
47
+ },
48
+ "deviceId": {
49
+ "type": "string",
50
+ "pattern": "^[A-Fa-f\\d]{24}$"
51
+ },
52
+ "deviceName": {
53
+ "type": "string",
54
+ "minLength": 1,
55
+ "maxLength": 255
56
+ },
57
+ "flowVersion": {
58
+ "type": "string",
59
+ "minLength": 1,
60
+ "maxLength": 255
61
+ },
62
+ "flowVersionId": {
63
+ "type": "string",
64
+ "pattern": "^[A-Fa-f\\d]{24}$"
65
+ },
66
+ "nodeId": {
67
+ "type": "string"
68
+ },
69
+ "nodeLabel": {
70
+ "type": "string"
71
+ },
72
+ "error": {
73
+ "type": "object",
74
+ "properties": {
75
+ "name": {
76
+ "type": "string"
77
+ },
78
+ "message": {
79
+ "type": "string"
80
+ }
81
+ }
82
+ }
83
+ }
84
+ }
85
+ }
86
+ }
87
+ }