losant_rest 1.9.2 → 1.9.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/docs/_schemas.md +9757 -8758
  3. data/docs/application.md +81 -2
  4. data/docs/applicationTemplates.md +50 -0
  5. data/docs/auth.md +72 -0
  6. data/docs/devices.md +1 -0
  7. data/lib/losant_rest/application.rb +93 -2
  8. data/lib/losant_rest/application_templates.rb +88 -0
  9. data/lib/losant_rest/auth.rb +84 -0
  10. data/lib/losant_rest/client.rb +6 -2
  11. data/lib/losant_rest/devices.rb +3 -0
  12. data/lib/losant_rest/version.rb +2 -2
  13. data/lib/losant_rest.rb +1 -0
  14. data/schemas/advancedDeviceQuery.json +901 -0
  15. data/schemas/advancedEventQuery.json +177 -13
  16. data/schemas/advancedQuery.json +3 -0
  17. data/schemas/application.json +2 -2
  18. data/schemas/applicationCreationByTemplateResult.json +2 -2
  19. data/schemas/applicationPatch.json +2 -2
  20. data/schemas/applicationPost.json +6 -2
  21. data/schemas/applicationReadme.json +29 -0
  22. data/schemas/applicationReadmePatch.json +11 -0
  23. data/schemas/applicationTemplate.json +87 -0
  24. data/schemas/applicationTemplates.json +128 -0
  25. data/schemas/applications.json +2 -2
  26. data/schemas/dashboard.json +4 -0
  27. data/schemas/dashboardPatch.json +4 -0
  28. data/schemas/dashboardPost.json +4 -0
  29. data/schemas/dashboards.json +4 -0
  30. data/schemas/dataTableRows.json +3 -0
  31. data/schemas/dataTableRowsExport.json +3 -0
  32. data/schemas/devices.json +3 -0
  33. data/schemas/events.json +1 -816
  34. data/schemas/eventsExport.json +177 -13
  35. data/schemas/githubLogin.json +2 -0
  36. data/schemas/me.json +3 -0
  37. data/schemas/org.json +8 -0
  38. data/schemas/orgPatch.json +9 -0
  39. data/schemas/orgPost.json +9 -0
  40. data/schemas/orgs.json +8 -0
  41. data/schemas/samlResponse.json +21 -0
  42. data/schemas/ssoRequest.json +20 -0
  43. data/schemas/userCredentials.json +2 -0
  44. data/schemas/userPost.json +2 -0
  45. metadata +12 -4
@@ -6,13 +6,15 @@
6
6
  "type": "array",
7
7
  "items": {
8
8
  "$ref": "#/definitions/advancedEventQuery"
9
- }
9
+ },
10
+ "maxItems": 100
10
11
  },
11
12
  "$or": {
12
13
  "type": "array",
13
14
  "items": {
14
15
  "$ref": "#/definitions/advancedEventQuery"
15
- }
16
+ },
17
+ "maxItems": 100
16
18
  },
17
19
  "id": {
18
20
  "oneOf": [
@@ -86,6 +88,9 @@
86
88
  "$contains": {
87
89
  "type": "string",
88
90
  "minLength": 1
91
+ },
92
+ "$ci": {
93
+ "type": "boolean"
89
94
  }
90
95
  },
91
96
  "additionalProperties": false
@@ -164,6 +169,9 @@
164
169
  "$contains": {
165
170
  "type": "string",
166
171
  "minLength": 1
172
+ },
173
+ "$ci": {
174
+ "type": "boolean"
167
175
  }
168
176
  },
169
177
  "additionalProperties": false
@@ -242,6 +250,9 @@
242
250
  "$contains": {
243
251
  "type": "string",
244
252
  "minLength": 1
253
+ },
254
+ "$ci": {
255
+ "type": "boolean"
245
256
  }
246
257
  },
247
258
  "additionalProperties": false
@@ -320,6 +331,9 @@
320
331
  "$contains": {
321
332
  "type": "string",
322
333
  "minLength": 1
334
+ },
335
+ "$ci": {
336
+ "type": "boolean"
323
337
  }
324
338
  },
325
339
  "additionalProperties": false
