losant_rest 1.0.8 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -0
  3. data/.travis.yml +3 -2
  4. data/README.md +19 -8
  5. data/docs/_schemas.md +210 -184
  6. data/docs/application.md +20 -0
  7. data/docs/applicationApiToken.md +130 -0
  8. data/docs/applicationApiTokens.md +83 -0
  9. data/docs/applicationKey.md +15 -0
  10. data/docs/applicationKeys.md +10 -0
  11. data/docs/applications.md +10 -0
  12. data/docs/auditLog.md +5 -0
  13. data/docs/auditLogs.md +5 -0
  14. data/docs/auth.md +20 -8
  15. data/docs/dashboard.md +13 -0
  16. data/docs/dashboards.md +10 -0
  17. data/docs/data.md +10 -0
  18. data/docs/device.md +55 -0
  19. data/docs/deviceRecipe.md +20 -0
  20. data/docs/deviceRecipes.md +10 -0
  21. data/docs/devices.md +20 -0
  22. data/docs/event.md +15 -0
  23. data/docs/events.md +20 -0
  24. data/docs/flow.md +35 -0
  25. data/docs/flows.md +10 -0
  26. data/docs/me.md +61 -0
  27. data/docs/org.md +51 -0
  28. data/docs/orgInvites.md +6 -0
  29. data/docs/orgs.md +11 -0
  30. data/docs/solution.md +15 -0
  31. data/docs/solutionUser.md +15 -0
  32. data/docs/solutionUsers.md +10 -0
  33. data/docs/solutions.md +10 -0
  34. data/docs/webhook.md +15 -0
  35. data/docs/webhooks.md +10 -0
  36. data/lib/losant_rest.rb +2 -2
  37. data/lib/losant_rest/application.rb +24 -0
  38. data/lib/losant_rest/{access_token.rb → application_api_token.rb} +47 -23
  39. data/lib/losant_rest/{access_tokens.rb → application_api_tokens.rb} +27 -11
  40. data/lib/losant_rest/application_key.rb +18 -0
  41. data/lib/losant_rest/application_keys.rb +12 -0
  42. data/lib/losant_rest/applications.rb +12 -0
  43. data/lib/losant_rest/audit_log.rb +6 -0
  44. data/lib/losant_rest/audit_logs.rb +6 -0
  45. data/lib/losant_rest/auth.rb +20 -8
  46. data/lib/losant_rest/client.rb +8 -8
  47. data/lib/losant_rest/dashboard.rb +15 -0
  48. data/lib/losant_rest/dashboards.rb +12 -0
  49. data/lib/losant_rest/data.rb +12 -0
  50. data/lib/losant_rest/device.rb +66 -0
  51. data/lib/losant_rest/device_recipe.rb +24 -0
  52. data/lib/losant_rest/device_recipes.rb +12 -0
  53. data/lib/losant_rest/devices.rb +24 -0
  54. data/lib/losant_rest/event.rb +18 -0
  55. data/lib/losant_rest/events.rb +24 -0
  56. data/lib/losant_rest/flow.rb +42 -0
  57. data/lib/losant_rest/flows.rb +12 -0
  58. data/lib/losant_rest/me.rb +74 -0
  59. data/lib/losant_rest/org.rb +62 -0
  60. data/lib/losant_rest/org_invites.rb +6 -0
  61. data/lib/losant_rest/orgs.rb +14 -0
  62. data/lib/losant_rest/solution.rb +18 -0
  63. data/lib/losant_rest/solution_user.rb +18 -0
  64. data/lib/losant_rest/solution_users.rb +12 -0
  65. data/lib/losant_rest/solutions.rb +12 -0
  66. data/lib/losant_rest/version.rb +1 -1
  67. data/lib/losant_rest/webhook.rb +18 -0
  68. data/lib/losant_rest/webhooks.rb +12 -0
  69. data/losant_rest.gemspec +3 -3
  70. data/schemas/{accessToken.json → apiToken.json} +31 -3
  71. data/schemas/{accessTokenPatch.json → apiTokenPatch.json} +4 -0
  72. data/schemas/applicationApiTokenPost.json +116 -0
  73. data/schemas/auditLog.json +3 -1
  74. data/schemas/auditLogFilter.json +3 -1
  75. data/schemas/auditLogs.json +3 -1
  76. data/schemas/event.json +4 -2
  77. data/schemas/events.json +4 -2
  78. metadata +17 -19
  79. data/.rbenv-version +0 -1
  80. data/docs/accessToken.md +0 -107
  81. data/docs/accessTokens.md +0 -68
  82. data/schemas/accessTokenPost.json +0 -32
  83. data/schemas/accessTokens.json +0 -65
  84. data/schemas/deviceState.json +0 -31
