losant_rest 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -0
- data/docs/_schemas.md +906 -89
- data/docs/flows.md +1 -1
- data/docs/integration.md +130 -0
- data/docs/integrations.md +91 -0
- data/lib/losant_rest.rb +2 -0
- data/lib/losant_rest/client.rb +10 -2
- data/lib/losant_rest/flows.rb +1 -1
- data/lib/losant_rest/integration.rb +174 -0
- data/lib/losant_rest/integrations.rb +136 -0
- data/lib/losant_rest/version.rb +1 -1
- data/schemas/application.json +3 -0
- data/schemas/applicationApiTokenPost.json +8 -1
- data/schemas/applications.json +3 -0
- data/schemas/auditLog.json +1 -0
- data/schemas/auditLogFilter.json +1 -0
- data/schemas/auditLogs.json +1 -0
- data/schemas/flow.json +8 -7
- data/schemas/flowPatch.json +8 -7
- data/schemas/flowPost.json +8 -7
- data/schemas/flows.json +8 -7
- data/schemas/integration.json +169 -0
- data/schemas/integrationPatch.json +113 -0
- data/schemas/integrationPost.json +117 -0
- data/schemas/integrations.json +211 -0
- data/schemas/me.json +18 -0
- data/schemas/mePatch.json +4 -0
- data/schemas/org.json +14 -0
- data/schemas/orgs.json +14 -0
- data/schemas/payloadCounts.json +8 -0
- metadata +10 -2
@@ -0,0 +1,113 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
3
|
+
"type": "object",
|
4
|
+
"properties": {
|
5
|
+
"name": {
|
6
|
+
"type": "string",
|
7
|
+
"minLength": 1,
|
8
|
+
"maxLength": 1024
|
9
|
+
},
|
10
|
+
"integrationType": {
|
11
|
+
"type": "string",
|
12
|
+
"enum": [
|
13
|
+
"mqtt",
|
14
|
+
"googlePubSub"
|
15
|
+
]
|
16
|
+
},
|
17
|
+
"enabled": {
|
18
|
+
"type": "boolean"
|
19
|
+
},
|
20
|
+
"topics": {
|
21
|
+
"type": "array",
|
22
|
+
"items": {
|
23
|
+
"type": "string",
|
24
|
+
"minLength": 1,
|
25
|
+
"maxLength": 1024
|
26
|
+
}
|
27
|
+
},
|
28
|
+
"googlePubSubConfig": {
|
29
|
+
"type": "object",
|
30
|
+
"properties": {
|
31
|
+
"projectId": {
|
32
|
+
"type": "string",
|
33
|
+
"minLength": 1,
|
34
|
+
"maxLength": 1024
|
35
|
+
},
|
36
|
+
"keyJson": {
|
37
|
+
"type": "string",
|
38
|
+
"maxLength": 32767,
|
39
|
+
"minLength": 50
|
40
|
+
}
|
41
|
+
},
|
42
|
+
"additionalProperties": false,
|
43
|
+
"required": [
|
44
|
+
"projectId",
|
45
|
+
"keyJson"
|
46
|
+
]
|
47
|
+
},
|
48
|
+
"mqttConfig": {
|
49
|
+
"type": "object",
|
50
|
+
"properties": {
|
51
|
+
"clientId": {
|
52
|
+
"type": "string",
|
53
|
+
"maxLength": 1024,
|
54
|
+
"minLength": 1
|
55
|
+
},
|
56
|
+
"username": {
|
57
|
+
"type": "string",
|
58
|
+
"maxLength": 1024,
|
59
|
+
"minLength": 1
|
60
|
+
},
|
61
|
+
"password": {
|
62
|
+
"type": "string",
|
63
|
+
"maxLength": 1024,
|
64
|
+
"minLength": 1
|
65
|
+
},
|
66
|
+
"clean": {
|
67
|
+
"type": "boolean"
|
68
|
+
},
|
69
|
+
"port": {
|
70
|
+
"type": "number",
|
71
|
+
"minimum": 1,
|
72
|
+
"maximum": 65535
|
73
|
+
},
|
74
|
+
"protocol": {
|
75
|
+
"type": "string",
|
76
|
+
"enum": [
|
77
|
+
"mqtt",
|
78
|
+
"mqtts",
|
79
|
+
"ws",
|
80
|
+
"wss"
|
81
|
+
]
|
82
|
+
},
|
83
|
+
"host": {
|
84
|
+
"type": "string",
|
85
|
+
"maxLength": 1024,
|
86
|
+
"minLength": 1
|
87
|
+
},
|
88
|
+
"privateKey": {
|
89
|
+
"type": "string",
|
90
|
+
"maxLength": 32767,
|
91
|
+
"minLength": 50
|
92
|
+
},
|
93
|
+
"certificate": {
|
94
|
+
"type": "string",
|
95
|
+
"maxLength": 32767,
|
96
|
+
"minLength": 50
|
97
|
+
},
|
98
|
+
"caCertificate": {
|
99
|
+
"type": "string",
|
100
|
+
"maxLength": 32767,
|
101
|
+
"minLength": 50
|
102
|
+
}
|
103
|
+
},
|
104
|
+
"additionalProperties": false,
|
105
|
+
"required": [
|
106
|
+
"port",
|
107
|
+
"protocol",
|
108
|
+
"host"
|
109
|
+
]
|
110
|
+
}
|
111
|
+
},
|
112
|
+
"additionalProperties": false
|
113
|
+
}
|
@@ -0,0 +1,117 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
3
|
+
"type": "object",
|
4
|
+
"properties": {
|
5
|
+
"name": {
|
6
|
+
"type": "string",
|
7
|
+
"minLength": 1,
|
8
|
+
"maxLength": 1024
|
9
|
+
},
|
10
|
+
"integrationType": {
|
11
|
+
"type": "string",
|
12
|
+
"enum": [
|
13
|
+
"mqtt",
|
14
|
+
"googlePubSub"
|
15
|
+
]
|
16
|
+
},
|
17
|
+
"enabled": {
|
18
|
+
"type": "boolean"
|
19
|
+
},
|
20
|
+
"topics": {
|
21
|
+
"type": "array",
|
22
|
+
"items": {
|
23
|
+
"type": "string",
|
24
|
+
"minLength": 1,
|
25
|
+
"maxLength": 1024
|
26
|
+
}
|
27
|
+
},
|
28
|
+
"googlePubSubConfig": {
|
29
|
+
"type": "object",
|
30
|
+
"properties": {
|
31
|
+
"projectId": {
|
32
|
+
"type": "string",
|
33
|
+
"minLength": 1,
|
34
|
+
"maxLength": 1024
|
35
|
+
},
|
36
|
+
"keyJson": {
|
37
|
+
"type": "string",
|
38
|
+
"maxLength": 32767,
|
39
|
+
"minLength": 50
|
40
|
+
}
|
41
|
+
},
|
42
|
+
"additionalProperties": false,
|
43
|
+
"required": [
|
44
|
+
"projectId",
|
45
|
+
"keyJson"
|
46
|
+
]
|
47
|
+
},
|
48
|
+
"mqttConfig": {
|
49
|
+
"type": "object",
|
50
|
+
"properties": {
|
51
|
+
"clientId": {
|
52
|
+
"type": "string",
|
53
|
+
"maxLength": 1024,
|
54
|
+
"minLength": 1
|
55
|
+
},
|
56
|
+
"username": {
|
57
|
+
"type": "string",
|
58
|
+
"maxLength": 1024,
|
59
|
+
"minLength": 1
|
60
|
+
},
|
61
|
+
"password": {
|
62
|
+
"type": "string",
|
63
|
+
"maxLength": 1024,
|
64
|
+
"minLength": 1
|
65
|
+
},
|
66
|
+
"clean": {
|
67
|
+
"type": "boolean"
|
68
|
+
},
|
69
|
+
"port": {
|
70
|
+
"type": "number",
|
71
|
+
"minimum": 1,
|
72
|
+
"maximum": 65535
|
73
|
+
},
|
74
|
+
"protocol": {
|
75
|
+
"type": "string",
|
76
|
+
"enum": [
|
77
|
+
"mqtt",
|
78
|
+
"mqtts",
|
79
|
+
"ws",
|
80
|
+
"wss"
|
81
|
+
]
|
82
|
+
},
|
83
|
+
"host": {
|
84
|
+
"type": "string",
|
85
|
+
"maxLength": 1024,
|
86
|
+
"minLength": 1
|
87
|
+
},
|
88
|
+
"privateKey": {
|
89
|
+
"type": "string",
|
90
|
+
"maxLength": 32767,
|
91
|
+
"minLength": 50
|
92
|
+
},
|
93
|
+
"certificate": {
|
94
|
+
"type": "string",
|
95
|
+
"maxLength": 32767,
|
96
|
+
"minLength": 50
|
97
|
+
},
|
98
|
+
"caCertificate": {
|
99
|
+
"type": "string",
|
100
|
+
"maxLength": 32767,
|
101
|
+
"minLength": 50
|
102
|
+
}
|
103
|
+
},
|
104
|
+
"additionalProperties": false,
|
105
|
+
"required": [
|
106
|
+
"port",
|
107
|
+
"protocol",
|
108
|
+
"host"
|
109
|
+
]
|
110
|
+
}
|
111
|
+
},
|
112
|
+
"additionalProperties": false,
|
113
|
+
"required": [
|
114
|
+
"name",
|
115
|
+
"integrationType"
|
116
|
+
]
|
117
|
+
}
|
@@ -0,0 +1,211 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
3
|
+
"type": "object",
|
4
|
+
"properties": {
|
5
|
+
"items": {
|
6
|
+
"type": "array",
|
7
|
+
"items": {
|
8
|
+
"title": "Integrations",
|
9
|
+
"description": "Schema for a single Integrations",
|
10
|
+
"type": "object",
|
11
|
+
"properties": {
|
12
|
+
"id": {
|
13
|
+
"type": "string",
|
14
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
15
|
+
},
|
16
|
+
"integrationId": {
|
17
|
+
"type": "string",
|
18
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
19
|
+
},
|
20
|
+
"applicationId": {
|
21
|
+
"type": "string",
|
22
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
23
|
+
},
|
24
|
+
"creationDate": {
|
25
|
+
"type": "string",
|
26
|
+
"format": "date-time"
|
27
|
+
},
|
28
|
+
"lastUpdated": {
|
29
|
+
"type": "string",
|
30
|
+
"format": "date-time"
|
31
|
+
},
|
32
|
+
"name": {
|
33
|
+
"type": "string",
|
34
|
+
"minLength": 1,
|
35
|
+
"maxLength": 1024
|
36
|
+
},
|
37
|
+
"integrationType": {
|
38
|
+
"type": "string",
|
39
|
+
"enum": [
|
40
|
+
"mqtt",
|
41
|
+
"googlePubSub"
|
42
|
+
]
|
43
|
+
},
|
44
|
+
"enabled": {
|
45
|
+
"type": "boolean"
|
46
|
+
},
|
47
|
+
"topics": {
|
48
|
+
"type": "array",
|
49
|
+
"items": {
|
50
|
+
"type": "string",
|
51
|
+
"minLength": 1,
|
52
|
+
"maxLength": 1024
|
53
|
+
}
|
54
|
+
},
|
55
|
+
"googlePubSubConfig": {
|
56
|
+
"type": "object",
|
57
|
+
"properties": {
|
58
|
+
"projectId": {
|
59
|
+
"type": "string",
|
60
|
+
"minLength": 1,
|
61
|
+
"maxLength": 1024
|
62
|
+
},
|
63
|
+
"keyJson": {
|
64
|
+
"type": "string",
|
65
|
+
"maxLength": 32767,
|
66
|
+
"minLength": 50
|
67
|
+
}
|
68
|
+
},
|
69
|
+
"additionalProperties": false,
|
70
|
+
"required": [
|
71
|
+
"projectId",
|
72
|
+
"keyJson"
|
73
|
+
]
|
74
|
+
},
|
75
|
+
"mqttConfig": {
|
76
|
+
"type": "object",
|
77
|
+
"properties": {
|
78
|
+
"clientId": {
|
79
|
+
"type": "string",
|
80
|
+
"maxLength": 1024,
|
81
|
+
"minLength": 1
|
82
|
+
},
|
83
|
+
"username": {
|
84
|
+
"type": "string",
|
85
|
+
"maxLength": 1024,
|
86
|
+
"minLength": 1
|
87
|
+
},
|
88
|
+
"password": {
|
89
|
+
"type": "string",
|
90
|
+
"maxLength": 1024,
|
91
|
+
"minLength": 1
|
92
|
+
},
|
93
|
+
"clean": {
|
94
|
+
"type": "boolean"
|
95
|
+
},
|
96
|
+
"port": {
|
97
|
+
"type": "number",
|
98
|
+
"minimum": 1,
|
99
|
+
"maximum": 65535
|
100
|
+
},
|
101
|
+
"protocol": {
|
102
|
+
"type": "string",
|
103
|
+
"enum": [
|
104
|
+
"mqtt",
|
105
|
+
"mqtts",
|
106
|
+
"ws",
|
107
|
+
"wss"
|
108
|
+
]
|
109
|
+
},
|
110
|
+
"host": {
|
111
|
+
"type": "string",
|
112
|
+
"maxLength": 1024,
|
113
|
+
"minLength": 1
|
114
|
+
},
|
115
|
+
"privateKey": {
|
116
|
+
"type": "string",
|
117
|
+
"maxLength": 32767,
|
118
|
+
"minLength": 50
|
119
|
+
},
|
120
|
+
"certificate": {
|
121
|
+
"type": "string",
|
122
|
+
"maxLength": 32767,
|
123
|
+
"minLength": 50
|
124
|
+
},
|
125
|
+
"caCertificate": {
|
126
|
+
"type": "string",
|
127
|
+
"maxLength": 32767,
|
128
|
+
"minLength": 50
|
129
|
+
}
|
130
|
+
},
|
131
|
+
"additionalProperties": false,
|
132
|
+
"required": [
|
133
|
+
"port",
|
134
|
+
"protocol",
|
135
|
+
"host"
|
136
|
+
]
|
137
|
+
},
|
138
|
+
"status": {
|
139
|
+
"lastKeepAlive": {
|
140
|
+
"type": [
|
141
|
+
"number"
|
142
|
+
]
|
143
|
+
},
|
144
|
+
"nextAttempt": {
|
145
|
+
"type": [
|
146
|
+
"number"
|
147
|
+
]
|
148
|
+
},
|
149
|
+
"connectInfo": {
|
150
|
+
"type": "object",
|
151
|
+
"properties": {
|
152
|
+
"ts": {
|
153
|
+
"type": [
|
154
|
+
"number",
|
155
|
+
"null"
|
156
|
+
]
|
157
|
+
}
|
158
|
+
}
|
159
|
+
},
|
160
|
+
"disconnectInfo": {
|
161
|
+
"type": "object",
|
162
|
+
"properties": {
|
163
|
+
"ts": {
|
164
|
+
"type": [
|
165
|
+
"number",
|
166
|
+
"null"
|
167
|
+
]
|
168
|
+
},
|
169
|
+
"error": {
|
170
|
+
"type": "string"
|
171
|
+
}
|
172
|
+
}
|
173
|
+
}
|
174
|
+
}
|
175
|
+
}
|
176
|
+
}
|
177
|
+
},
|
178
|
+
"count": {
|
179
|
+
"type": "integer"
|
180
|
+
},
|
181
|
+
"totalCount": {
|
182
|
+
"type": "integer"
|
183
|
+
},
|
184
|
+
"perPage": {
|
185
|
+
"type": "integer"
|
186
|
+
},
|
187
|
+
"page": {
|
188
|
+
"type": "integer"
|
189
|
+
},
|
190
|
+
"filter": {
|
191
|
+
"type": "string"
|
192
|
+
},
|
193
|
+
"filterField": {
|
194
|
+
"type": "string"
|
195
|
+
},
|
196
|
+
"sortField": {
|
197
|
+
"type": "string"
|
198
|
+
},
|
199
|
+
"sortDirection": {
|
200
|
+
"type": "string",
|
201
|
+
"enum": [
|
202
|
+
"asc",
|
203
|
+
"desc"
|
204
|
+
]
|
205
|
+
},
|
206
|
+
"applicationId": {
|
207
|
+
"type": "string",
|
208
|
+
"pattern": "^[A-Fa-f\\d]{24}$"
|
209
|
+
}
|
210
|
+
}
|
211
|
+
}
|
data/schemas/me.json
CHANGED
@@ -53,6 +53,10 @@
|
|
53
53
|
"type": "string",
|
54
54
|
"maxLength": 1024
|
55
55
|
},
|
56
|
+
"tokenCutoff": {
|
57
|
+
"type": "string",
|
58
|
+
"format": "date-time"
|
59
|
+
},
|
56
60
|
"emailVerified": {
|
57
61
|
"type": "boolean"
|
58
62
|
},
|
@@ -103,6 +107,9 @@
|
|
103
107
|
"flow": {
|
104
108
|
"type": "number"
|
105
109
|
},
|
110
|
+
"integration": {
|
111
|
+
"type": "number"
|
112
|
+
},
|
106
113
|
"webhook": {
|
107
114
|
"type": "number"
|
108
115
|
},
|
@@ -355,9 +362,20 @@
|
|
355
362
|
"type": "number"
|
356
363
|
}
|
357
364
|
}
|
365
|
+
},
|
366
|
+
"integration": {
|
367
|
+
"type": "object",
|
368
|
+
"patternProperties": {
|
369
|
+
".*": {
|
370
|
+
"type": "number"
|
371
|
+
}
|
372
|
+
}
|
358
373
|
}
|
359
374
|
}
|
360
375
|
},
|
376
|
+
"integrationCount": {
|
377
|
+
"type": "number"
|
378
|
+
},
|
361
379
|
"webhookCount": {
|
362
380
|
"type": "number"
|
363
381
|
}
|