@@ -398,6 +412,9 @@
398
412
  "$contains": {
399
413
  "type": "string",
400
414
  "minLength": 1
415
+ },
416
+ "$ci": {
417
+ "type": "boolean"
401
418
  }
402
419
  },
403
420
  "additionalProperties": false
@@ -476,6 +493,9 @@
476
493
  "$contains": {
477
494
  "type": "string",
478
495
  "minLength": 1
496
+ },
497
+ "$ci": {
498
+ "type": "boolean"
479
499
  }
480
500
  },
481
501
  "additionalProperties": false
@@ -554,6 +574,9 @@
554
574
  "$contains": {
555
575
  "type": "string",
556
576
  "minLength": 1
577
+ },
578
+ "$ci": {
579
+ "type": "boolean"
557
580
  }
558
581
  },
559
582
  "additionalProperties": false
@@ -632,6 +655,9 @@
632
655
  "$contains": {
633
656
  "type": "string",
634
657
  "minLength": 1
658
+ },
659
+ "$ci": {
660
+ "type": "boolean"
635
661
  }
636
662
  },
637
663
  "additionalProperties": false
@@ -710,12 +736,137 @@
710
736
  "$contains": {
711
737
  "type": "string",
712
738
  "minLength": 1
739
+ },
740
+ "$ci": {
741
+ "type": "boolean"
713
742
  }
714
743
  },
715
744
  "additionalProperties": false
716
745
  }
717
746
  ]
718
747
  },
748
+ "experienceUserId": {
749
+ "oneOf": [
750
+ {
751
+ "oneOf": [
752
+ {
753
+ "type": "string",
754
+ "pattern": "^[A-Fa-f\\d]{24}$"
755
+ },
756
+ {
757
+ "type": "null"
758
+ }
759
+ ]
760
+ },
761
+ {
762
+ "type": "object",
763
+ "properties": {
764
+ "$eq": {
765
+ "oneOf": [
766
+ {
767
+ "type": "string",
768
+ "pattern": "^[A-Fa-f\\d]{24}$"
769
+ },
770
+ {
771
+ "type": "null"
772
+ }
773
+ ]
774
+ },
775
+ "$ne": {
776
+ "oneOf": [
777
+ {
778
+ "type": "string",
779
+ "pattern": "^[A-Fa-f\\d]{24}$"
780
+ },
781
+ {
782
+ "type": "null"
783
+ }
784
+ ]
785
+ },
786
+ "$in": {
787
+ "type": "array",
788
+ "maxItems": 100,
789
+ "items": {
790
+ "type": "string",
791
+ "pattern": "^[A-Fa-f\\d]{24}$"
792
+ }
793
+ },
794
+ "$nin": {
795
+ "type": "array",
796
+ "maxItems": 100,
797
+ "items": {
798
+ "type": "string",
799
+ "pattern": "^[A-Fa-f\\d]{24}$"
800
+ }
801
+ }
802
+ },
803
+ "additionalProperties": false,
804
+ "minProperties": 1,
805
+ "maxProperties": 1
806
+ }
807
+ ]
808
+ },
809
+ "experienceGroupId": {
810
+ "oneOf": [
811
+ {
812
+ "oneOf": [
813
+ {
814
+ "type": "string",
815
+ "pattern": "^[A-Fa-f\\d]{24}$"
816
+ },
817
+ {
818
+ "type": "null"
819
+ }
820
+ ]
821
+ },
822
+ {
823
+ "type": "object",
824
+ "properties": {
825
+ "$eq": {
826
+ "oneOf": [
827
+ {
828
+ "type": "string",
829
+ "pattern": "^[A-Fa-f\\d]{24}$"
830
+ },
831
+ {
832
+ "type": "null"
833
+ }
834
+ ]
835
+ },
836
+ "$ne": {
837
+ "oneOf": [
838
+ {
839
+ "type": "string",
840
+ "pattern": "^[A-Fa-f\\d]{24}$"
841
+ },
842
+ {
843
+ "type": "null"
844
+ }
845
+ ]
846
+ },
847
+ "$in": {
848
+ "type": "array",
849
+ "maxItems": 100,
850
+ "items": {
851
+ "type": "string",
852
+ "pattern": "^[A-Fa-f\\d]{24}$"
853
+ }
854
+ },
855
+ "$nin": {
856
+ "type": "array",
857
+ "maxItems": 100,
858
+ "items": {
859
+ "type": "string",
860
+ "pattern": "^[A-Fa-f\\d]{24}$"
861
+ }
862
+ }
863
+ },
864
+ "additionalProperties": false,
865
+ "minProperties": 1,
866
+ "maxProperties": 1
867
+ }
868
+ ]
869
+ },
719
870
  "eventTags": {
720
871
  "oneOf": [
721
872
  {
@@ -724,10 +875,12 @@
724
875
  "type": "object",
725
876
  "properties": {
726
877
  "$tagKey": {
727
- "type": "string"
878
+ "type": "string",
879
+ "maxLength": 255
728
880
  },
729
881
  "$tagValue": {
730
- "type": "string"
882
+ "type": "string",
883
+ "maxLength": 255
731
884
  }
732
885
  },
733
886
  "additionalProperties": false,
@@ -737,7 +890,8 @@
737
890
  "type": "object",
738
891
  "patternProperties": {
739
892
  "^[0-9a-zA-Z_-]{1,255}": {
740
- "type": "string"
893
+ "type": "string",
894
+ "maxLength": 255
741
895
  }
742
896
  },
743
897
  "additionalProperties": false
@@ -753,10 +907,12 @@
753
907
  "type": "object",
754
908
  "properties": {
755
909
  "$tagKey": {
756
- "type": "string"
910
+ "type": "string",
911
+ "maxLength": 255
757
912
  },
758
913
  "$tagValue": {
759
- "type": "string"
914
+ "type": "string",
915
+ "maxLength": 255
760
916
  }
761
917
  },
762
918
  "additionalProperties": false,
@@ -766,7 +922,8 @@
766
922
  "type": "object",
767
923
  "patternProperties": {
768
924
  "^[0-9a-zA-Z_-]{1,255}": {
769
- "type": "string"
925
+ "type": "string",
926
+ "maxLength": 255
770
927
  }
771
928
  },
772
929
  "additionalProperties": false
@@ -774,7 +931,9 @@
774
931
  ]
775
932
  }
776
933
  },