@@ -21,6 +21,11 @@ result = client.flows.get(applicationId: my_application_id)
21
21
  puts result
22
22
  ```
23
23
 
24
+ #### Authentication
25
+ The client must be configured with a valid api access token to call this
26
+ action. The token must include at least one of the following scopes:
27
+ all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, flows.*, or flows.get.
28
+
24
29
  #### Available Parameters
25
30
 
26
31
  | Name | Type | Required | Description | Default | Example |
@@ -60,6 +65,11 @@ result = client.flows.post(
60
65
  puts result
61
66
  ```
62
67
 
68
+ #### Authentication
69
+ The client must be configured with a valid api access token to call this
70
+ action. The token must include at least one of the following scopes:
71
+ all.Application, all.Organization, all.User, flows.*, or flows.create.
72
+
63
73
  #### Available Parameters
64
74
 
65
75
  | Name | Type | Required | Description | Default | Example |
data/docs/me.md CHANGED
@@ -31,6 +31,11 @@ result = client.me.add_recent_item(data: my_data)
31
31
  puts result
32
32
  ```
33
33
 
34
+ #### Authentication
35
+ The client must be configured with a valid api access token to call this
36
+ action. The token must include at least one of the following scopes:
37
+ all.SolutionUser, all.User, me.*, or me.addRecentItem.
38
+
34
39
  #### Available Parameters
35
40
 
36
41
  | Name | Type | Required | Description | Default | Example |
@@ -61,6 +66,11 @@ result = client.me.delete(credentials: my_credentials)
61
66
  puts result
62
67
  ```
63
68
 
69
+ #### Authentication
70
+ The client must be configured with a valid api access token to call this
71
+ action. The token must include at least one of the following scopes:
72
+ all.SolutionUser, all.User, me.*, or me.delete.
73
+
64
74
  #### Available Parameters
65
75
 
66
76
  | Name | Type | Required | Description | Default | Example |
@@ -91,6 +101,11 @@ result = client.me.disable_two_factor_auth(data: my_data)
91
101
  puts result
92
102
  ```
93
103
 
104
+ #### Authentication
105
+ The client must be configured with a valid api access token to call this
106
+ action. The token must include at least one of the following scopes:
107
+ all.SolutionUser, all.User, me.*, or me.disableTwoFactorAuth.
108
+
94
109
  #### Available Parameters
95
110
 
96
111
  | Name | Type | Required | Description | Default | Example |
@@ -121,6 +136,11 @@ result = client.me.disconnect_github(optional_params)
121
136
  puts result
122
137
  ```
123
138
 
139
+ #### Authentication
140
+ The client must be configured with a valid api access token to call this
141
+ action. The token must include at least one of the following scopes:
142
+ all.SolutionUser, all.User, me.*, or me.disconnectGithub.
143
+
124
144
  #### Available Parameters
125
145
 
126
146
  No parameters needed for this call.
@@ -149,6 +169,11 @@ result = client.me.disconnect_twitter(optional_params)
149
169
  puts result
