losant_rest 1.20.1 → 1.21.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +140 -14
  3. data/docs/_schemas.md +3150 -646
  4. data/docs/application.md +1 -0
  5. data/docs/devices.md +45 -2
  6. data/docs/instance.md +41 -0
  7. data/docs/instanceNotificationRule.md +219 -0
  8. data/docs/instanceNotificationRules.md +91 -0
  9. data/docs/instanceOrg.md +49 -5
  10. data/docs/instanceSandbox.md +179 -3
  11. data/docs/me.md +1 -0
  12. data/docs/org.md +1 -0
  13. data/lib/platform_rest/application.rb +2 -0
  14. data/lib/platform_rest/client.rb +10 -2
  15. data/lib/platform_rest/devices.rb +52 -2
  16. data/lib/platform_rest/instance.rb +50 -0
  17. data/lib/platform_rest/instance_notification_rule.rb +275 -0
  18. data/lib/platform_rest/instance_notification_rules.rb +136 -0
  19. data/lib/platform_rest/instance_org.rb +57 -5
  20. data/lib/platform_rest/instance_sandbox.rb +211 -3
  21. data/lib/platform_rest/me.rb +2 -0
  22. data/lib/platform_rest/org.rb +2 -0
  23. data/lib/platform_rest/version.rb +1 -1
  24. data/lib/platform_rest.rb +2 -0
  25. data/schemas/advancedDeviceQuery.json +103 -0
  26. data/schemas/apiTokenPost.json +16 -0
  27. data/schemas/applicationSearchResult.json +46 -6
  28. data/schemas/bulkRestoreResponse.json +12 -0
  29. data/schemas/credentialLinkedResources.json +12 -0
  30. data/schemas/dataExport.json +103 -0
  31. data/schemas/device.json +4 -0
  32. data/schemas/devices.json +4 -0
  33. data/schemas/devicesDeleteOrRestorePost.json +2061 -0
  34. data/schemas/devicesExportPayloadCountPost.json +103 -0
  35. data/schemas/devicesExportPost.json +103 -0
  36. data/schemas/devicesPatch.json +103 -0
  37. data/schemas/devicesRemoveDataPost.json +103 -0
  38. data/schemas/experienceEndpoint.json +6 -1
  39. data/schemas/experienceEndpointPatch.json +6 -1
  40. data/schemas/experienceEndpointPost.json +6 -1
  41. data/schemas/experienceEndpoints.json +6 -1
  42. data/schemas/experienceLinkedResources.json +18 -1
  43. data/schemas/flow.json +4 -0
  44. data/schemas/flowPatch.json +4 -0
  45. data/schemas/flowPost.json +4 -0
  46. data/schemas/flowVersion.json +8 -0
  47. data/schemas/flowVersionPost.json +4 -0
  48. data/schemas/flowVersions.json +8 -0
  49. data/schemas/flows.json +4 -0
  50. data/schemas/flowsImportPost.json +8 -0
  51. data/schemas/flowsImportResult.json +12 -0
  52. data/schemas/githubLogin.json +16 -0
  53. data/schemas/instance.json +9 -0
  54. data/schemas/instanceAuditLog.json +2 -1
  55. data/schemas/instanceAuditLogFilter.json +2 -1
  56. data/schemas/instanceOrg.json +4 -0
  57. data/schemas/instanceOrgs.json +4 -0
  58. data/schemas/instances.json +9 -0
  59. data/schemas/lastValueQuery.json +103 -0
  60. data/schemas/multiDeviceCommand.json +103 -0
  61. data/schemas/notificationRule.json +161 -0
  62. data/schemas/notificationRuleDeliveryLogs.json +123 -0
  63. data/schemas/notificationRuleEvaluationOptions.json +10 -0
  64. data/schemas/notificationRulePatch.json +128 -0
  65. data/schemas/notificationRulePost.json +140 -0
  66. data/schemas/notificationRules.json +212 -0
  67. data/schemas/samlResponse.json +16 -0
  68. data/schemas/timeSeriesQuery.json +103 -0
  69. data/schemas/userCredentials.json +16 -0
  70. data/schemas/userPost.json +16 -0
  71. metadata +14 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d96f494f71f5645810bbebf4040de441d9067930582a5ec80fe5a52c1c3dfa68
