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
@@ -356,8 +356,18 @@
356
356
  "type": "object",
357
357
  "properties": {
358
358
  "value": {
359
- "type": "string",
360
- "maxLength": 255
359
+ "oneOf": [
360
+ {
361
+ "type": "string",
362
+ "maxLength": 255
363
+ },
364
+ {
365
+ "type": "number"
366
+ },
367
+ {
368
+ "type": "boolean"
369
+ }
370
+ ]
361
371
  }
362
372
  },
363
373
  "additionalProperties": false,
@@ -412,6 +422,10 @@
412
422
  "type": "string",
413
423
  "maxLength": 255
414
424
  },
425
+ "expression": {
426
+ "type": "string",
427
+ "maxLength": 255
428
+ },
415
429
  "yAxisLabel": {
416
430
  "type": "string",
417
431
  "maxLength": 255
@@ -606,8 +620,18 @@
606
620
  "type": "object",
607
621
  "properties": {
608
622
  "value": {
609
- "type": "string",
610
- "maxLength": 255
623
+ "oneOf": [
624
+ {
625
+ "type": "string",
626
+ "maxLength": 255
627
+ },
628
+ {
629
+ "type": "number"
630
+ },
631
+ {
632
+ "type": "boolean"
633
+ }
634
+ ]
611
635
  }
612
636
  },
613
637
  "additionalProperties": false,
@@ -769,8 +793,18 @@
769
793
  "type": "object",
770
794
  "properties": {
771
795
  "value": {
772
- "type": "string",
773
- "maxLength": 255
796
+ "oneOf": [
797
+ {
798
+ "type": "string",
799
+ "maxLength": 255
800
+ },
801
+ {
802
+ "type": "number"
803
+ },
804
+ {
805
+ "type": "boolean"
806
+ }
807
+ ]
774
808
  }
775
809
  },
776
810
  "additionalProperties": false,
@@ -1007,6 +1041,24 @@
1007
1041
  "$and",
1008
1042
  "advanced"
1009
1043
  ]
1044
+ },
1045
+ "columns": {
1046
+ "type": "array",
1047
+ "maxItems": 100,
1048
+ "items": {
1049
+ "type": "object",
1050
+ "properties": {
1051
+ "id": {
1052
+ "type": "string",
1053
+ "maxLength": 48
1054
+ },
1055
+ "type": {
1056
+ "type": "string",
1057
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
1058
+ }
1059
+ },
1060
+ "additionalProperties": false
1061
+ }
1010
1062
  }
1011
1063
  },
1012
1064
  "additionalProperties": false
@@ -1274,6 +1326,9 @@
1274
1326
  "type": "string",
1275
1327
  "maxLength": 255
1276
1328
  }
1329
+ },
1330
+ "includeDeviceInfo": {
1331
+ "type": "boolean"
1277
1332
  }
1278
1333
  },
1279
1334
  "additionalProperties": false
@@ -1548,8 +1603,17 @@
1548
1603
  "state",
1549
1604
  "tag",
1550
1605
  "deviceName",
1551
- "sourceId"
1606
+ "sourceId",
1607
+ "custom"
1552
1608
  ]
1609
+ },
1610
+ "headerTemplate": {
1611
+ "type": "string",
1612
+ "maxLength": 1024
1613
+ },
1614
+ "rowTemplate": {
1615
+ "type": "string",
1616
+ "maxLength": 32767
1553
1617
  }
1554
1618
  },
1555
1619
  "additionalProperties": false
@@ -1751,8 +1815,18 @@
1751
1815
  "type": "object",
1752
1816
  "properties": {
1753
1817
  "value": {
1754
- "type": "string",
1755
- "maxLength": 255
1818
+ "oneOf": [
1819
+ {
1820
+ "type": "string",
1821
+ "maxLength": 255
1822
+ },
1823
+ {
1824
+ "type": "number"
1825
+ },
1826
+ {
1827
+ "type": "boolean"
1828
+ }
1829
+ ]
1756
1830
  }
1757
1831
  },
1758
1832
  "additionalProperties": false,
@@ -1807,6 +1881,10 @@
1807
1881
  "type": "string",
1808
1882
  "maxLength": 255
1809
1883
  },