150
170
  ```
151
171
 
172
+ #### Authentication
173
+ The client must be configured with a valid api access token to call this
174
+ action. The token must include at least one of the following scopes:
175
+ all.SolutionUser, all.User, me.*, or me.disconnectTwitter.
176
+
152
177
  #### Available Parameters
153
178
 
154
179
  No parameters needed for this call.
@@ -177,6 +202,11 @@ result = client.me.enable_two_factor_auth(data: my_data)
177
202
  puts result
178
203
  ```
179
204
 
205
+ #### Authentication
206
+ The client must be configured with a valid api access token to call this
207
+ action. The token must include at least one of the following scopes:
208
+ all.SolutionUser, all.User, me.*, or me.enableTwoFactorAuth.
209
+
180
210
  #### Available Parameters
181
211
 
182
212
  | Name | Type | Required | Description | Default | Example |
@@ -207,6 +237,11 @@ result = client.me.fetch_recent_items(itemType: my_item_type)
207
237
  puts result
208
238
  ```
209
239
 
240
+ #### Authentication
241
+ The client must be configured with a valid api access token to call this
242
+ action. The token must include at least one of the following scopes:
243
+ all.SolutionUser, all.SolutionUser.read, all.User, all.User.read, me.*, or me.fetchRecentItems.
244
+
210
245
  #### Available Parameters
211
246
 
212
247
  | Name | Type | Required | Description | Default | Example |
@@ -238,11 +273,17 @@ result = client.me.get(optional_params)
238
273
  puts result
239
274
  ```
240
275
 
276
+ #### Authentication
277
+ The client must be configured with a valid api access token to call this
278
+ action. The token must include at least one of the following scopes:
279
+ all.SolutionUser, all.SolutionUser.read, all.User, all.User.read, me.*, or me.get.
280
+
241
281
  #### Available Parameters
242
282
 
243
283
  | Name | Type | Required | Description | Default | Example |
244
284
  | ---- | ---- | -------- | ----------- | ------- | ------- |
245
285
  | includeRecent | undefined | N | Should the user include recent app/dashboard info | | true |
286
+ | summaryExclude | string | N | List of summary fields to exclude from user summary | | payloadCount |
246
287
 
247
288
  #### Successful Responses
248
289
 
@@ -267,6 +308,11 @@ result = client.me.patch(user: my_user)
267
308
  puts result
268
309
  ```
269
310
 
311
+ #### Authentication
312
+ The client must be configured with a valid api access token to call this
313
+ action. The token must include at least one of the following scopes:
314
+ all.SolutionUser, all.User, me.*, or me.patch.
315
+
270
316
  #### Available Parameters
271
317
 
272
318
  | Name | Type | Required | Description | Default | Example |
@@ -297,6 +343,11 @@ result = client.me.payload_counts(optional_params)
297
343
  puts result
298
344
  ```
299
345
 
346
+ #### Authentication
347
+ The client must be configured with a valid api access token to call this
348
+ action. The token must include at least one of the following scopes:
349
+ all.SolutionUser, all.User, all.User.read, me.*, or me.payloadCounts.
350
+
300
351
  #### Available Parameters
301
352
 
302
353
  | Name | Type | Required | Description | Default | Example |
@@ -328,6 +379,11 @@ result = client.me.transfer_resources(transfer: my_transfer)
328
379
  puts result
329
380
  ```
330
381
 
382
+ #### Authentication
383
+ The client must be configured with a valid api access token to call this
384
+ action. The token must include at least one of the following scopes:
385
+ all.SolutionUser, all.User, me.*, or me.transferResources.
386
+
331
387
  #### Available Parameters
332
388
 
333
389
  | Name | Type | Required | Description | Default | Example |
@@ -358,6 +414,11 @@ result = client.me.verify_email(optional_params)
358
414
  puts result
359
415
  ```
360
416
 
417
+ #### Authentication
418
+ The client must be configured with a valid api access token to call this
419
+ action. The token must include at least one of the following scopes:
420
+ all.SolutionUser, all.User, me.*, or me.verifyEmail.
421
+
361
422
  #### Available Parameters
362
423
 
363
424
  No parameters needed for this call.
@@ -29,6 +29,11 @@ result = client.org.delete(orgId: my_org_id)
29
29
  puts result
30
30
  ```
31
31
 
32
+ #### Authentication
33
+ The client must be configured with a valid api access token to call this
34
+ action. The token must include at least one of the following scopes:
35
+ all.Organization, all.User, org.*, or org.delete.
36
+
32
37
  #### Available Parameters
33
38
 
34
39
  | Name | Type | Required | Description | Default | Example |
@@ -60,11 +65,17 @@ result = client.org.get(orgId: my_org_id)
60
65
  puts result
61
66
  ```
62
67
 
68
+ #### Authentication
69
+ The client must be configured with a valid api access token to call this
70
+ action. The token must include at least one of the following scopes:
71
+ all.Organization, all.Organization.read, all.User, all.User.read, org.*, or org.get.
72
+
63
73
  #### Available Parameters
64
74
 
65
75
  | Name | Type | Required | Description | Default | Example |
66
76
  | ---- | ---- | -------- | ----------- | ------- | ------- |
67
77
  | orgId | string | Y | ID associated with the organization | | 575ed6e87ae143cd83dc4aa8 |
78
+ | summaryExclude | string | N | List of summary fields to exclude from org summary | | payloadCount |
68
79
 
69
80
  #### Successful Responses
70
81
 