777
- "minProperties": 1,
934
+ "required": [
935
+ "$eq"
936
+ ],
778
937
  "additionalProperties": false
779
938
  },
780
939
  {
@@ -786,10 +945,12 @@
786
945
  "type": "object",
787
946
  "properties": {
788
947
  "$tagKey": {
789
- "type": "string"
948
+ "type": "string",
949
+ "maxLength": 255
790
950
  },
791
951
  "$tagValue": {
792
- "type": "string"
952
+ "type": "string",
953
+ "maxLength": 255
793
954
  }
794
955
  },
795
956
  "additionalProperties": false,
@@ -799,7 +960,8 @@
799
960
  "type": "object",
800
961
  "patternProperties": {
801
962
  "^[0-9a-zA-Z_-]{1,255}": {
802
- "type": "string"
963
+ "type": "string",
964
+ "maxLength": 255
803
965
  }
804
966
  },
805
967
  "additionalProperties": false
@@ -807,7 +969,9 @@
807
969
  ]
808
970
  }
809
971
  },
810
- "minProperties": 1,
972
+ "required": [
973
+ "$ne"
974
+ ],
811
975
  "additionalProperties": false
812
976
  }
813
977
  ]
@@ -88,6 +88,9 @@
88
88
  "$contains": {
89
89
  "type": "string",
90
90
  "minLength": 1
91
+ },
92
+ "$ci": {
93
+ "type": "boolean"
91
94
  }
92
95
  },
93
96
  "additionalProperties": false
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "description": {
47
47
  "type": "string",
48
- "maxLength": 32767
48
+ "maxLength": 1024
49
49
  },
50
50
  "endpointSlug": {
51
51
  "type": "string",
@@ -81,7 +81,7 @@
81
81
  },
82
82
  "description": {
83
83
  "type": "string",
84
- "maxLength": 32767
84
+ "maxLength": 1024
85
85
  }
86
86
  },
87
87
  "additionalProperties": false,
@@ -50,7 +50,7 @@
50
50
  },
51
51
  "description": {
52
52
  "type": "string",
53
- "maxLength": 32767
53
+ "maxLength": 1024
54
54
  },