1884
+ "expression": {
1885
+ "type": "string",
1886
+ "maxLength": 255
1887
+ },
1810
1888
  "yAxisLabel": {
1811
1889
  "type": "string",
1812
1890
  "maxLength": 255
@@ -2037,8 +2115,18 @@
2037
2115
  "type": "object",
2038
2116
  "properties": {
2039
2117
  "value": {
2040
- "type": "string",
2041
- "maxLength": 255
2118
+ "oneOf": [
2119
+ {
2120
+ "type": "string",
2121
+ "maxLength": 255
2122
+ },
2123
+ {
2124
+ "type": "number"
2125
+ },
2126
+ {
2127
+ "type": "boolean"
2128
+ }
2129
+ ]
2042
2130
  }
2043
2131
  },
2044
2132
  "additionalProperties": false,
@@ -2523,7 +2611,7 @@
2523
2611
  },
2524
2612
  "segments": {
2525
2613
  "type": "array",
2526
- "maxItems": 100,
2614
+ "maxItems": 300,
2527
2615
  "items": {
2528
2616
  "oneOf": [
2529
2617
  {
@@ -2619,8 +2707,18 @@
2619
2707
  "type": "object",
2620
2708
  "properties": {
2621
2709
  "value": {
2622
- "type": "string",
2623
- "maxLength": 255
2710
+ "oneOf": [
2711
+ {
2712
+ "type": "string",
2713
+ "maxLength": 255
2714
+ },
2715
+ {
2716
+ "type": "number"
2717
+ },
2718
+ {
2719
+ "type": "boolean"
2720
+ }
2721
+ ]
2624
2722
  }
2625
2723
  },
2626
2724
  "additionalProperties": false,
@@ -3213,8 +3311,18 @@
3213
3311
  "type": "object",
3214
3312
  "properties": {
3215
3313
  "value": {
3216
- "type": "string",
3217
- "maxLength": 255
3314
+ "oneOf": [
3315
+ {
3316
+ "type": "string",
3317
+ "maxLength": 255
3318
+ },
3319
+ {
3320
+ "type": "number"
3321
+ },
3322
+ {
3323
+ "type": "boolean"
3324
+ }
3325
+ ]
3218
3326
  }
3219
3327
  },
3220
3328
  "additionalProperties": false,
@@ -3269,6 +3377,10 @@
3269
3377
  "type": "string",
3270
3378
  "maxLength": 255
3271
3379
  },
3380
+ "expression": {
3381
+ "type": "string",
3382
+ "maxLength": 255
3383
+ },
3272
3384
  "yAxisLabel": {
3273
3385
  "type": "string",
3274
3386
  "maxLength": 255
@@ -3556,8 +3668,18 @@
3556
3668
  "type": "object",
3557
3669
  "properties": {
3558
3670
  "value": {
3559
- "type": "string",
3560
- "maxLength": 255
3671
+ "oneOf": [
3672
+ {
3673
+ "type": "string",
3674
+ "maxLength": 255
3675
+ },
3676
+ {
3677
+ "type": "number"
3678
+ },
3679
+ {
3680
+ "type": "boolean"
3681
+ }
3682
+ ]
3561
3683
  }
3562
3684
  },
3563
3685
  "additionalProperties": false,
@@ -3780,8 +3902,18 @@
3780
3902
  "type": "object",
3781
3903
  "properties": {
3782
3904
  "value": {
3783
- "type": "string",
3784
- "maxLength": 255
3905
+ "oneOf": [
3906
+ {
3907
+ "type": "string",
3908
+ "maxLength": 255
3909
+ },
3910
+ {
3911
+ "type": "number"
3912
+ },
3913
+ {
3914
+ "type": "boolean"
3915
+ }
3916
+ ]
3785
3917
  }
3786
3918
  },
3787
3919
  "additionalProperties": false,
@@ -3833,6 +3965,9 @@
3833
3965
  },
3834
3966
  "defaultValue": {
3835
3967
  "type": "boolean"
3968
+ },
3969
+ "includeLabel": {
3970
+ "type": "boolean"
3836
3971
  }
3837
3972
  },
3838
3973
  "additionalProperties": false
@@ -3959,8 +4094,18 @@
3959
4094
  "type": "object",
3960
4095
  "properties": {
3961
4096
  "value": {
3962
- "type": "string",
3963
- "maxLength": 255
4097
+ "oneOf": [
4098
+ {
4099
+ "type": "string",
4100
+ "maxLength": 255
4101
+ },
4102
+ {
4103
+ "type": "number"
4104
+ },
4105
+ {
4106
+ "type": "boolean"
4107
+ }
4108
+ ]
3964
4109
  }
3965
4110
  },
3966
4111
  "additionalProperties": false,
@@ -4139,8 +4284,18 @@
4139
4284
  "type": "object",
4140
4285
  "properties": {
4141
4286
  "value": {
4142
- "type": "string",
4143
- "maxLength": 255
4287
+ "oneOf": [
4288
+ {
4289
+ "type": "string",
4290
+ "maxLength": 255
4291
+ },
4292
+ {
4293
+ "type": "number"
4294
+ },
4295
+ {
4296
+ "type": "boolean"
4297
+ }
4298
+ ]
4144
4299
  }
4145
4300
  },
4146
4301
  "additionalProperties": false,
@@ -4789,8 +4944,18 @@
4789
4944
  "type": "object",
4790
4945
  "properties": {
4791
4946
  "value": {
4792
- "type": "string",
4793
- "maxLength": 255
4947
+ "oneOf": [
4948
+ {
4949
+ "type": "string",
4950
+ "maxLength": 255
4951
+ },
4952
+ {
4953
+ "type": "number"
4954
+ },
4955
+ {
4956
+ "type": "boolean"
4957
+ }
4958
+ ]
4794
4959
  }
4795
4960
  },
4796
4961
  "additionalProperties": false,
@@ -4845,6 +5010,10 @@
4845
5010
  "type": "string",
4846
5011
  "maxLength": 255
4847
5012
  },
5013
+ "expression": {
5014
+ "type": "string",
5015
+ "maxLength": 255
5016
+ },
4848
5017
  "yAxisLabel": {
4849
5018
  "type": "string",
4850
5019
  "maxLength": 255
@@ -39,7 +39,138 @@
39
39
  "maxItems": 100
40
40
  },
41
41
  "deviceQuery": {
42
- "ref": "#/definitions/advancedQuery"
42
+ "title": "Advanced Query",
43
+ "description": "Schema for advanced filters and queries",
44
+ "type": "object",
45
+ "properties": {
46
+ "$and": {
47
+ "type": "array",
48
+ "items": {
49
+ "$ref": "#/definitions/advancedQuery"
50
+ },
51
+ "maxItems": 100
52
+ },
53
+ "$or": {
54
+ "type": "array",
55
+ "items": {
56
+ "$ref": "#/definitions/advancedQuery"
57
+ },
58
+ "maxItems": 100
59
+ },
60
+ "$nor": {
61
+ "type": "array",
62
+ "items": {
63
+ "$ref": "#/definitions/advancedQuery"
64
+ },
65
+ "maxItems": 100
66
+ }
67
+ },
68
+ "patternProperties": {
69
+ "^[0-9a-zA-Z_-]{1,255}$": {
70
+ "oneOf": [
71
+ {
72
+ "type": [
73
+ "string",
74
+ "number",
75
+ "boolean",
76
+ "null"
77
+ ]
78
+ },
79
+ {
80
+ "type": "object",
81
+ "properties": {
82
+ "$eq": {
83
+ "type": [
84
+ "string",
85
+ "number",
86
+ "boolean",
87
+ "null"
88
+ ]
89
+ },
90
+ "$ne": {
91
+ "type": [
92
+ "string",
93
+ "number",
94
+ "boolean",
95
+ "null"
96
+ ]
97
+ },
98
+ "$gt": {
99
+ "type": [
100
+ "string",
101
+ "number",
102
+ "boolean",
103
+ "null"
104
+ ]
105
+ },
106
+ "$lt": {
107
+ "type": [
108
+ "string",
109
+ "number",
110
+ "boolean",
111
+ "null"
112
+ ]
113
+ },
114
+ "$gte": {
115
+ "type": [
116
+ "string",
117
+ "number",
118
+ "boolean",
119
+ "null"
120
+ ]
121
+ },
122
+ "$lte": {
123
+ "type": [
124
+ "string",
125
+ "number",
126
+ "boolean",
127
+ "null"
128
+ ]
129
+ },
130
+ "$startsWith": {
131
+ "type": "string",
132
+ "minLength": 1
133
+ },
134
+ "$endsWith": {
135
+ "type": "string",
136
+ "minLength": 1
137
+ },
138
+ "$contains": {
139
+ "type": "string",
140
+ "minLength": 1
141
+ },
142
+ "$ci": {
143
+ "type": "boolean"
144
+ },
145
+ "$in": {
146
+ "type": "array",
147
+ "maxItems": 100,
148
+ "items": {
149
+ "type": [
150
+ "string",
151
+ "number",
152
+ "boolean"
153
+ ]
154
+ }
155
+ },
156
+ "$nin": {
157
+ "type": "array",
158
+ "maxItems": 100,
159
+ "items": {
160
+ "type": [
161
+ "string",
162
+ "number",
163
+ "boolean"
164
+ ]
165
+ }
166
+ }
167
+ },
168
+ "additionalProperties": false
169
+ }
170
+ ]
171
+ }
172
+ },
173
+ "additionalProperties": false
43
174
  },
44
175
  "attributes": {
45
176
  "type": "array",