losant_rest 1.9.1 → 1.10.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. checksums.yaml +5 -5
  2. data/LICENSE +1 -1
  3. data/README.md +1 -1
  4. data/docs/_schemas.md +41608 -19945
  5. data/docs/application.md +168 -4
  6. data/docs/applicationTemplates.md +50 -0
  7. data/docs/applications.md +46 -0
  8. data/docs/auth.md +72 -0
  9. data/docs/device.md +1 -0
  10. data/docs/devices.md +89 -2
  11. data/docs/experienceEndpoint.md +43 -0
  12. data/docs/experienceEndpoints.md +1 -1
  13. data/docs/experienceView.md +43 -0
  14. data/lib/losant_rest.rb +2 -1
  15. data/lib/losant_rest/application.rb +144 -5
  16. data/lib/losant_rest/application_api_token.rb +1 -1
  17. data/lib/losant_rest/application_api_tokens.rb +1 -1
  18. data/lib/losant_rest/application_certificate.rb +1 -1
  19. data/lib/losant_rest/application_certificate_authorities.rb +1 -1
  20. data/lib/losant_rest/application_certificate_authority.rb +1 -1
  21. data/lib/losant_rest/application_certificates.rb +1 -1
  22. data/lib/losant_rest/application_key.rb +1 -1
  23. data/lib/losant_rest/application_keys.rb +1 -1
  24. data/lib/losant_rest/application_templates.rb +88 -0
  25. data/lib/losant_rest/applications.rb +1 -1
  26. data/lib/losant_rest/audit_log.rb +1 -1
  27. data/lib/losant_rest/audit_logs.rb +1 -1
  28. data/lib/losant_rest/auth.rb +85 -1
  29. data/lib/losant_rest/client.rb +7 -3
  30. data/lib/losant_rest/dashboard.rb +1 -1
  31. data/lib/losant_rest/dashboards.rb +1 -1
  32. data/lib/losant_rest/data.rb +1 -1
  33. data/lib/losant_rest/data_table.rb +1 -1
  34. data/lib/losant_rest/data_table_row.rb +1 -1
  35. data/lib/losant_rest/data_table_rows.rb +1 -1
  36. data/lib/losant_rest/data_tables.rb +1 -1
  37. data/lib/losant_rest/device.rb +3 -1
  38. data/lib/losant_rest/device_recipe.rb +1 -1
  39. data/lib/losant_rest/device_recipes.rb +1 -1
  40. data/lib/losant_rest/devices.rb +105 -3
  41. data/lib/losant_rest/edge_deployments.rb +1 -1
  42. data/lib/losant_rest/error.rb +1 -1
  43. data/lib/losant_rest/event.rb +1 -1
  44. data/lib/losant_rest/events.rb +1 -1
  45. data/lib/losant_rest/experience.rb +1 -1
  46. data/lib/losant_rest/experience_domain.rb +1 -1
  47. data/lib/losant_rest/experience_domains.rb +1 -1
  48. data/lib/losant_rest/experience_endpoint.rb +51 -1
  49. data/lib/losant_rest/experience_endpoints.rb +1 -1
  50. data/lib/losant_rest/experience_group.rb +1 -1
  51. data/lib/losant_rest/experience_groups.rb +1 -1
  52. data/lib/losant_rest/experience_slug.rb +1 -1
  53. data/lib/losant_rest/experience_slugs.rb +1 -1
  54. data/lib/losant_rest/experience_user.rb +1 -1
  55. data/lib/losant_rest/experience_users.rb +1 -1
  56. data/lib/losant_rest/experience_version.rb +1 -1
  57. data/lib/losant_rest/experience_versions.rb +1 -1
  58. data/lib/losant_rest/experience_view.rb +51 -1
  59. data/lib/losant_rest/experience_views.rb +1 -1
  60. data/lib/losant_rest/file.rb +1 -1
  61. data/lib/losant_rest/files.rb +1 -1
  62. data/lib/losant_rest/flow.rb +1 -1
  63. data/lib/losant_rest/flow_version.rb +1 -1
  64. data/lib/losant_rest/flow_versions.rb +1 -1
  65. data/lib/losant_rest/flows.rb +1 -1
  66. data/lib/losant_rest/integration.rb +1 -1
  67. data/lib/losant_rest/integrations.rb +1 -1
  68. data/lib/losant_rest/me.rb +1 -1
  69. data/lib/losant_rest/notebook.rb +1 -1
  70. data/lib/losant_rest/notebooks.rb +1 -1
  71. data/lib/losant_rest/org.rb +1 -1
  72. data/lib/losant_rest/org_invites.rb +1 -1
  73. data/lib/losant_rest/orgs.rb +1 -1
  74. data/lib/losant_rest/utils.rb +1 -1
  75. data/lib/losant_rest/version.rb +2 -2
  76. data/lib/losant_rest/webhook.rb +1 -1
  77. data/lib/losant_rest/webhooks.rb +1 -1
  78. data/schemas/advancedDeviceQuery.json +1018 -0
  79. data/schemas/advancedEventQuery.json +382 -13
  80. data/schemas/advancedQuery.json +37 -3
  81. data/schemas/application.json +10 -5
  82. data/schemas/applicationApiTokenPost.json +6 -0
  83. data/schemas/applicationCertificate.json +34 -0
  84. data/schemas/applicationCertificatePatch.json +34 -0
  85. data/schemas/applicationCertificatePost.json +34 -0
  86. data/schemas/applicationCertificates.json +34 -0
  87. data/schemas/{applicationCloneResult.json → applicationCreationByTemplateResult.json} +21 -8
  88. data/schemas/applicationExportPost.json +24 -0
  89. data/schemas/applicationExportResult.json +10 -0
  90. data/schemas/applicationKey.json +34 -0
  91. data/schemas/applicationKeyPatch.json +34 -0
  92. data/schemas/applicationKeyPost.json +34 -0
  93. data/schemas/applicationKeyPostResponse.json +34 -0
  94. data/schemas/applicationKeys.json +34 -0
  95. data/schemas/applicationPatch.json +10 -5
  96. data/schemas/applicationPost.json +14 -5
  97. data/schemas/applicationReadme.json +29 -0
  98. data/schemas/applicationReadmePatch.json +11 -0
  99. data/schemas/applicationTemplate.json +99 -0
  100. data/schemas/applicationTemplates.json +140 -0
  101. data/schemas/applications.json +10 -5
  102. data/schemas/authedDevice.json +34 -0
  103. data/schemas/dashboard.json +1228 -144
  104. data/schemas/dashboardPatch.json +1228 -144
  105. data/schemas/dashboardPost.json +1228 -144
  106. data/schemas/dashboards.json +1228 -144
  107. data/schemas/dataExport.json +11 -0
  108. data/schemas/dataTableRows.json +3 -0
  109. data/schemas/dataTableRowsExport.json +37 -3
  110. data/schemas/device.json +16 -3
  111. data/schemas/devicePatch.json +16 -3
  112. data/schemas/devicePost.json +16 -3
  113. data/schemas/deviceRecipe.json +16 -3
  114. data/schemas/deviceRecipePatch.json +16 -3
  115. data/schemas/deviceRecipePost.json +16 -3
  116. data/schemas/deviceRecipes.json +16 -3
  117. data/schemas/devices.json +19 -3
  118. data/schemas/devicesDataRemoved.json +12 -0
  119. data/schemas/devicesDeletePost.json +1034 -0
  120. data/schemas/devicesDeleted.json +12 -0
  121. data/schemas/devicesExportPost.json +1035 -0
  122. data/schemas/devicesPatch.json +1773 -7
  123. data/schemas/devicesRemoveDataPost.json +1056 -0
  124. data/schemas/devicesUpdated.json +18 -0
  125. data/schemas/events.json +1 -816
  126. data/schemas/eventsExport.json +382 -13
  127. data/schemas/experienceGroup.json +7 -0
  128. data/schemas/experienceGroupPatch.json +7 -0
  129. data/schemas/experienceGroupPost.json +7 -0
  130. data/schemas/experienceGroups.json +7 -0
  131. data/schemas/experienceLinkedResources.json +6659 -0
  132. data/schemas/flow.json +103 -1
  133. data/schemas/flowPatch.json +103 -1
  134. data/schemas/flowPost.json +103 -1
  135. data/schemas/flowVersion.json +206 -2
  136. data/schemas/flowVersionPost.json +103 -1
  137. data/schemas/flowVersions.json +206 -2
  138. data/schemas/flows.json +103 -1
  139. data/schemas/flowsImportPost.json +206 -2
  140. data/schemas/flowsImportResult.json +309 -3
  141. data/schemas/githubLogin.json +9 -0
  142. data/schemas/integration.json +4 -4
  143. data/schemas/integrationPatch.json +4 -4
  144. data/schemas/integrationPost.json +4 -4
  145. data/schemas/integrations.json +4 -4
  146. data/schemas/{applicationCloneEnqueued.json → jobEnqueuedResult.json} +0 -0
  147. data/schemas/me.json +3 -0
  148. data/schemas/multiDeviceCommand.json +1019 -0
  149. data/schemas/notebook.json +207 -35
  150. data/schemas/notebookDataExportOptions.json +4 -0
  151. data/schemas/notebookExecutionLogs.json +4 -0
  152. data/schemas/notebookExecutionOptions.json +4 -0
  153. data/schemas/notebookPatch.json +207 -35
  154. data/schemas/notebookPost.json +207 -35
  155. data/schemas/notebooks.json +207 -35
  156. data/schemas/org.json +8 -0
  157. data/schemas/orgPatch.json +9 -0
  158. data/schemas/orgs.json +8 -0
  159. data/schemas/samlResponse.json +21 -0
  160. data/schemas/ssoRequest.json +20 -0
  161. data/schemas/timeSeriesData.json +91 -12
  162. data/schemas/timeSeriesQuery.json +21 -12
  163. data/schemas/userCredentials.json +9 -0
  164. data/schemas/userPost.json +9 -0
  165. data/schemas/{validationCloneErrors.json → validationErrors.json} +9 -2
  166. metadata +24 -7
@@ -10,12 +10,16 @@ parameters and the potential responses.
10
10
  * [Backfill Archive Data](#backfill-archive-data)
11
11
  * [Clone](#clone)
12
12
  * [Delete](#delete)
13
+ * [Export](#export)
13
14
  * [Full Data Tables Archive](#full-data-tables-archive)
14
15
  * [Full Events Archive](#full-events-archive)
15
16
  * [Get](#get)
17
+ * [Import](#import)
16
18
  * [Mqtt Publish Message](#mqtt-publish-message)
17
19
  * [Patch](#patch)
18
20
  * [Payload Counts](#payload-counts)
21
+ * [Readme](#readme)
22
+ * [Readme Patch](#readme-patch)
19
23
  * [Search](#search)
20
24
 
21
25
  <br/>
@@ -62,7 +66,7 @@ all.Application, all.Organization, all.User, application.*, or application.archi
62
66
 
63
67
  ## Backfill Archive Data
64
68
 
65
- Returns success when a job has been enqueued to backfill all current data to it&#x27;s archive
69
+ Returns success when a job has been enqueued to backfill all current data to its archive
66
70
 
67
71
  ```ruby
68
72
  result = client.application.backfill_archive_data(applicationId: my_application_id)
@@ -125,8 +129,8 @@ all.Application, all.Organization, all.User, application.*, or application.clone
125
129
  | Code | Type | Description |
126
130
  | ---- | ---- | ----------- |
127
131
  | 200 | [Success Dry Run](_schemas.md#success-dry-run) | if dryRun is set and successful, then return success |
128
- | 201 | [Application Clone](_schemas.md#application-clone) | If application was successfully cloned |
129
- | 202 | [Application Clone Enqueue](_schemas.md#application-clone-enqueue) | If application was enqueued to be cloned |
132
+ | 201 | [Application Creation By Template Result](_schemas.md#application-creation-by-template-result) | If application was successfully cloned |
133
+ | 202 | [Job Enqueued API Result](_schemas.md#job-enqueued-api-result) | If application was enqueued to be cloned |
130
134
 
131
135
  #### Error Responses
132
136
 
@@ -134,7 +138,7 @@ all.Application, all.Organization, all.User, application.*, or application.clone
134
138
  | ---- | ---- | ----------- |
135
139
  | 400 | [Error](_schemas.md#error) | Error if malformed request |
136
140
  | 404 | [Error](_schemas.md#error) | Error if application is not found |
137
- | 422 | [Validation Clone Error](_schemas.md#validation-clone-error) | Error if too many validation errors occurred on other resources |
141
+ | 422 | [Validation Error](_schemas.md#validation-error) | Error if too many validation errors occurred on other resources |
138
142
 
139
143
  <br/>
140
144
 
@@ -175,6 +179,47 @@ all.Application, all.Organization, all.User, application.*, or application.delet
175
179
 
176
180
  <br/>
177
181
 
182
+ ## Export
183
+
184
+ Export an application and all of its resources
185
+
186
+ ```ruby
187
+ result = client.application.export(
188
+ applicationId: my_application_id,
189
+ options: my_options)
190
+
191
+ puts result
192
+ ```
193
+
194
+ #### Authentication
195
+ The client must be configured with a valid api access token to call this
196
+ action. The token must include at least one of the following scopes:
197
+ all.Application, all.Organization, all.User, application.*, or application.export.
198
+
199
+ #### Available Parameters
200
+
201
+ | Name | Type | Required | Description | Default | Example |
202
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
203
+ | applicationId | string | Y | ID of the associated application | | 575ec8687ae143cd83dc4a97 |
204
+ | options | [Application Export Post Schema](_schemas.md#application-export-post-schema) | Y | Object containing export application options | | [Application Export Post Schema Example](_schemas.md#application-export-post-schema-example) |
205
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
206
+
207
+ #### Successful Responses
208
+
209
+ | Code | Type | Description |
210
+ | ---- | ---- | ----------- |
211
+ | 200 | [Application Export Result](_schemas.md#application-export-result) | a url to download the zip of exported resources |
212
+ | 202 | [Job Enqueued API Result](_schemas.md#job-enqueued-api-result) | If application was enqueued to be exported |
213
+
214
+ #### Error Responses
215
+
216
+ | Code | Type | Description |
217
+ | ---- | ---- | ----------- |
218
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
219
+ | 404 | [Error](_schemas.md#error) | Error if application is not found |
220
+
221
+ <br/>
222
+
178
223
  ## Full Data Tables Archive
179
224
 
180
225
  Returns success when a job has been enqueued to archive all selected data tables
@@ -288,6 +333,48 @@ all.Application, all.Application.read, all.Organization, all.Organization.read,
288
333
 
289
334
  <br/>
290
335
 
336
+ ## Import
337
+
338
+ Add multiple resources to an application via a zip file
339
+
340
+ ```ruby
341
+ result = client.application.import(
342
+ applicationId: my_application_id,
343
+ importBundle: my_import_bundle)
344
+
345
+ puts result
346
+ ```
347
+
348
+ #### Authentication
349
+ The client must be configured with a valid api access token to call this
350
+ action. The token must include at least one of the following scopes:
351
+ all.Application, all.Organization, all.User, application.*, or application.import.
352
+
353
+ #### Available Parameters
354
+
355
+ | Name | Type | Required | Description | Default | Example |
356
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
357
+ | applicationId | string | Y | ID of the associated application | | 575ec8687ae143cd83dc4a97 |
358
+ | importBundle | file | Y | The zip file containing all of the resources to import into the application | | undefined |
359
+ | email | string | N | Email address to notify the user when the job to import the application resources has completed or errored, defaults to the email address of the user making the request | | email@example.com |
360
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
361
+
362
+ #### Successful Responses
363
+
364
+ | Code | Type | Description |
365
+ | ---- | ---- | ----------- |
366
+ | 200 | [Application](_schemas.md#application) | Updated application information |
367
+ | 202 | [Job Enqueued API Result](_schemas.md#job-enqueued-api-result) | If a job was enqueued for the resources to be imported into the application |
368
+
369
+ #### Error Responses
370
+
371
+ | Code | Type | Description |
372
+ | ---- | ---- | ----------- |
373
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
374
+ | 404 | [Error](_schemas.md#error) | Error if application is not found |
375
+
376
+ <br/>
377
+
291
378
  ## Mqtt Publish Message
292
379
 
293
380
  Publishes the given message to the given MQTT topic
@@ -409,6 +496,83 @@ all.Application, all.Application.read, all.Organization, all.Organization.read,
409
496
 
410
497
  <br/>
411
498
 
499
+ ## Readme
500
+
501
+ Get the current application readme information
502
+
503
+ ```ruby
504
+ result = client.application.readme(applicationId: my_application_id)
505
+
506
+ puts result
507
+ ```
508
+
509
+ #### Authentication
510
+ The client must be configured with a valid api access token to call this
511
+ action. The token must include at least one of the following scopes:
512
+ all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, application.*, or application.get.
513
+
514
+ #### Available Parameters
515
+
516
+ | Name | Type | Required | Description | Default | Example |
517
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
518
+ | applicationId | string | Y | ID of the associated application | | 575ec8687ae143cd83dc4a97 |
519
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
520
+
521
+ #### Successful Responses
522
+
523
+ | Code | Type | Description |
524
+ | ---- | ---- | ----------- |
525
+ | 200 | [Application Readme](_schemas.md#application-readme) | The application readme information |
526
+
527
+ #### Error Responses
528
+
529
+ | Code | Type | Description |
530
+ | ---- | ---- | ----------- |
531
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
532
+ | 404 | [Error](_schemas.md#error) | Error if application was not found |
533
+
534
+ <br/>
535
+
536
+ ## Readme Patch
537
+
538
+ Update the current application readme information
539
+
540
+ ```ruby
541
+ result = client.application.readme_patch(
542
+ applicationId: my_application_id,
543
+ readme: my_readme)
544
+
545
+ puts result
546
+ ```
547
+
548
+ #### Authentication
549
+ The client must be configured with a valid api access token to call this
550
+ action. The token must include at least one of the following scopes:
551
+ all.Application, all.Organization, all.User, application.*, or application.patch.
552
+
553
+ #### Available Parameters
554
+
555
+ | Name | Type | Required | Description | Default | Example |
556
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
557
+ | applicationId | string | Y | ID of the associated application | | 575ec8687ae143cd83dc4a97 |
558
+ | readme | [Application Readme Patch](_schemas.md#application-readme-patch) | Y | Object containing new readme information | | [Application Readme Patch Example](_schemas.md#application-readme-patch-example) |
559
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
560
+
561
+ #### Successful Responses
562
+
563
+ | Code | Type | Description |
564
+ | ---- | ---- | ----------- |
565
+ | 200 | [Application Readme](_schemas.md#application-readme) | Updated readme information |
566
+
567
+ #### Error Responses
568
+
569
+ | Code | Type | Description |
570
+ | ---- | ---- | ----------- |
571
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
572
+ | 404 | [Error](_schemas.md#error) | Error if application was not found |
573
+
574
+ <br/>
575
+
412
576
  ## Search
413
577
 
414
578
  Search across an application&#x27;s resources by target identifier
@@ -0,0 +1,50 @@
1
+ # Application Templates Actions
2
+
3
+ Details on the various actions that can be performed on the
4
+ Application Templates resource, including the expected
5
+ parameters and the potential responses.
6
+
7
+ ##### Contents
8
+
9
+ * [Get](#get)
10
+
11
+ <br/>
12
+
13
+ ## Get
14
+
15
+ Returns the application templates the current user has permission to see
16
+
17
+ ```ruby
18
+ result = client.application_templates.get(optional_params)
19
+
20
+ puts result
21
+ ```
22
+
23
+ #### Authentication
24
+ The client must be configured with a valid api access token to call this
25
+ action. The token must include at least one of the following scopes:
26
+ all.User, all.User.read, applicationTemplates.*, or applicationTemplates.get.
27
+
28
+ #### Available Parameters
29
+
30
+ | Name | Type | Required | Description | Default | Example |
31
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
32
+ | sortField | string | N | Field to sort the results by. Accepted values are: name, id, creationDate, lastUpdated | name | name |
33
+ | sortDirection | string | N | Direction to sort the results by. Accepted values are: asc, desc | asc | asc |
34
+ | page | string | N | Which page of results to return | 0 | 0 |
35
+ | perPage | string | N | How many items to return per page | 1000 | 10 |
36
+ | filterField | string | N | Field to filter the results by. Blank or not provided means no filtering. Accepted values are: name | | name |
37
+ | filter | string | N | Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering. | | my * app |
38
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
39
+
40
+ #### Successful Responses
41
+
42
+ | Code | Type | Description |
43
+ | ---- | ---- | ----------- |
44
+ | 200 | [Application Templates](_schemas.md#application-templates) | Collection of application templates |
45
+
46
+ #### Error Responses
47
+
48
+ | Code | Type | Description |
49
+ | ---- | ---- | ----------- |
50
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
@@ -7,6 +7,7 @@ parameters and the potential responses.
7
7
  ##### Contents
8
8
 
9
9
  * [Get](#get)
10
+ * [Import](#import)
10
11
  * [Post](#post)
11
12
 
12
13
  <br/>
@@ -55,6 +56,51 @@ all.Organization, all.Organization.read, all.User, all.User.read, applications.*
55
56
 
56
57
  <br/>
57
58
 
59
+ ## Import
60
+
61
+ Create a new application from an import bundle
62
+
63
+ ```ruby
64
+ result = client.applications.import(importBundle: my_import_bundle)
65
+
66
+ puts result
67
+ ```
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.User, applications.*, or applications.import.
73
+
74
+ #### Available Parameters
75
+
76
+ | Name | Type | Required | Description | Default | Example |
77
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
78
+ | importBundle | file | Y | The zip file containing the application to import and all of its resources | | undefined |
79
+ | ownerId | string | N | The owner id of the new application, defaults to the id of the user making the request | | 575ed6e87ae143cd83dc4aa8 |
80
+ | ownerType | string | N | The type of the owner id. Accepted values are: user, organization | user | user |
81
+ | includeDevices | string | N | If set, import devices from the import bundle | | true |
82
+ | includeDataTableRows | string | N | If set, import data table rows from import bundle | | true |
83
+ | includeFiles | string | N | If set, import files from import bundle | | true |
84
+ | email | string | N | Email address to notify the user when the job to import the application has completed or errored, defaults to the email address of the user making the request | | email@example.com |
85
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
86
+
87
+ #### Successful Responses
88
+
89
+ | Code | Type | Description |
90
+ | ---- | ---- | ----------- |
91
+ | 201 | [Application Creation By Template Result](_schemas.md#application-creation-by-template-result) | Successfully created application |
92
+ | 202 | [Job Enqueued API Result](_schemas.md#job-enqueued-api-result) | If application was enqueued to be imported |
93
+
94
+ #### Error Responses
95
+
96
+ | Code | Type | Description |
97
+ | ---- | ---- | ----------- |
98
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
99
+ | 404 | [Error](_schemas.md#error) | Error if application is not found |
100
+ | 422 | [Validation Error](_schemas.md#validation-error) | Error if too many validation errors occurred on other resources |
101
+
102
+ <br/>
103
+
58
104
  ## Post
59
105
 
60
106
  Create a new application
@@ -9,6 +9,8 @@ parameters and the potential responses.
9
9
  * [Authenticate Device](#authenticate-device)
10
10
  * [Authenticate User](#authenticate-user)
11
11
  * [Authenticate User Github](#authenticate-user-github)
12
+ * [Authenticate User Saml](#authenticate-user-saml)
13
+ * [Sso Domain](#sso-domain)
12
14
 
13
15
  <br/>
14
16
 
@@ -114,3 +116,73 @@ No api access token is required to call this action.
114
116
  | ---- | ---- | ----------- |
115
117
  | 400 | [Error](_schemas.md#error) | Error if malformed request |
116
118
  | 401 | [Error](_schemas.md#error) | Unauthorized error if authentication fails |
119
+
120
+ <br/>
121
+
122
+ ## Authenticate User Saml
123
+
124
+ Authenticates a user via a SAML response.
125
+
126
+ ```ruby
127
+ result = client.auth.authenticate_user_saml(saml: my_saml)
128
+
129
+ puts result
130
+ ```
131
+
132
+ #### Authentication
133
+ No api access token is required to call this action.
134
+
135
+ #### Available Parameters
136
+
137
+ | Name | Type | Required | Description | Default | Example |
138
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
139
+ | saml | [SAML Response](_schemas.md#saml-response) | Y | Encoded SAML response from an IDP for a user. | | [SAML Response Example](_schemas.md#saml-response-example) |
140
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
141
+
142
+ #### Successful Responses
143
+
144
+ | Code | Type | Description |
145
+ | ---- | ---- | ----------- |
146
+ | 200 | [Authenticated User](_schemas.md#authenticated-user) | Successful authentication. The included api access token has the scope &#x27;all.User&#x27;. |
147
+
148
+ #### Error Responses
149
+
150
+ | Code | Type | Description |
151
+ | ---- | ---- | ----------- |
152
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
153
+ | 401 | [Error](_schemas.md#error) | Unauthorized error if authentication fails |
154
+
155
+ <br/>
156
+
157
+ ## Sso Domain
158
+
159
+ Checks email domain for SSO configuration.
160
+
161
+ ```ruby
162
+ result = client.auth.sso_domain(email: my_email)
163
+
164
+ puts result
165
+ ```
166
+
167
+ #### Authentication
168
+ No api access token is required to call this action.
169
+
170
+ #### Available Parameters
171
+
172
+ | Name | Type | Required | Description | Default | Example |
173
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
174
+ | email | string | Y | The email address associated with the user login | | example@example.com |
175
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
176
+
177
+ #### Successful Responses
178
+
179
+ | Code | Type | Description |
180
+ | ---- | ---- | ----------- |
181
+ | 200 | [SSO Request](_schemas.md#sso-request) | Successful finding SSO for domain. Returns SSO request URL and type. |
182
+ | 204 | undefined | No domain associated with an SSO configuration |
183
+
184
+ #### Error Responses
185
+
186
+ | Code | Type | Description |
187
+ | ---- | ---- | ----------- |
188
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
@@ -88,6 +88,7 @@ all.Application, all.Application.read, all.Organization, all.Organization.read,
88
88
  | end | string | N | End time of export (ms since epoch - 0 means now, negative is relative to now) | 0 | 1465790400000 |
89
89
  | email | string | N | Email address to send export to. Defaults to current user&#x27;s email. | | email@example.com |
90
90
  | callbackUrl | string | N | Callback URL to call with export result | | https://example.com/cburl |
91
+ | includeBlobData | string | N | If set will export any blob attributes in base64 form, otherwise they will be downloadable links which will expire. | | true |
91
92
  | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
92
93
 
93
94
  #### Successful Responses
@@ -6,14 +6,57 @@ parameters and the potential responses.
6
6
 
7
7
  ##### Contents
8
8
 
9
+ * [Delete](#delete)
9
10
  * [Export](#export)
10
11
  * [Get](#get)
11
12
  * [Patch](#patch)
12
13
  * [Post](#post)
14
+ * [Remove Data](#remove-data)
13
15
  * [Send Command](#send-command)
14
16
 
15
17
  <br/>
16
18
 
19
+ ## Delete
20
+
21
+ Delete devices
22
+
23
+ ```ruby
24
+ result = client.devices.delete(
25
+ applicationId: my_application_id,
26
+ options: my_options)
27
+
28
+ puts result
29
+ ```
30
+
31
+ #### Authentication
32
+ The client must be configured with a valid api access token to call this
33
+ action. The token must include at least one of the following scopes:
34
+ all.Application, all.Organization, all.User, devices.*, or devices.delete.
35
+
36
+ #### Available Parameters
37
+
38
+ | Name | Type | Required | Description | Default | Example |
39
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
40
+ | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
41
+ | options | [Devices Delete Post](_schemas.md#devices-delete-post) | Y | Object containing device query and email | | [Devices Delete Post Example](_schemas.md#devices-delete-post-example) |
42
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
43
+
44
+ #### Successful Responses
45
+
46
+ | Code | Type | Description |
47
+ | ---- | ---- | ----------- |
48
+ | 200 | [Devices Deleted](_schemas.md#devices-deleted) | Object indicating number of devices deleted or failed |
49
+ | 202 | [Job Enqueued API Result](_schemas.md#job-enqueued-api-result) | If a job was enqueued for the devices to be deleted |
50
+
51
+ #### Error Responses
52
+
53
+ | Code | Type | Description |
54
+ | ---- | ---- | ----------- |
55
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
56
+ | 404 | [Error](_schemas.md#error) | Error if application was not found |
57
+
58
+ <br/>
59
+
17
60
  ## Export
18
61
 
19
62
  Creates an export of all device metadata
@@ -36,6 +79,7 @@ all.Application, all.Application.read, all.Organization, all.Organization.read,
36
79
  | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
37
80
  | email | string | N | Email address to send export to. Defaults to current user&#x27;s email. | | email@example.com |
38
81
  | callbackUrl | string | N | Callback URL to call with export result | | https://example.com/cburl |
82
+ | options | [Devices Metadata Export Post](_schemas.md#devices-metadata-export-post) | N | Object containing device query and optionally email or callback | | [Devices Metadata Export Post Example](_schemas.md#devices-metadata-export-post-example) |
39
83
  | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
40
84
 
41
85
  #### Successful Responses
@@ -83,6 +127,7 @@ all.Application, all.Application.read, all.Device, all.Device.read, all.Organiza
83
127
  | tagFilter | [Device Tag Filter](_schemas.md#device-tag-filter) | N | Array of tag pairs to filter by | | [Device Tag Filter Example](_schemas.md#device-tag-filter-example) |
84
128
  | excludeConnectionInfo | string | N | If set, do not return connection info | | true |
85
129
  | parentId | string | N | Filter devices as children of a given system id | | 575ecf887ae143cd83dc4aa2 |
130
+ | query | [Advanced Device Query](_schemas.md#advanced-device-query) | N | Device filter JSON object which overrides the filterField, filter, deviceClass, tagFilter, and parentId parameters. | | [Advanced Device Query Example](_schemas.md#advanced-device-query-example) |
86
131
  | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
87
132
 
88
133
  #### Successful Responses
@@ -120,14 +165,15 @@ all.Application, all.Organization, all.User, devices.*, or devices.patch.
120
165
  | Name | Type | Required | Description | Default | Example |
121
166
  | ---- | ---- | -------- | ----------- | ------- | ------- |
122
167
  | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
123
- | patchInfo | [Devices Patch](_schemas.md#devices-patch) | N | Object containing device filter fields and updated properties | | [Devices Patch Example](_schemas.md#devices-patch-example) |
168
+ | patchInfo | [Devices Patch](_schemas.md#devices-patch) | N | Object containing device query or IDs and update operations | | [Devices Patch Example](_schemas.md#devices-patch-example) |
124
169
  | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
125
170
 
126
171
  #### Successful Responses
127
172
 
128
173
  | Code | Type | Description |
129
174
  | ---- | ---- | ----------- |
130
- | 201 | [Success](_schemas.md#success) | Successfully queued bulk update job |
175
+ | 200 | [Devices Updated](_schemas.md#devices-updated) | Object including an update log link and the number of devices updated, failed, and skipped |
176
+ | 202 | [Job Enqueued API Result](_schemas.md#job-enqueued-api-result) | Successfully queued bulk update job |
131
177
 
132
178
  #### Error Responses
133
179
 
@@ -178,6 +224,47 @@ all.Application, all.Organization, all.User, devices.*, or devices.post.
178
224
 
179
225
  <br/>
180
226
 
227
+ ## Remove Data
228
+
229
+ Removes all device data for the specified time range. Defaults to all data.
230
+
231
+ ```ruby
232
+ result = client.devices.remove_data(
233
+ applicationId: my_application_id,
234
+ options: my_options)
235
+
236
+ puts result
237
+ ```
238
+
239
+ #### Authentication
240
+ The client must be configured with a valid api access token to call this
241
+ action. The token must include at least one of the following scopes:
242
+ all.Application, all.Organization, all.User, devices.*, or devices.removeData.
243
+
244
+ #### Available Parameters
245
+
246
+ | Name | Type | Required | Description | Default | Example |
247
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
248
+ | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
249
+ | options | [Devices Remove Data Post](_schemas.md#devices-remove-data-post) | Y | Object defining the device data to delete and devices to delete from | | [Devices Remove Data Post Example](_schemas.md#devices-remove-data-post-example) |
250
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
251
+
252
+ #### Successful Responses
253
+
254
+ | Code | Type | Description |
255
+ | ---- | ---- | ----------- |
256
+ | 200 | [Devices Data Removed](_schemas.md#devices-data-removed) | Object indicating number of devices completed or skipped |
257
+ | 202 | [Job Enqueued API Result](_schemas.md#job-enqueued-api-result) | If a job was enqueued for device data to be removed |
258
+
259
+ #### Error Responses
260
+
261
+ | Code | Type | Description |
262
+ | ---- | ---- | ----------- |
263
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
264
+ | 404 | [Error](_schemas.md#error) | Error if device was not found |
265
+
266
+ <br/>
267
+
181
268
  ## Send Command
182
269
 
183
270
  Send a command to multiple devices