55
55
  "endpointSlug": {
56
56
  "type": "string",
@@ -86,7 +86,7 @@
86
86
  },
87
87
  "description": {
88
88
  "type": "string",
89
- "maxLength": 32767
89
+ "maxLength": 1024
90
90
  }
91
91
  },
92
92
  "additionalProperties": false,
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "description": {
11
11
  "type": "string",
12
- "maxLength": 32767
12
+ "maxLength": 1024
13
13
  },
14
14
  "endpointSlug": {
15
15
  "type": "string",
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "description": {
47
47
  "type": "string",
48
- "maxLength": 32767
48
+ "maxLength": 1024
49
49
  }
50
50
  },
51
51
  "additionalProperties": false,
@@ -6,6 +6,10 @@
6
6
  "type": "string",
7
7
  "pattern": "^[A-Fa-f\\d]{24}$"
8
8
  },
9
+ "applicationTemplateId": {
10
+ "type": "string",
11
+ "pattern": "^[A-Fa-f\\d]{24}$"
12
+ },
9
13
  "name": {
10
14
  "type": "string",
11
15
  "minLength": 1,
@@ -13,7 +17,7 @@
13
17
  },
14
18
  "description": {
15
19
  "type": "string",
16
- "maxLength": 32767
20
+ "maxLength": 1024
17
21
  },
18
22
  "endpointSlug": {
19
23
  "type": "string",
@@ -49,7 +53,7 @@
49
53
  },
50
54
  "description": {
51
55
  "type": "string",
52
- "maxLength": 32767
56
+ "maxLength": 1024
53
57
  }
54
58
  },
55
59
  "additionalProperties": false,
@@ -0,0 +1,29 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "applicationId": {
6
+ "type": "string",
7
+ "pattern": "^[A-Fa-f\\d]{24}$"
8
+ },
9
+ "lastUpdated": {
10
+ "type": "string",
11
+ "format": "date-time"
12
+ },
13
+ "lastUpdatedById": {
14
+ "type": "string",
15
+ "pattern": "^[A-Fa-f\\d]{24}$"
16
+ },
17
+ "lastUpdatedByType": {
18
+ "type": "string",
19
+ "enum": [
20
+ "flow",
21
+ "user",
22
+ "apiToken"
23
+ ]
24
+ },
25
+ "content": {
26
+ "type": "string"
27
+ }
28
+ }
29
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "content": {
6
+ "type": "string",
7
+ "maxLength": 131072
8
+ }
9
+ },
10
+ "additionalProperties": false
11
+ }
@@ -0,0 +1,87 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "id": {
6
+ "type": "string",
7
+ "pattern": "^[A-Fa-f\\d]{24}$"
8
+ },
9
+ "creationDate": {
10
+ "type": "string",
11
+ "format": "date-time"
12
+ },
13
+ "lastUpdated": {
14
+ "type": "string",
15
+ "format": "date-time"
16
+ },
17
+ "name": {
18
+ "type": "string",
19
+ "minLength": 1,
20
+ "maxLength": 255
21
+ },
22
+ "description": {
23
+ "type": "string",
24
+ "maxLength": 1024
25
+ },
26
+ "public": {
27
+ "type": "boolean"
28
+ },
29
+ "imageUrl": {
30
+ "type": "string",
31
+ "maxLength": 1024
32
+ },
33
+ "summary": {
34
+ "type": "object",
35
+ "properties": {
36
+ "applicationCertificateAuthorityCount": {
37
+ "type": "number"
38
+ },
39
+ "dashboardCount": {
40
+ "type": "number"
41
+ },
42
+ "deviceCount": {
43
+ "type": "number"
44
+ },
45
+ "deviceRecipeCount": {
46
+ "type": "number"
47
+ },
48
+ "dataTableCount": {
49
+ "type": "number"
50
+ },
51
+ "experienceGroupCount": {
52
+ "type": "number"
53
+ },
54
+ "experienceUserCount": {
55
+ "type": "number"
56
+ },
57
+ "experienceVersionCount": {
58
+ "type": "number"
59
+ },
60
+ "experienceViewCount": {
61
+ "type": "number"
62
+ },
63
+ "experienceEndpointCount": {
64
+ "type": "number"
65
+ },
66
+ "fileCount": {
67
+ "type": "number"
68
+ },
69
+ "flowCount": {
70
+ "type": "number"
71
+ },
72
+ "integrationCount": {
73
+ "type": "number"
74
+ },
75
+ "notebookCount": {
76
+ "type": "number"
77
+ },
78
+ "dataTableCsvSize": {
79
+ "type": "number"
80
+ },
81
+ "webhookCount": {
82
+ "type": "number"
83
+ }
84
+ }
85
+ }
86
+ }
87
+ }
@@ -0,0 +1,128 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-04/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "items": {
6
+ "type": "array",
7
+ "items": {
8
+ "title": "Application Template",
9
+ "description": "Schema for a single Application Template",
10
+ "type": "object",
11
+ "properties": {
12
+ "id": {
13
+ "type": "string",
14
+ "pattern": "^[A-Fa-f\\d]{24}$"
15
+ },
16
+ "creationDate": {
17
+ "type": "string",
18
+ "format": "date-time"
19
+ },
20
+ "lastUpdated": {
21
+ "type": "string",
22
+ "format": "date-time"
23
+ },
24
+ "name": {
25
+ "type": "string",
26
+ "minLength": 1,
27
+ "maxLength": 255
28
+ },
29
+ "description": {
30
+ "type": "string",
31
+ "maxLength": 1024
32
+ },
33
+ "public": {
34
+ "type": "boolean"
35
+ },
36
+ "imageUrl": {
37
+ "type": "string",
38
+ "maxLength": 1024
39
+ },
40
+ "summary": {
41
+ "type": "object",
42
+ "properties": {
43
+ "applicationCertificateAuthorityCount": {
44
+ "type": "number"
45
+ },
46
+ "dashboardCount": {
47
+ "type": "number"
48
+ },
49
+ "deviceCount": {
50
+ "type": "number"
51
+ },
52
+ "deviceRecipeCount": {
53
+ "type": "number"
54
+ },
55
+ "dataTableCount": {
56
+ "type": "number"
57
+ },
58
+ "experienceGroupCount": {
59
+ "type": "number"
60
+ },
61
+ "experienceUserCount": {
62
+ "type": "number"
63
+ },
64
+ "experienceVersionCount": {
65
+ "type": "number"
66
+ },
67
+ "experienceViewCount": {
68
+ "type": "number"
69
+ },
70
+ "experienceEndpointCount": {
71
+ "type": "number"
72
+ },
73
+ "fileCount": {
74
+ "type": "number"
75
+ },
76
+ "flowCount": {
77
+ "type": "number"
78
+ },
79
+ "integrationCount": {
80
+ "type": "number"
81
+ },
82
+ "notebookCount": {
83
+ "type": "number"
84
+ },
85
+ "dataTableCsvSize": {
86
+ "type": "number"
87
+ },
88
+ "webhookCount": {
89
+ "type": "number"
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }
95
+ },
96
+ "count": {
97
+ "type": "integer"
98
+ },
99
+ "totalCount": {
100
+ "type": "integer"
101
+ },
102
+ "perPage": {
103
+ "type": "integer"
104
+ },
105
+ "page": {
106
+ "type": "integer"
107
+ },
108
+ "filter": {
109
+ "type": "string"
110
+ },
111
+ "filterField": {
112
+ "type": "string"
113
+ },
114
+ "sortField": {
115
+ "type": "string"
116
+ },
117
+ "sortDirection": {
118
+ "type": "string",
119
+ "enum": [
120
+ "asc",
121
+ "desc",
122
+ "ASC",
123
+ "DESC",
124
+ ""
125
+ ]
126
+ }
127
+ }
128
+ }
@@ -52,7 +52,7 @@
52
52
  },
53
53
  "description": {
54
54
  "type": "string",
55
- "maxLength": 32767
55
+ "maxLength": 1024
56
56
  },
57
57
  "endpointSlug": {
58
58
  "type": "string",
@@ -88,7 +88,7 @@
88
88
  },
89
89
  "description": {
90
90
  "type": "string",
91
- "maxLength": 32767
91
+ "maxLength": 1024
92
92
  }
93
93
  },
94
94
  "additionalProperties": false,