losant_rest 1.15.1 → 1.16.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (152) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/docs/_schemas.md +12170 -4718
  4. data/docs/application.md +3 -4
  5. data/docs/applicationDashboard.md +43 -0
  6. data/docs/applications.md +3 -2
  7. data/docs/devices.md +40 -0
  8. data/docs/flows.md +38 -0
  9. data/docs/instanceCustomNode.md +222 -0
  10. data/docs/instanceCustomNodes.md +91 -0
  11. data/lib/losant_rest/application.rb +1 -1
  12. data/lib/losant_rest/application_api_token.rb +1 -1
  13. data/lib/losant_rest/application_api_tokens.rb +1 -1
  14. data/lib/losant_rest/application_certificate.rb +1 -1
  15. data/lib/losant_rest/application_certificate_authorities.rb +1 -1
  16. data/lib/losant_rest/application_certificate_authority.rb +1 -1
  17. data/lib/losant_rest/application_certificates.rb +1 -1
  18. data/lib/losant_rest/application_dashboard.rb +50 -1
  19. data/lib/losant_rest/application_dashboards.rb +1 -1
  20. data/lib/losant_rest/application_key.rb +1 -1
  21. data/lib/losant_rest/application_keys.rb +1 -1
  22. data/lib/losant_rest/application_template.rb +1 -1
  23. data/lib/losant_rest/application_templates.rb +1 -1
  24. data/lib/losant_rest/applications.rb +1 -1
  25. data/lib/losant_rest/audit_log.rb +1 -1
  26. data/lib/losant_rest/audit_logs.rb +1 -1
  27. data/lib/losant_rest/auth.rb +1 -1
  28. data/lib/losant_rest/client.rb +11 -3
  29. data/lib/losant_rest/dashboard.rb +1 -1
  30. data/lib/losant_rest/dashboards.rb +1 -1
  31. data/lib/losant_rest/data.rb +1 -1
  32. data/lib/losant_rest/data_table.rb +1 -1
  33. data/lib/losant_rest/data_table_row.rb +1 -1
  34. data/lib/losant_rest/data_table_rows.rb +1 -1
  35. data/lib/losant_rest/data_tables.rb +1 -1
  36. data/lib/losant_rest/device.rb +1 -1
  37. data/lib/losant_rest/device_recipe.rb +1 -1
  38. data/lib/losant_rest/device_recipes.rb +1 -1
  39. data/lib/losant_rest/devices.rb +50 -1
  40. data/lib/losant_rest/edge_deployment.rb +1 -1
  41. data/lib/losant_rest/edge_deployments.rb +1 -1
  42. data/lib/losant_rest/embedded_deployment.rb +1 -1
  43. data/lib/losant_rest/embedded_deployments.rb +1 -1
  44. data/lib/losant_rest/error.rb +1 -1
  45. data/lib/losant_rest/event.rb +1 -1
  46. data/lib/losant_rest/events.rb +1 -1
  47. data/lib/losant_rest/experience.rb +1 -1
  48. data/lib/losant_rest/experience_domain.rb +1 -1
  49. data/lib/losant_rest/experience_domains.rb +1 -1
  50. data/lib/losant_rest/experience_endpoint.rb +1 -1
  51. data/lib/losant_rest/experience_endpoints.rb +1 -1
  52. data/lib/losant_rest/experience_group.rb +1 -1
  53. data/lib/losant_rest/experience_groups.rb +1 -1
  54. data/lib/losant_rest/experience_slug.rb +1 -1
  55. data/lib/losant_rest/experience_slugs.rb +1 -1
  56. data/lib/losant_rest/experience_user.rb +1 -1
  57. data/lib/losant_rest/experience_users.rb +1 -1
  58. data/lib/losant_rest/experience_version.rb +1 -1
  59. data/lib/losant_rest/experience_versions.rb +1 -1
  60. data/lib/losant_rest/experience_view.rb +1 -1
  61. data/lib/losant_rest/experience_views.rb +1 -1
  62. data/lib/losant_rest/file.rb +1 -1
  63. data/lib/losant_rest/files.rb +1 -1
  64. data/lib/losant_rest/flow.rb +1 -1
  65. data/lib/losant_rest/flow_version.rb +1 -1
  66. data/lib/losant_rest/flow_versions.rb +1 -1
  67. data/lib/losant_rest/flows.rb +45 -1
  68. data/lib/losant_rest/instance.rb +1 -1
  69. data/lib/losant_rest/instance_api_token.rb +1 -1
  70. data/lib/losant_rest/instance_api_tokens.rb +1 -1
  71. data/lib/losant_rest/instance_custom_node.rb +282 -0
  72. data/lib/losant_rest/instance_custom_nodes.rb +136 -0
  73. data/lib/losant_rest/instance_member.rb +1 -1
  74. data/lib/losant_rest/instance_members.rb +1 -1
  75. data/lib/losant_rest/instance_org.rb +1 -1
  76. data/lib/losant_rest/instance_org_invite.rb +1 -1
  77. data/lib/losant_rest/instance_org_invites.rb +1 -1
  78. data/lib/losant_rest/instance_org_member.rb +1 -1
  79. data/lib/losant_rest/instance_org_members.rb +1 -1
  80. data/lib/losant_rest/instance_orgs.rb +1 -1
  81. data/lib/losant_rest/instances.rb +1 -1
  82. data/lib/losant_rest/integration.rb +1 -1
  83. data/lib/losant_rest/integrations.rb +1 -1
  84. data/lib/losant_rest/me.rb +1 -1
  85. data/lib/losant_rest/notebook.rb +1 -1
  86. data/lib/losant_rest/notebooks.rb +1 -1
  87. data/lib/losant_rest/org.rb +1 -1
  88. data/lib/losant_rest/org_invites.rb +1 -1
  89. data/lib/losant_rest/orgs.rb +1 -1
  90. data/lib/losant_rest/user_api_token.rb +1 -1
  91. data/lib/losant_rest/user_api_tokens.rb +1 -1
  92. data/lib/losant_rest/utils.rb +1 -1
  93. data/lib/losant_rest/version.rb +2 -2
  94. data/lib/losant_rest/webhook.rb +1 -1
  95. data/lib/losant_rest/webhooks.rb +1 -1
  96. data/lib/losant_rest.rb +3 -1
  97. data/schemas/apiTokenPost.json +13 -1
  98. data/schemas/application.json +1 -1
  99. data/schemas/applicationApplyTemplatePatch.json +5 -0
  100. data/schemas/applicationClonePost.json +5 -0
  101. data/schemas/applicationCreationByTemplateResult.json +1 -1
  102. data/schemas/applicationDashboardPost.json +162 -3
  103. data/schemas/applicationExportPost.json +4 -0
  104. data/schemas/applicationImportOptions.json +43 -0
  105. data/schemas/applicationPatch.json +1 -1
  106. data/schemas/applicationPost.json +1 -1
  107. data/schemas/applications.json +1 -1
  108. data/schemas/dashboard.json +162 -3
  109. data/schemas/dashboardPatch.json +162 -3
  110. data/schemas/dashboardPost.json +162 -3
  111. data/schemas/dashboardSendReport.json +20 -3
  112. data/schemas/dashboards.json +162 -3
  113. data/schemas/deviceNamesResponse.json +36 -0
  114. data/schemas/experienceBootstrapOptions.json +1 -1
  115. data/schemas/experienceLinkedResources.json +485 -5
  116. data/schemas/experienceSlug.json +1 -1
  117. data/schemas/experienceSlugPatch.json +1 -1
  118. data/schemas/experienceSlugPost.json +1 -1
  119. data/schemas/experienceSlugs.json +1 -1
  120. data/schemas/experienceUser.json +2 -1
  121. data/schemas/experienceUsers.json +2 -1
  122. data/schemas/flow.json +173 -0
  123. data/schemas/flowPatch.json +174 -0
  124. data/schemas/flowPost.json +174 -0
  125. data/schemas/flowVersion.json +312 -5
  126. data/schemas/flowVersionPost.json +156 -0
  127. data/schemas/flowVersions.json +312 -5
  128. data/schemas/flows.json +173 -0
  129. data/schemas/flowsImportPost.json +339 -2
  130. data/schemas/flowsImportResult.json +485 -5
  131. data/schemas/githubLogin.json +13 -1
  132. data/schemas/instanceCustomNode.json +589 -0
  133. data/schemas/instanceCustomNodePatch.json +674 -0
  134. data/schemas/instanceCustomNodePost.json +679 -0
  135. data/schemas/instanceCustomNodes.json +634 -0
  136. data/schemas/instanceMember.json +2 -2
  137. data/schemas/instanceMembers.json +2 -2
  138. data/schemas/instanceOrg.json +8 -0
  139. data/schemas/instanceOrgMember.json +2 -2
  140. data/schemas/instanceOrgs.json +8 -0
  141. data/schemas/integration.json +30 -2
  142. data/schemas/integrationPatch.json +30 -2
  143. data/schemas/integrationPost.json +30 -2
  144. data/schemas/integrations.json +30 -2
  145. data/schemas/me.json +2 -2
  146. data/schemas/mePatch.json +0 -1
  147. data/schemas/org.json +2 -2
  148. data/schemas/orgs.json +2 -2
  149. data/schemas/paletteResponse.json +785 -0
  150. data/schemas/userCredentials.json +13 -1
  151. data/schemas/userPost.json +13 -2
  152. metadata +13 -2