4
- data.tar.gz: 5c19f8747cc0dbcca7c3ce529815325fa80b690e25629e6ecd00c17d9462b9f2
3
+ metadata.gz: 4f41f3c00fb97dfa7f72f19f049104823c454a8f78226108b6b352d2fa5a605b
4
+ data.tar.gz: 85731f870544b1763845a867e2f7963ca234dfce7d7fc624e72a36ca16ee2d4c
5
5
  SHA512:
6
- metadata.gz: 1d216781e43e33642741aeeede6274e107c9679568c9b88b54ce9ee0624006cc6dfd99c0724d955432cdf4e526720088b7193cf1171ed21e0c0cc3a521076bb0
7
- data.tar.gz: 9f0b67e900f73ed4f25c39f4b072529aea73670319b37c457150447e905e19fcd8958480730ec7b744d63265d6b622ed0fc3b81d4671b4e6df2ddfe1b98f9011
6
+ metadata.gz: f97e1b47c3da23ebc2c60f910162cf82831bbf0b7e61f1d6b431768b9499e19296908d98dd02d471145a3e98523af2d13b5396bbd0550b5a8e1887342bcd478c
7
+ data.tar.gz: b7c69800da6e0cc7b93e8af8f46aab1b2180b26218cbd6513ce76b015f1e9bff64a821f75d7b3143f105cf0cbf9330ed103830d7c51a36d94822c291883670d2
data/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Losant Ruby REST API Client
2
2
 
3
- ![Build Status](https://github.com/Losant/losant-rest-js/actions/workflows/test.yml/badge.svg?branch=master) [![Gem Version](https://badge.fury.io/rb/losant_rest.svg)](https://badge.fury.io/rb/losant_rest)
3
+ ![Build Status](https://github.com/Losant/losant-rest-ruby/actions/workflows/test.yml/badge.svg?branch=master) [![Gem Version](https://badge.fury.io/rb/losant_rest.svg)](https://badge.fury.io/rb/losant_rest)
4
4
 
5
5
  The [Losant](https://www.losant.com) REST API client provides a simple way to use the comprehensive Losant API. You can authenticate either as a Losant device or with your user account, and have access to all the functionality of the Losant platform.
6
6
 
7
- This client works with Ruby 2.1 and higher. It uses [HTTParty](https://github.com/jnunemaker/httparty) under the covers for the actual HTTP communication.
7
+ This client works with Ruby 2.3 and higher. It uses [HTTParty](https://github.com/jnunemaker/httparty) under the covers for the actual HTTP communication.
8
8
 
9
9
  <br/>
10
10
 
@@ -86,24 +86,60 @@ Each of the following is a method on the client object, and returns a wrapper fo
86
86
  * [application](docs/application.md)
87
87
  Contains all of the actions that can be performed against a single [Application](https://docs.losant.com/applications/overview/), which include things like getting info on an application or modifying an application.
88
88
 
89
- * [applications](docs/applications.md)
90
- Contains all of the actions that can be performed against the set of [Applications](https://docs.losant.com/applications/overview/) that the currently authenticated user has access to - such as listing the applications or creating a new application.
91
-
92
89
  * [application_api_token](docs/applicationApiToken.md)
93
90
  Contains all the actions that can be performed against a single [Api Token](https://docs.losant.com/applications/application-tokens/) belonging to an application - for instance, getting info on a single token or revoking a token.
94
91
 
95
92
  * [application_api_tokens](docs/applicationApiTokens.md)
96
93
  Contains all of the actions that can be performed against the collection of [Api Tokens](https://docs.losant.com/applications/application-tokens/) belonging to an Application - such as listing all tokens or creating a new token.
97
94
 
95
+ * [application_certificate](docs/applicationCertificate.md)
96
+ Contains all the actions that can be performed against a single Application Certificate belonging to an application - for instance, getting info on a single certificate or disabling a certificate.
97
+
98
+ * [application_certificate_authorities](docs/applicationCertificateAuthorities.md)
99
+ Contains all the actions that can be performed against a single Application Certificate Authority belonging to an application - for instance, getting info on an authority or disabling an authority.
100
+
101
+ * [application_certificate_authority](docs/applicationCertificateAuthority.md)
102
+ Contains all of the actions that can be performed against the collection of Application Certificate Authorities belonging to an Application - such as listing all authorities or creating a new authority.
103
+
104
+ * [application_certificates](docs/applicationCertificates.md)
105
+ Contains all of the actions that can be performed against the collection of Application Certificates belonging to an Application - such as listing all certificates or creating a new certificate.
106
+
107
+ * [application_cashboard](docs/applicationDashboard.md)
108
+ Contains all the actions that can be performed against a single [Application Dashboard](https://docs.losant.com/dashboards/overview/) - for instance, things like getting info on a dashboard or modifying a dashboard.
109
+
110
+ * [application_dashboards](docs/applicationDashboards.md)
111
+ Contains all of the actions that can be performed against the collection of [Application Dashboards](https://docs.losant.com/dashboards/overview/) belonging to an Application - such as listing all dashboards or creating a new dashboard.
112
+
98
113
  * [application_key](docs/applicationKey.md)
99
114
  Contains all the actions that can be performed against a single [Application Key](https://docs.losant.com/applications/access-keys/) - for instance, getting info on a single key or revoking a key.
100
115
 
101
116
  * [application_keys](docs/applicationKeys.md)
102
117
  Contains all of the actions that can be performed against the collection of [Application Keys](https://docs.losant.com/applications/access-keys/) belonging to an Application - such as listing all keys or creating a new key.
103
118
 
119
+ * [applications](docs/applications.md)
120
+ Contains all of the actions that can be performed against the set of [Applications](https://docs.losant.com/applications/overview/) that the currently authenticated user has access to - such as listing the applications or creating a new application.
121
+
122
+ * [application_template](docs/applicationTemplate.md)
123
+ Contains all the actions that can be performed against a single [Application Template](https://docs.losant.com/templates/overview/) - for instance, getting info on a single template.
124
+
125
+ * [application_templates](docs/applicationTemplates.md)
126
+ Contains all of the actions that can be performed against the collection of [Application Templates](https://docs.losant.com/templates/overview/) - such as listing all templates or categories.
127
+
128
+ * [audit_log](docs/auditLog.md)
129
+ Contains all of the actions that can be performed against a single [Audit Log](https://docs.losant.com/organizations/audit-logs/) that belongs to an organization - such as viewing a log.
130
+
131
+ * [audit_logs](docs/auditLogs.md)
132
+ Contains all of the actions that can be performed against the set of [Audit Logs](https://docs.losant.com/organizations/audit-logs/) that belong to an organization - such as listing the logs.
133
+
104
134
  * [auth](docs/auth.md)
105
135
  Contains the actions used for authenticating against the api, either as a user or as a device. The result of authentication calls contain the auth_token needed for authenticated calls - see the examples for more details.
106
136
 
137
+ * [credential](docs/credential.md)
138
+ Contains all the actions that can be performed against a single [Service Credential](https://docs.losant.com/applications/credentials/), such as updating a credential or removing a credential.
139
+
140
+ * [credentials](docs/credentials.md)
141
+ Contains all of the actions that can be performed against the set of [Service Credentials](https://docs.losant.com/applications/credentials/) that the currently authenticated user has access to - such as listing the credentials or creating a new credential.
142
+
107
143
  * [dashboard](docs/dashboard.md)
108
144
  Contains all of the actions that can be performed against a single [Dashboard](https://docs.losant.com/dashboards/overview/), which include things like getting info on a dashboard or modifying a dashboard.
109
145
 
@@ -116,29 +152,38 @@ Each of the following is a method on the client object, and returns a wrapper fo
116
152
  * [data_table](docs/dataTable.md)
117
153
  Contains all the actions that can be performed against a single [Data Table](https://docs.losant.com/data-tables/overview/) - for instance, getting info on a single data table or modifying the columns of a data table.
118
154
 
119
- * [data_tables](docs/dataTables.md)
120
- Contains all of the actions that can be performed against the collection of [Data Tables](https://docs.losant.com/data-tables/overview/) belonging to an Application - such as listing all data tables or creating a new data table.
121
-
122
155
  * [data_table_row](docs/dataTableRow.md)
123
156
  Contains all the actions that can be performed against a single row inside of a [Data Table](https://docs.losant.com/data-tables/overview/) - for instance, getting the contents of a row, or modifying a row.
124
157
 
125
158
  * [data_table_rows](docs/dataTableRows.md)
126
159
  Contains all of the actions that can be performed against the collection of rows that make up a [Data Table](https://docs.losant.com/data-tables/overview/) - such as querying for rows in that table, or adding a new row to the table.
127
160
 
161
+ * [data_tables](docs/dataTables.md)
162
+ Contains all of the actions that can be performed against the collection of [Data Tables](https://docs.losant.com/data-tables/overview/) belonging to an Application - such as listing all data tables or creating a new data table.
163
+
128
164
  * [device](docs/device.md)
129
165
  Contains all the actions that can be performed against a single [Device](https://docs.losant.com/devices/overview/) - for instance, getting info on a single device or reporting the current state of a device.
130
166
 
131
- * [devices](docs/devices.md)
132
- Contains all of the actions that can be performed against the collection of [Devices](https://docs.losant.com/devices/overview/) belonging to an Application - such as listing all devices or sending a command to a set of devices.
133
-
134
167
  * [device_recipe](docs/deviceRecipe.md)
135
168
  Contains all the actions that can be performed against a single [Device Recipe](https://docs.losant.com/devices/device-recipes/), which include things like removing a device recipe or creating a device from a device recipe.
136
169
 
137
170
  * [device_recipes](docs/deviceRecipes.md)
138
171
  Contains all the actions that can be performed against the collection of [Device Recipes](https://docs.losant.com/devices/device-recipes/) belonging to an Application - such as listing recipes or creating a new recipe.
139
172
 
173
+ * [devices](docs/devices.md)
174
+ Contains all of the actions that can be performed against the collection of [Devices](https://docs.losant.com/devices/overview/) belonging to an Application - such as listing all devices or sending a command to a set of devices.
175
+
176
+ * [edge_deployment](docs/edgeDeployment.md)
177
+ Contains all the actions that can be performed against a single [Edge Deployment](https://docs.losant.com/edge-compute/deployments/) belonging to an Application - such as retrieving information on a single deployment.
178
+
140
179
  * [edge_deployments](docs/edgeDeployments.md)
141
- Contains all the actions that can be performed against the collection of [Edge Deployments](https://docs.losant.com/edge-compute/edge-deployments/) belonging to an Application - such as listing deployments or creating a new deployment.
180
+ Contains all the actions that can be performed against the collection of [Edge Deployments](https://docs.losant.com/edge-compute/deployments/) belonging to an Application - such as listing deployments or creating a new deployment.
181
+
182
+ * [embedded_deployment](docs/embeddedDeployment.md)
183
+ Contains all the actions that can be performed against a single [Embedded Deployment](https://docs.losant.com/edge-compute/deployments/) belonging to an Application - such as retrieving information on a single deployment.
184
+
185
+ * [embedded_deployments](docs/embeddedDeployments.md)
186
+ Contains all the actions that can be performed against the collection of [Embedded Deployments](https://docs.losant.com/edge-compute/deployments/) belonging to an Application - such as listing deployments or creating a new deployment.
142
187
 
143
188
  * [event](docs/event.md)
144
189
  Contains all the actions that can be performed against a single [Event](https://docs.losant.com/events/overview/), such as commenting on or changing the state of an event.
@@ -209,8 +254,65 @@ Each of the following is a method on the client object, and returns a wrapper fo
209
254
  * [flow_versions](docs/flowVersions.md)
210
255
  Contains all the actions that can be performed against the collection of [Workflow Versions](https://docs.losant.com/workflows/versioning/) belonging to a Workflow - such as listing the versions or creating a new version.
211
256
 
212
- * [me](docs/me.md)
213
- Contains the actions for operating against the currently authenticated [User](https://docs.losant.com/user-accounts/overview/) such as changing the password or linking against external services.
257
+ * [instance](docs/instance.md)
258
+ Contains all the actions that can be performed against a single [Instance](https://docs.losant.com/instance-manager/overview/), which include things such as updating report configuration or defaults.
259
+
260
+ * [instance_api_token](docs/instanceApiToken.md)
261
+ Contains all the actions that can be performed against a single [Instance API Token](https://docs.losant.com/instance-manager/instance-tokens/) - for instance, getting info on a single token or revoking a token.
262
+
263
+ * [instance_api_tokens](docs/instanceApiTokens.md)
264
+ Contains all the actions that can be performed against the collection of [Instance API Tokens](https://docs.losant.com/instance-manager/instance-tokens/) belonging to an Instance - such as listing tokens or creating a new token.
265
+
266
+ * [instance_audit_log](docs/instanceAuditLog.md)
267
+ Contains all of the actions that can be performed against a single [Audit Log](https://docs.losant.com/instance-manager/audit-logs/) belonging to an Instance - such as viewing a log.
268
+
269
+ * [instance_audit_logs](docs/instanceAuditLogs.md)
270
+ Contains all of the actions that can be performed against the set of [Audit Logs](https://docs.losant.com/instance-manager/audit-logs/) belonging to an Instance - such as listing the logs.
271
+
272
+ * [instance_custom_node](docs/instanceCustomNode.md)
273
+ Contains all the actions that can be performed against a single [Instance Custom Node](https://docs.losant.com/instance-manager/instance-custom-nodes/) - for instance, getting info on a single custom node or modifying a custom node.
274
+
275
+ * [instance_custom_nodes](docs/instanceCustomNodes.md)
276
+ Contains all the actions that can be performed against the collection of [Instance Custom Nodes](https://docs.losant.com/instance-manager/instance-custom-nodes/) belonging to an Instance - such as listing custom nodes or creating a new custom node.
277
+
278
+ * [instance_member](docs/instanceMember.md)
279
+ Contains all the actions that can be performed against a single [Instance Member](https://docs.losant.com/instance-manager/overview/#managing-membership), which include things such as updating the role or removing the member.
280
+
281
+ * [instance_members](docs/instanceMembers.md)
282
+ Contains all the actions that can be performed against the collection of [Instance Members](https://docs.losant.com/instance-manager/overview/#managing-membership) belonging to an Instance - such as listing members or adding a new member.
283
+
284
+ * [instance_notification_rule](docs/instanceNotificationRule.md)
285
+ Contains all the actions that can be performed against a single [Instance Notification Rule](https://docs.losant.com/instance-manager/overview/#notifications), which include things such as updating the threshold or the targets.
286
+
287
+ * [instance_notification_rules](docs/instanceNotificationRules.md)
288
+ Contains all the actions that can be performed against the collection of [Instance Notification Rules](https://docs.losant.com/instance-manager/overview/#notifications) belonging to an Instance - such as listing rules or adding a new rule.
289
+
290
+ * [instance_org_invite](docs/instanceOrgInvite.md)
291
+ Contains all the actions that can be performed against a single [Instance Organization Invite](https://docs.losant.com/instance-manager/managing-organizations/#renewing-and-revoking-invitations), which include things such as revoking the invite.
292
+
293
+ * [instance_org_invites](docs/instanceOrgInvites.md)
294
+ Contains all the actions that can be performed against the collection of [Instance Organization Invites](https://docs.losant.com/instance-manager/managing-organizations/#renewing-and-revoking-invitations) belonging to an Organization in an Instance - such as listing invites or sending a new invitation.
295
+
296
+ * [instance_org_member](docs/instanceOrgMember.md)
297
+ Contains all the actions that can be performed against a single [Instance Organization Member](https://docs.losant.com/instance-manager/managing-organizations/#organization-membership), which include things such as changing the role or removing the membership.
298
+
299
+ * [instance_org_members](docs/instanceOrgMembers.md)
300
+ Contains all the actions that can be performed against the collection of [Instance Organization Members](https://docs.losant.com/instance-manager/managing-organizations/#organization-membership) belonging to an Organization in an Instance - such as listing members or adding new members.
301
+
302
+ * [instance_org](docs/instanceOrganization.md)
303
+ Contains all the actions that can be performed against a single [Instance Organization](https://docs.losant.com/instance-manager/managing-organizations/), which include things such as modifying limits.
304
+
305
+ * [instance_orgs](docs/instanceOrgs.md)
306
+ Contains all the actions that can be performed against the collection of [Instance Organizations](https://docs.losant.com/instance-manager/managing-organizations/) belonging to an Instance - such as listing organizations or adding a new organization.
307
+
308
+ * [instance_sandbox](docs/instanceSandbox.md)
309
+ Contains all the actions that can be performed against a single [Instance Sandbox](https://docs.losant.com/instance-manager/managing-sandbox-users/) - for instance, getting info on a single sandbox or deleting the sandbox.
310
+
311
+ * [instance_sandboxes](docs/instanceSandboxes.md)
312
+ Contains all the actions that can be performed against the collection of [Instance Sandboxes](https://docs.losant.com/instance-manager/managing-sandbox-users/) belonging to an Instance - such as listing sandboxes.
313
+
314
+ * [instances](docs/instances.md)
315
+ Contains all the actions that can be performed against the collection of [Instances](https://docs.losant.com/instance-manager/overview/) that the currently authenticated user has access to - such as listing instances.
214
316
 
215
317
  * [integration](docs/integration.md)
216
318
  Contains all the actions that can be performed against a single [Integration](https://docs.losant.com/applications/integrations/), which include things like removing an integration or updating integration configuration.
@@ -218,12 +320,36 @@ Each of the following is a method on the client object, and returns a wrapper fo
218
320
  * [integrations](docs/integrations.md)
219
321
  Contains all the actions that can be performed against the collection of [Integrations](https://docs.losant.com/applications/integrations/) belonging to an Application - such as listing integrations or creating a new integration.
220
322
 
323
+ * [me](docs/me.md)
324
+ Contains the actions for operating against the currently authenticated [User](https://docs.losant.com/user-accounts/overview/) such as changing the password or linking against external services.
325
+
326
+ * [notebook](docs/notebook.md)
327
+ Contains all the actions that can be performed against a single [Notebook](https://docs.losant.com/notebooks/overview/), which include things like removing a notebook or executing a notebook.
328
+
329
+ * [notebooks](docs/notebooks.md)
330
+ Contains all the actions that can be performed against the collection of [Notebooks](https://docs.losant.com/notebooks/overview/) belonging to an Application - such as listing notebooks or creating a new notebook.
331
+
332
+ * [org_invites](docs/orgInvites.md)
333
+ Contains all of the actions that can be performed against a invitation to an organization, such as accepting the invitation.
334
+
221
335
  * [org](docs/org.md)
222
336
  Contains all the actions that can be performed against a single [Organization](https://docs.losant.com/organizations/overview/), things like inviting a user to the organization, or modifying the organization.
223
337
 
224
338
  * [orgs](docs/orgs.md)
225
339
  Contains all of the actions that can be performed against the set of [Organizations](https://docs.losant.com/organizations/overview/) that the currently authenticated user has access to - such as listing the organizations or creating a new organization.
226
340
 
341
+ * [resource_job](docs/resourceJob.md)
342
+ Contains all the actions that can be performed against a single [Resource Job](https://docs.losant.com/applications/resource-jobs/), such as executing the job.
343
+
344
+ * [resource_jobs](docs/resourceJobs.md)
345
+ Contains all the actions that can be performed against the collection of [Resource Jobs](https://docs.losant.com/applications/resource-jobs/) belonging to an Application - such as listing resource jobs or creating a new resource job.
346
+
347
+ * [user_api_token](docs/userApiToken.md)
348
+ Contains all the actions that can be performed against a single [User API Token](https://docs.losant.com/user-accounts/user-tokens/), such as revoking the token.
349
+
350
+ * [user_api_tokens](docs/userApiTokens.md)
351
+ Contains all the actions that can be performed against the collection of [User API Tokens](https://docs.losant.com/user-accounts/user-tokens/) belonging to the currently authenticated user - such as listing tokens or creating a new token.
352
+
227
353
  * [webhook](docs/webhook.md)
228
354
  Contains all the actions that can be performed against a single [Webhook](https://docs.losant.com/applications/webhooks/), for instance modifying the verification settings or removing the webhook.
229
355