@@ -93,6 +104,11 @@ result = client.org.invite_member(
93
104
  puts result
94
105
  ```
95
106
 
107
+ #### Authentication
108
+ The client must be configured with a valid api access token to call this
109
+ action. The token must include at least one of the following scopes:
110
+ all.Organization, all.User, org.*, or org.inviteMember.
111
+
96
112
  #### Available Parameters
97
113
 
98
114
  | Name | Type | Required | Description | Default | Example |
@@ -127,6 +143,11 @@ result = client.org.modify_member(
127
143
  puts result
128
144
  ```
129
145
 
146
+ #### Authentication
147
+ The client must be configured with a valid api access token to call this
148
+ action. The token must include at least one of the following scopes:
149
+ all.Organization, all.User, org.*, or org.modifyMember.
150
+
130
151
  #### Available Parameters
131
152
 
132
153
  | Name | Type | Required | Description | Default | Example |
@@ -161,6 +182,11 @@ result = client.org.patch(
161
182
  puts result
162
183
  ```
163
184
 
185
+ #### Authentication
186
+ The client must be configured with a valid api access token to call this
187
+ action. The token must include at least one of the following scopes:
188
+ all.Organization, all.User, org.*, or org.patch.
189
+
164
190
  #### Available Parameters
165
191
 
166
192
  | Name | Type | Required | Description | Default | Example |
@@ -193,6 +219,11 @@ result = client.org.payload_counts(orgId: my_org_id)
193
219
  puts result
194
220
  ```
195
221
 
222
+ #### Authentication
223
+ The client must be configured with a valid api access token to call this
224
+ action. The token must include at least one of the following scopes:
225
+ all.Organization, all.Organization.read, all.User, all.User.read, org.*, or org.payloadCounts.
226
+
196
227
  #### Available Parameters
197
228
 
198
229
  | Name | Type | Required | Description | Default | Example |
@@ -226,6 +257,11 @@ result = client.org.pending_invites(orgId: my_org_id)
226
257
  puts result
227
258
  ```
228
259
 
260
+ #### Authentication
261
+ The client must be configured with a valid api access token to call this
262
+ action. The token must include at least one of the following scopes:
263
+ all.Organization, all.Organization.read, all.User, all.User.read, org.*, or org.pendingInvites.
264
+
229
265
  #### Available Parameters
230
266
 
231
267
  | Name | Type | Required | Description | Default | Example |
@@ -259,6 +295,11 @@ result = client.org.remove_member(
259
295
  puts result
260
296
  ```
261
297
 
298
+ #### Authentication
299
+ The client must be configured with a valid api access token to call this
300
+ action. The token must include at least one of the following scopes:
301
+ all.Organization, all.User, org.*, or org.removeMember.
302
+
262
303
  #### Available Parameters
263
304
 
264
305
  | Name | Type | Required | Description | Default | Example |
@@ -293,6 +334,11 @@ result = client.org.revoke_invite(
293
334
  puts result
294
335
  ```
295
336
 
337
+ #### Authentication
338
+ The client must be configured with a valid api access token to call this
339
+ action. The token must include at least one of the following scopes:
340
+ all.Organization, all.User, org.*, or org.revokeInvite.
341
+
296
342
  #### Available Parameters
297
343
 
298
344
  | Name | Type | Required | Description | Default | Example |
@@ -327,6 +373,11 @@ result = client.org.transfer_resources(
327
373
  puts result
328
374
  ```
329
375
 
376
+ #### Authentication
377
+ The client must be configured with a valid api access token to call this
378
+ action. The token must include at least one of the following scopes:
379
+ all.Organization, all.User, org.*, or org.transferResources.
380
+
330
381
  #### Available Parameters
331
382
 
332
383
  | Name | Type | Required | Description | Default | Example |
@@ -23,6 +23,9 @@ result = client.org_invites.get(
23
23
  puts result
24
24
  ```
25
25
 
26
+ #### Authentication
27
+ No api access token is required to call this action.
28
+
26
29
  #### Available Parameters
27
30
 
28
31
  | Name | Type | Required | Description | Default | Example |
@@ -56,6 +59,9 @@ result = client.org_invites.post(invite: my_invite)
56
59
  puts result
57
60
  ```
58
61
 
62
+ #### Authentication
63
+ No api access token is required to call this action.
64
+
59
65
  #### Available Parameters
60
66
 
61
67
  | Name | Type | Required | Description | Default | Example |
@@ -21,6 +21,11 @@ result = client.orgs.get(optional_params)
21
21
  puts result
22
22
  ```
23
23
 
24
+ #### Authentication
25
+ The client must be configured with a valid api access token to call this
26
+ action. The token must include at least one of the following scopes:
27
+ all.User, all.User.read, orgs.*, or orgs.get.
28
+
24
29
  #### Available Parameters
25
30
 
26
31
  | Name | Type | Required | Description | Default | Example |
@@ -31,6 +36,7 @@ puts result
31
36
  | perPage | string | N | How many items to return per page | 1000 | 10 |
32
37
  | filterField | string | N | Field to filter the results by. Blank or not provided means no filtering. Accepted values are: name | | name |
33
38
  | filter | string | N | Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering. | | my*org |
39
+ | summaryExclude | string | N | List of summary fields to exclude from org summaries | | payloadCount |
34
40
 
35
41
  #### Successful Responses
36
42
 
@@ -56,6 +62,11 @@ result = client.orgs.post(organization: my_organization)
56
62
  puts result
57
63
  ```
58
64
 
65
+ #### Authentication
66
+ The client must be configured with a valid api access token to call this
67
+ action. The token must include at least one of the following scopes:
68
+ all.User, orgs.*, or orgs.post.
69
+
59
70
  #### Available Parameters
60
71
 
61
72
  | Name | Type | Required | Description | Default | Example |
@@ -24,6 +24,11 @@ result = client.solution.delete(
24
24
  puts result
25
25
  ```
26
26
 
27
+ #### Authentication
28
+ The client must be configured with a valid api access token to call this
29
+ action. The token must include at least one of the following scopes:
30
+ all.Organization, all.User, solution.*, or solution.delete.
31
+
27
32
  #### Available Parameters
28
33
 
29
34
  | Name | Type | Required | Description | Default | Example |
@@ -58,6 +63,11 @@ result = client.solution.get(
58
63
  puts result
59
64
  ```
60
65
 
66
+ #### Authentication
67
+ The client must be configured with a valid api access token to call this
68
+ action. The token must include at least one of the following scopes:
69
+ all.Organization, all.Organization.read, all.User, all.User.read, solution.*, or solution.get.
70
+
61
71
  #### Available Parameters
62
72
 
63
73
  | Name | Type | Required | Description | Default | Example |
@@ -93,6 +103,11 @@ result = client.solution.patch(
93
103
  puts result
94
104
  ```
95
105
 
106
+ #### Authentication
107
+ The client must be configured with a valid api access token to call this
108
+ action. The token must include at least one of the following scopes:
109
+ all.Organization, all.User, solution.*, or solution.patch.
110
+
96
111
  #### Available Parameters
97
112
 
98
113
  | Name | Type | Required | Description | Default | Example |
@@ -25,6 +25,11 @@ result = client.solution_user.delete(
25
25
  puts result
26
26
  ```
27
27
 
28
+ #### Authentication
29
+ The client must be configured with a valid api access token to call this
30
+ action. The token must include at least one of the following scopes:
31
+ all.Organization, all.User, solutionUser.*, or solutionUser.delete.
32
+
28
33
  #### Available Parameters
29
34
 
30
35
  | Name | Type | Required | Description | Default | Example |
@@ -61,6 +66,11 @@ result = client.solution_user.get(
61
66
  puts result
62
67
  ```
63
68
 
69
+ #### Authentication
70
+ The client must be configured with a valid api access token to call this
71
+ action. The token must include at least one of the following scopes:
72
+ all.Organization, all.Organization.read, all.User, all.User.read, solutionUser.*, or solutionUser.get.
73
+
64
74
  #### Available Parameters
65
75
 
66
76
  | Name | Type | Required | Description | Default | Example |
@@ -98,6 +108,11 @@ result = client.solution_user.patch(
98
108
  puts result
99
109
  ```
100
110
 
111
+ #### Authentication
112
+ The client must be configured with a valid api access token to call this
113
+ action. The token must include at least one of the following scopes:
114
+ all.Organization, all.User, solutionUser.*, or solutionUser.patch.
115
+
101
116
  #### Available Parameters
102
117
 
103
118
  | Name | Type | Required | Description | Default | Example |
@@ -23,6 +23,11 @@ result = client.solution_users.get(
23
23
  puts result
24
24
  ```
25
25
 
26
+ #### Authentication
27
+ The client must be configured with a valid api access token to call this
28
+ action. The token must include at least one of the following scopes:
29
+ all.Organization, all.Organization.read, all.User, all.User.read, solutionUsers.*, or solutionUsers.get.
30
+
26
31
  #### Available Parameters
27
32
 
28
33
  | Name | Type | Required | Description | Default | Example |
@@ -63,6 +68,11 @@ result = client.solution_users.post(
63
68
  puts result
64
69
  ```
65
70
 
71
+ #### Authentication
72
+ The client must be configured with a valid api access token to call this
73
+ action. The token must include at least one of the following scopes:
74
+ all.Organization, all.User, solutionUsers.*, or solutionUsers.post.
75
+
66
76
  #### Available Parameters
67
77
 
68
78
  | Name | Type | Required | Description | Default | Example |
@@ -21,6 +21,11 @@ result = client.solutions.get(orgId: my_org_id)
21
21
  puts result
22
22
  ```
23
23
 
24
+ #### Authentication
25
+ The client must be configured with a valid api access token to call this
26
+ action. The token must include at least one of the following scopes:
27
+ all.Organization, all.Organization.read, all.User, all.User.read, solutions.*, or solutions.get.
28
+
24
29
  #### Available Parameters
25
30
 
26
31
  | Name | Type | Required | Description | Default | Example |
@@ -59,6 +64,11 @@ result = client.solutions.post(
59
64
  puts result
60
65
  ```
61
66
 
67
+ #### Authentication
68
+ The client must be configured with a valid api access token to call this
69
+ action. The token must include at least one of the following scopes:
70
+ all.Organization, all.User, solutions.*, or solutions.post.
71
+
62
72
  #### Available Parameters
63
73
 
64
74
  | Name | Type | Required | Description | Default | Example |