data/docs/application.md CHANGED
@@ -421,9 +421,7 @@ all.Application, all.Application.cli, all.Organization, all.User, all.User.cli,
421
421
  Add multiple resources to an application via a zip file
422
422
 
423
423
  ```ruby
424
- result = client.application.import(
425
- applicationId: my_application_id,
426
- importBundle: my_import_bundle)
424
+ result = client.application.import(applicationId: my_application_id)
427
425
 
428
426
  puts result
429
427
  ```
@@ -438,8 +436,9 @@ all.Application, all.Organization, all.User, application.*, or application.impor
438
436
  | Name | Type | Required | Description | Default | Example |
439
437
  | ---- | ---- | -------- | ----------- | ------- | ------- |
440
438
  | applicationId | string | Y | ID of the associated application | | 575ec8687ae143cd83dc4a97 |
441
- | importBundle | file | Y | The zip file containing all of the resources to import into the application | | undefined |
439
+ | importBundle | file | N | The zip file containing all of the resources to import into the application | | undefined |
442
440
  | 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 |
441
+ | options | [Application Import Options](_schemas.md#application-import-options) | N | Additional import options | | [Application Import Options Example](_schemas.md#application-import-options-example) |
443
442
  | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
444
443
 
445
444
  #### Successful Responses
@@ -9,6 +9,7 @@ parameters and the potential responses.
9
9
  * [Delete](#delete)
10
10
  * [Get](#get)
11
11
  * [Patch](#patch)
12
+ * [Send Report](#send-report)
12
13
 
13
14
  <br/>
14
15
 
@@ -131,3 +132,45 @@ all.Application, all.Organization, all.User, applicationDashboard.*, or applicat
131
132
  | ---- | ---- | ----------- |
132
133
  | 400 | [Error](_schemas.md#error) | Error if malformed request |
133
134
  | 404 | [Error](_schemas.md#error) | Error if dashboard was not found |
135
+
136
+ <br/>
137
+
138
+ ## Send Report
139
+
140
+ Sends a snapshot of a dashboard
141
+
142
+ ```ruby
143
+ result = client.application_dashboard.send_report(
144
+ dashboardId: my_dashboard_id,
145
+ applicationId: my_application_id,
146
+ reportConfig: my_report_config)
147
+
148
+ puts result
149
+ ```
150
+
151
+ #### Authentication
152
+ The client must be configured with a valid api access token to call this
153
+ action. The token must include at least one of the following scopes:
154
+ all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, applicationDashboard.*, or applicationDashboard.sendReport.
155
+
156
+ #### Available Parameters
157
+
158
+ | Name | Type | Required | Description | Default | Example |
159
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
160
+ | dashboardId | string | Y | ID of the associated dashboard | | 575ece2b7ae143cd83dc4a9b |
161
+ | applicationId | string | Y | ID of the associated application | | 575ec8687ae143cd83dc4a97 |
162
+ | reportConfig | [Dashboard Send Report](_schemas.md#dashboard-send-report) | Y | Object containing report options | | [Dashboard Send Report Example](_schemas.md#dashboard-send-report-example) |
163
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
164
+
165
+ #### Successful Responses
166
+
167
+ | Code | Type | Description |
168
+ | ---- | ---- | ----------- |
169
+ | 200 | [Success](_schemas.md#success) | Send dashboard report |
170
+
171
+ #### Error Responses
172
+
173
+ | Code | Type | Description |
174
+ | ---- | ---- | ----------- |
175
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
176
+ | 404 | [Error](_schemas.md#error) | Error if dashboard was not found |
data/docs/applications.md CHANGED
@@ -61,7 +61,7 @@ all.Organization, all.Organization.read, all.User, all.User.cli, all.User.read,
61
61
  Create a new application from an import bundle
62
62
 
63
63
  ```ruby
64
- result = client.applications.import(importBundle: my_import_bundle)
64
+ result = client.applications.import(optional_params)
65
65
 
66
66
  puts result
67
67
  ```
@@ -75,13 +75,14 @@ all.Organization, all.User, applications.*, or applications.import.
75
75
 
76
76
  | Name | Type | Required | Description | Default | Example |
77
77
  | ---- | ---- | -------- | ----------- | ------- | ------- |
78
- | importBundle | file | Y | The zip file containing the application to import and all of its resources | | undefined |
78
+ | importBundle | file | N | The zip file containing the application to import and all of its resources | | undefined |
79
79
  | ownerId | string | N | The owner id of the new application, defaults to the id of the user making the request | | 575ed6e87ae143cd83dc4aa8 |
80
80
  | ownerType | string | N | The type of the owner id. Accepted values are: user, organization | user | user |
81
81
  | includeDevices | string | N | If set, import devices from the import bundle | | true |
82
82
  | includeDataTableRows | string | N | If set, import data table rows from import bundle | | true |
83
83
  | includeFiles | string | N | If set, import files from import bundle | | true |
84
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
+ | options | [Application Import Options](_schemas.md#application-import-options) | N | Additional import options | | [Application Import Options Example](_schemas.md#application-import-options-example) |
85
86
  | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
86
87
 
87
88
  #### Successful Responses
data/docs/devices.md CHANGED
@@ -8,6 +8,7 @@ parameters and the potential responses.
8
8
 
9
9
  * [Attribute Names](#attribute-names)
10
10
  * [Delete](#delete)
11
+ * [Device Names](#device-names)
11
12
  * [Export](#export)
12
13
  * [Get](#get)
13
14
  * [Patch](#patch)
@@ -101,6 +102,45 @@ all.Application, all.Organization, all.User, devices.*, or devices.delete.
101
102
 
102
103
  <br/>
103
104
 
105
+ ## Device Names
106
+
107
+ Gets the device names that match the given query. Maximum 1K returned.
108
+
109
+ ```ruby
110
+ result = client.devices.device_names(applicationId: my_application_id)
111
+
112
+ puts result
113
+ ```
114
+
115
+ #### Authentication
116
+ The client must be configured with a valid api access token to call this
117
+ action. The token must include at least one of the following scopes:
118
+ all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, devices.*, or devices.deviceNames.
119
+
120
+ #### Available Parameters
121
+
122
+ | Name | Type | Required | Description | Default | Example |
123
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
124
+ | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
125
+ | query | [Advanced Device Query](_schemas.md#advanced-device-query) | N | Device filter JSON object | | [Advanced Device Query Example](_schemas.md#advanced-device-query-example) |
126
+ | startsWith | string | N | Filter devices down to those that have names starting with the given string. Case insensitive. | | temper |
127
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
128
+
129
+ #### Successful Responses
130
+
131
+ | Code | Type | Description |
132
+ | ---- | ---- | ----------- |
133
+ | 200 | [Device Names Response](_schemas.md#device-names-response) | The matching device names |
134
+
135
+ #### Error Responses
136
+
137
+ | Code | Type | Description |
138
+ | ---- | ---- | ----------- |
139
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
140
+ | 404 | [Error](_schemas.md#error) | Error if application was not found |
141
+
142
+ <br/>
143
+
104
144
  ## Export
105
145
 
106
146
  Creates an export of all device metadata
data/docs/flows.md CHANGED
@@ -9,6 +9,7 @@ parameters and the potential responses.
9
9
  * [Get](#get)
10
10
  * [Get by Version](#get-by-version)
11
11
  * [Import](#import)
12
+ * [Palette](#palette)
12
13
  * [Post](#post)
13
14
 
14
15
  <br/>
@@ -151,6 +152,43 @@ all.Application, all.Organization, all.User, flows.*, or flows.import.
151
152
 
152
153
  <br/>
153
154
 
155
+ ## Palette
156
+
157
+ Gets additional nodes that should be available in the palette
158
+
159
+ ```ruby
160
+ result = client.flows.palette(applicationId: my_application_id)
161
+
162
+ puts result
163
+ ```
164
+
165
+ #### Authentication
166
+ The client must be configured with a valid api access token to call this
167
+ action. The token must include at least one of the following scopes:
168
+ all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, flows.*, or flows.palette.
169
+
170
+ #### Available Parameters
171
+
172
+ | Name | Type | Required | Description | Default | Example |
173
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
174
+ | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
175
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
176
+
177
+ #### Successful Responses
178
+
179
+ | Code | Type | Description |
180
+ | ---- | ---- | ----------- |
181
+ | 200 | [Palette Response](_schemas.md#palette-response) | The additional nodes available in the palette |
182
+
183
+ #### Error Responses
184
+
185
+ | Code | Type | Description |
186
+ | ---- | ---- | ----------- |
187
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
188
+ | 404 | [Error](_schemas.md#error) | Error if application was not found |
189
+
190
+ <br/>
191
+
154
192
  ## Post
155
193
 
156
194
  Create a new flow for an application
@@ -0,0 +1,222 @@
1
+ # Instance Custom Node Actions
2
+
3
+ Details on the various actions that can be performed on the
4
+ Instance Custom Node resource, including the expected
5
+ parameters and the potential responses.
6
+
7
+ ##### Contents
8
+
9
+ * [Delete](#delete)
10
+ * [Errors](#errors)
11
+ * [Get](#get)
12
+ * [Patch](#patch)
13
+ * [Stats](#stats)
14
+
15
+ <br/>
16
+
17
+ ## Delete
18
+
19
+ Deletes a Custom Node
20
+
21
+ ```ruby
22
+ result = client.instance_custom_node.delete(
23
+ instanceId: my_instance_id,
24
+ instanceCustomNodeId: my_instance_custom_node_id)
25
+
26
+ puts result
27
+ ```
28
+
29
+ #### Authentication
30
+ The client must be configured with a valid api access token to call this
31
+ action. The token must include at least one of the following scopes:
32
+ all.Instance, all.User, instanceCustomNode.*, or instanceCustomNode.delete.
33
+
34
+ #### Available Parameters
35
+
36
+ | Name | Type | Required | Description | Default | Example |
37
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
38
+ | instanceId | string | Y | ID associated with the instance | | 575ec7417ae143cd83dc4a96 |
39
+ | instanceCustomNodeId | string | Y | ID associated with the Custom Node | | 575ec7417ae143cd83dc4a95 |
40
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
41
+
42
+ #### Successful Responses
43
+
44
+ | Code | Type | Description |
45
+ | ---- | ---- | ----------- |
46
+ | 200 | [Success](_schemas.md#success) | If Custom Node was successfully deleted |
47
+
48
+ #### Error Responses
49
+
50
+ | Code | Type | Description |
51
+ | ---- | ---- | ----------- |
52
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
53
+ | 404 | [Error](_schemas.md#error) | Error if Custom Node was not found |
54
+
55
+ <br/>
56
+
57
+ ## Errors
58
+
59
+ Get information about errors that occurred during runs of this Custom Node
60
+
61
+ ```ruby
62
+ result = client.instance_custom_node.errors(
63
+ instanceId: my_instance_id,
64
+ instanceCustomNodeId: my_instance_custom_node_id)
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.Instance, all.Instance.read, all.User, all.User.read, instanceCustomNode.*, or instanceCustomNode.errors.
73
+
74
+ #### Available Parameters
75
+
76
+ | Name | Type | Required | Description | Default | Example |
77
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
78
+ | instanceId | string | Y | ID associated with the instance | | 575ec7417ae143cd83dc4a96 |
79
+ | instanceCustomNodeId | string | Y | ID associated with the Custom Node | | 575ec7417ae143cd83dc4a95 |
80
+ | duration | string | N | Duration of time range in milliseconds | 86400000 | 86400000 |
81
+ | end | string | N | End of time range in milliseconds since epoch | 0 | 0 |
82
+ | limit | string | N | Maximum number of errors to return | 25 | 25 |
83
+ | sortDirection | string | N | Direction to sort the results by. Accepted values are: asc, desc | desc | desc |
84
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
85
+
86
+ #### Successful Responses
87
+
88
+ | Code | Type | Description |
89
+ | ---- | ---- | ----------- |
90
+ | 200 | [Workflow Errors](_schemas.md#workflow-errors) | Custom Node error information |
91
+
92
+ #### Error Responses
93
+
94
+ | Code | Type | Description |
95
+ | ---- | ---- | ----------- |
96
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
97
+ | 404 | [Error](_schemas.md#error) | Error if Custom Node was not found |
98
+
99
+ <br/>
100
+
101
+ ## Get
102
+
103
+ Retrieves information on a Custom Node
104
+
105
+ ```ruby
106
+ result = client.instance_custom_node.get(
107
+ instanceId: my_instance_id,
108
+ instanceCustomNodeId: my_instance_custom_node_id)
109
+
110
+ puts result
111
+ ```
112
+
113
+ #### Authentication
114
+ The client must be configured with a valid api access token to call this
115
+ action. The token must include at least one of the following scopes:
116
+ all.Instance, all.Instance.read, all.User, all.User.read, instanceCustomNode.*, or instanceCustomNode.get.
117
+
118
+ #### Available Parameters
119
+
120
+ | Name | Type | Required | Description | Default | Example |
121
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
122
+ | instanceId | string | Y | ID associated with the instance | | 575ec7417ae143cd83dc4a96 |
123
+ | instanceCustomNodeId | string | Y | ID associated with the Custom Node | | 575ec7417ae143cd83dc4a95 |
124
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
125
+
126
+ #### Successful Responses
127
+
128
+ | Code | Type | Description |
129
+ | ---- | ---- | ----------- |
130
+ | 200 | [Instance Custom Node](_schemas.md#instance-custom-node) | Custom Node information |
131
+
132
+ #### Error Responses
133
+
134
+ | Code | Type | Description |
135
+ | ---- | ---- | ----------- |
136
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
137
+ | 404 | [Error](_schemas.md#error) | Error if Custom Node was not found |
138
+
139
+ <br/>
140
+
141
+ ## Patch
142
+
143
+ Updates information about a Custom Node
144
+
145
+ ```ruby
146
+ result = client.instance_custom_node.patch(
147
+ instanceId: my_instance_id,
148
+ instanceCustomNodeId: my_instance_custom_node_id,
149
+ instanceCustomNode: my_instance_custom_node)
150
+
151
+ puts result
152
+ ```
153
+
154
+ #### Authentication
155
+ The client must be configured with a valid api access token to call this
156
+ action. The token must include at least one of the following scopes:
157
+ all.Instance, all.User, instanceCustomNode.*, or instanceCustomNode.patch.
158
+
159
+ #### Available Parameters
160
+
161
+ | Name | Type | Required | Description | Default | Example |
162
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
163
+ | instanceId | string | Y | ID associated with the instance | | 575ec7417ae143cd83dc4a96 |
164
+ | instanceCustomNodeId | string | Y | ID associated with the Custom Node | | 575ec7417ae143cd83dc4a95 |
165
+ | instanceCustomNode | [Instance Custom Node Patch](_schemas.md#instance-custom-node-patch) | Y | Object containing new properties of the Custom Node | | [Instance Custom Node Patch Example](_schemas.md#instance-custom-node-patch-example) |
166
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
167
+
168
+ #### Successful Responses
169
+
170
+ | Code | Type | Description |
171
+ | ---- | ---- | ----------- |
172
+ | 200 | [Instance Custom Node](_schemas.md#instance-custom-node) | Updated Custom Node information |
173
+
174
+ #### Error Responses
175
+
176
+ | Code | Type | Description |
177
+ | ---- | ---- | ----------- |
178
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
179
+ | 404 | [Error](_schemas.md#error) | Error if Custom Node was not found |
180
+
181
+ <br/>
182
+
183
+ ## Stats
184
+
185
+ Get statistics about runs for this Custom Node
186
+
187
+ ```ruby
188
+ result = client.instance_custom_node.stats(
189
+ instanceId: my_instance_id,
190
+ instanceCustomNodeId: my_instance_custom_node_id)
191
+
192
+ puts result
193
+ ```
194
+
195
+ #### Authentication
196
+ The client must be configured with a valid api access token to call this
197
+ action. The token must include at least one of the following scopes:
198
+ all.Instance, all.Instance.read, all.User, all.User.read, instanceCustomNode.*, or instanceCustomNode.stats.
199
+
200
+ #### Available Parameters
201
+
202
+ | Name | Type | Required | Description | Default | Example |
203
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
204
+ | instanceId | string | Y | ID associated with the instance | | 575ec7417ae143cd83dc4a96 |
205
+ | instanceCustomNodeId | string | Y | ID associated with the Custom Node | | 575ec7417ae143cd83dc4a95 |
206
+ | duration | string | N | Duration of time range in milliseconds | 86400000 | 86400000 |
207
+ | end | string | N | End of time range in milliseconds since epoch | 0 | 0 |
208
+ | resolution | string | N | Resolution in milliseconds | 3600000 | 3600000 |
209
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
210
+
211
+ #### Successful Responses
212
+
213
+ | Code | Type | Description |
214
+ | ---- | ---- | ----------- |
215
+ | 200 | [Workflow Statistics](_schemas.md#workflow-statistics) | Statistics for Custom Node runs |
216
+
217
+ #### Error Responses
218
+
219
+ | Code | Type | Description |
220
+ | ---- | ---- | ----------- |
221
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
222
+ | 404 | [Error](_schemas.md#error) | Error if Custom Node was not found |
@@ -0,0 +1,91 @@
1
+ # Instance Custom Nodes Actions
2
+
3
+ Details on the various actions that can be performed on the
4
+ Instance Custom Nodes resource, including the expected
5
+ parameters and the potential responses.
6
+
7
+ ##### Contents
8
+
9
+ * [Get](#get)
10
+ * [Post](#post)
11
+
12
+ <br/>
13
+
14
+ ## Get
15
+
16
+ Returns the Custom Nodes for an instance
17
+
18
+ ```ruby
19
+ result = client.instance_custom_nodes.get(instanceId: my_instance_id)
20
+
21
+ puts result
22
+ ```
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.Instance, all.Instance.read, all.User, all.User.read, instanceCustomNodes.*, or instanceCustomNodes.get.
28
+
29
+ #### Available Parameters
30
+
31
+ | Name | Type | Required | Description | Default | Example |
32
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
33
+ | instanceId | string | Y | ID associated with the instance | | 575ec7417ae143cd83dc4a96 |
34
+ | sortField | string | N | Field to sort the results by. Accepted values are: name, id, creationDate, lastUpdated | name | name |
35
+ | sortDirection | string | N | Direction to sort the results by. Accepted values are: asc, desc | asc | asc |
36
+ | page | string | N | Which page of results to return | 0 | 0 |
37
+ | perPage | string | N | How many items to return per page | 100 | 10 |
38
+ | filterField | string | N | Field to filter the results by. Blank or not provided means no filtering. Accepted values are: name | | key |
39
+ | filter | string | N | Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering. | | my*node |
40
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
41
+
42
+ #### Successful Responses
43
+
44
+ | Code | Type | Description |
45
+ | ---- | ---- | ----------- |
46
+ | 200 | [Instance Custom Nodes](_schemas.md#instance-custom-nodes) | Collection of Custom Nodes |
47
+
48
+ #### Error Responses
49
+
50
+ | Code | Type | Description |
51
+ | ---- | ---- | ----------- |
52
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
53
+
54
+ <br/>
55
+
56
+ ## Post
57
+
58
+ Create a new Custom Node for an instance
59
+
60
+ ```ruby
61
+ result = client.instance_custom_nodes.post(
62
+ instanceId: my_instance_id,
63
+ instanceCustomNode: my_instance_custom_node)
64
+
65
+ puts result
66
+ ```
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.Instance, all.User, instanceCustomNodes.*, or instanceCustomNodes.post.
72
+
73
+ #### Available Parameters
74
+
75
+ | Name | Type | Required | Description | Default | Example |
76
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
77
+ | instanceId | string | Y | ID associated with the instance | | 575ec7417ae143cd83dc4a96 |
78
+ | instanceCustomNode | [Instance Custom Node Post](_schemas.md#instance-custom-node-post) | Y | Custom Node information | | [Instance Custom Node Post Example](_schemas.md#instance-custom-node-post-example) |
79
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
80
+
81
+ #### Successful Responses
82
+
83
+ | Code | Type | Description |
84
+ | ---- | ---- | ----------- |
85
+ | 201 | [Instance Custom Node](_schemas.md#instance-custom-node) | The successfully created Custom Node |
86
+
87
+ #### Error Responses
88
+
89
+ | Code | Type | Description |
90
+ | ---- | ---- | ----------- |
91
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2021 Losant IoT, Inc.
3
+ # Copyright (c) 2022 Losant IoT, Inc.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2021 Losant IoT, Inc.
3
+ # Copyright (c) 2022 Losant IoT, Inc.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2021 Losant IoT, Inc.
3
+ # Copyright (c) 2022 Losant IoT, Inc.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2021 Losant IoT, Inc.
3
+ # Copyright (c) 2022 Losant IoT, Inc.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2021 Losant IoT, Inc.
3
+ # Copyright (c) 2022 Losant IoT, Inc.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2021 Losant IoT, Inc.
3
+ # Copyright (c) 2022 Losant IoT, Inc.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2021 Losant IoT, Inc.
3
+ # Copyright (c) 2022 Losant IoT, Inc.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2021 Losant IoT, Inc.
3
+ # Copyright (c) 2022 Losant IoT, Inc.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -172,5 +172,54 @@ module LosantRest
172
172
  body: body)
173
173
  end
174
174
 
175
+ # Sends a snapshot of a dashboard
176
+ #
177
+ # Authentication:
178
+ # The client must be configured with a valid api
179
+ # access token to call this action. The token
180
+ # must include at least one of the following scopes:
181
+ # all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, applicationDashboard.*, or applicationDashboard.sendReport.
182
+ #
183
+ # Parameters:
184
+ # * {string} dashboardId - ID of the associated dashboard
185
+ # * {string} applicationId - ID of the associated application
186
+ # * {hash} reportConfig - Object containing report options (https://api.losant.com/#/definitions/dashboardSendReport)
187
+ # * {string} losantdomain - Domain scope of request (rarely needed)
188
+ # * {boolean} _actions - Return resource actions in response
189
+ # * {boolean} _links - Return resource link in response
190
+ # * {boolean} _embedded - Return embedded resources in response
191
+ #
192
+ # Responses:
193
+ # * 200 - Send dashboard report (https://api.losant.com/#/definitions/success)
194
+ #
195
+ # Errors:
196
+ # * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
197
+ # * 404 - Error if dashboard was not found (https://api.losant.com/#/definitions/error)
198
+ def send_report(params = {})
199
+ params = Utils.symbolize_hash_keys(params)
200
+ query_params = { _actions: false, _links: true, _embedded: true }
201
+ headers = {}
202
+ body = nil
203
+
204
+ raise ArgumentError.new("dashboardId is required") unless params.has_key?(:dashboardId)
205
+ raise ArgumentError.new("applicationId is required") unless params.has_key?(:applicationId)
206
+ raise ArgumentError.new("reportConfig is required") unless params.has_key?(:reportConfig)
207
+
208
+ body = params[:reportConfig] if params.has_key?(:reportConfig)
209
+ headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
210
+ query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
211
+ query_params[:_links] = params[:_links] if params.has_key?(:_links)
212
+ query_params[:_embedded] = params[:_embedded] if params.has_key?(:_embedded)
213
+
214
+ path = "/applications/#{params[:applicationId]}/dashboards/#{params[:dashboardId]}"
215
+
216
+ @client.request(
217
+ method: :post,
218
+ path: path,
219
+ query: query_params,
220
+ headers: headers,
221
+ body: body)
222
+ end
223
+
175
224
  end
176
225
  end
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2021 Losant IoT, Inc.
3
+ # Copyright (c) 2022 Losant IoT, Inc.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2021 Losant IoT, Inc.
3
+ # Copyright (c) 2022 Losant IoT, Inc.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2021 Losant IoT, Inc.
3
+ # Copyright (c) 2022 Losant IoT, Inc.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal