losant_rest 1.10.2 → 1.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/docs/_schemas.md +21561 -8561
  4. data/docs/application.md +83 -0
  5. data/docs/applicationApiTokens.md +2 -2
  6. data/docs/applicationCertificateAuthorities.md +1 -1
  7. data/docs/applicationCertificates.md +1 -1
  8. data/docs/applicationDashboard.md +133 -0
  9. data/docs/applicationDashboards.md +93 -0
  10. data/docs/applicationKeys.md +4 -3
  11. data/docs/applicationTemplate.md +46 -0
  12. data/docs/applicationTemplates.md +77 -2
  13. data/docs/applications.md +1 -1
  14. data/docs/auditLogs.md +1 -1
  15. data/docs/dashboards.md +1 -1
  16. data/docs/dataTables.md +1 -1
  17. data/docs/device.md +6 -3
  18. data/docs/deviceRecipes.md +1 -1
  19. data/docs/devices.md +130 -4
  20. data/docs/edgeDeployments.md +1 -1
  21. data/docs/events.md +1 -1
  22. data/docs/experienceEndpoint.md +1 -0
  23. data/docs/experienceEndpoints.md +1 -0
  24. data/docs/experienceGroups.md +1 -1
  25. data/docs/experienceUsers.md +1 -1
  26. data/docs/experienceVersions.md +1 -1
  27. data/docs/experienceViews.md +1 -1
  28. data/docs/file.md +4 -4
  29. data/docs/files.md +1 -1
  30. data/docs/flow.md +94 -1
  31. data/docs/flowVersion.md +96 -1
  32. data/docs/flowVersions.md +2 -1
  33. data/docs/flows.md +5 -2
  34. data/docs/integration.md +1 -0
  35. data/docs/integrations.md +1 -1
  36. data/docs/me.md +0 -36
  37. data/docs/notebooks.md +1 -1
  38. data/docs/orgs.md +1 -1
  39. data/docs/webhook.md +1 -0
  40. data/docs/webhooks.md +1 -1
  41. data/lib/losant_rest.rb +3 -0
  42. data/lib/losant_rest/application.rb +95 -0
  43. data/lib/losant_rest/application_api_tokens.rb +1 -1
  44. data/lib/losant_rest/application_dashboard.rb +176 -0
  45. data/lib/losant_rest/application_dashboards.rb +138 -0
  46. data/lib/losant_rest/application_keys.rb +3 -0
  47. data/lib/losant_rest/application_template.rb +79 -0
  48. data/lib/losant_rest/application_templates.rb +89 -1
  49. data/lib/losant_rest/client.rb +14 -2
  50. data/lib/losant_rest/device.rb +9 -3
  51. data/lib/losant_rest/devices.rb +154 -1
  52. data/lib/losant_rest/experience_endpoint.rb +2 -0
  53. data/lib/losant_rest/experience_endpoints.rb +2 -0
  54. data/lib/losant_rest/file.rb +3 -3
  55. data/lib/losant_rest/flow.rb +115 -1
  56. data/lib/losant_rest/flow_version.rb +115 -1
  57. data/lib/losant_rest/flow_versions.rb +3 -0
  58. data/lib/losant_rest/flows.rb +8 -0
  59. data/lib/losant_rest/integration.rb +2 -0
  60. data/lib/losant_rest/me.rb +0 -41
  61. data/lib/losant_rest/version.rb +1 -1
  62. data/lib/losant_rest/webhook.rb +2 -0
  63. data/schemas/advancedApplicationKeyQuery.json +1082 -0
  64. data/schemas/advancedFlowByVersionQuery.json +665 -0
  65. data/schemas/advancedFlowQuery.json +883 -0
  66. data/schemas/advancedFlowVersionQuery.json +925 -0
  67. data/schemas/application.json +8 -0
  68. data/schemas/applicationApiTokenPost.json +16 -1
  69. data/schemas/applicationApplyTemplatePatch.json +19 -0
  70. data/schemas/applicationCreationByTemplateResult.json +8 -0
  71. data/schemas/applicationDashboardPost.json +5665 -0
  72. data/schemas/applicationGlobalPatch.json +33 -0
  73. data/schemas/applicationPost.json +8 -0
  74. data/schemas/applicationTemplate.json +20 -0
  75. data/schemas/applicationTemplateCategories.json +43 -0
  76. data/schemas/applicationTemplateCategory.json +23 -0
  77. data/schemas/applicationTemplates.json +32 -0
  78. data/schemas/applications.json +8 -0
  79. data/schemas/attributeNamesResponse.json +14 -0
  80. data/schemas/authedUser.json +3 -0
  81. data/schemas/changePassword.json +2 -2
  82. data/schemas/dashboard.json +195 -26
  83. data/schemas/dashboardPatch.json +195 -26
  84. data/schemas/dashboardPost.json +195 -26
  85. data/schemas/dashboards.json +195 -26
  86. data/schemas/dataExport.json +132 -1
  87. data/schemas/deviceAttributeDataTypeFilter.json +29 -0
  88. data/schemas/deviceClassFilter.json +1 -2
  89. data/schemas/eventPost.json +22 -0
  90. data/schemas/experienceDomain.json +1 -1
  91. data/schemas/experienceDomainPatch.json +1 -1
  92. data/schemas/experienceDomainPost.json +1 -1
  93. data/schemas/experienceDomains.json +1 -1
  94. data/schemas/experienceLinkedResources.json +96 -0
  95. data/schemas/experienceVersion.json +10 -1
  96. data/schemas/experienceVersionPatch.json +9 -0
  97. data/schemas/experienceVersions.json +10 -1
  98. data/schemas/files.json +3 -0
  99. data/schemas/flow.json +32 -0
  100. data/schemas/flowErrors.json +87 -0
  101. data/schemas/flowPatch.json +32 -0
  102. data/schemas/flowPost.json +32 -0
  103. data/schemas/flowStats.json +54 -0
  104. data/schemas/flowVersion.json +64 -0
  105. data/schemas/flowVersionPost.json +32 -0
  106. data/schemas/flowVersions.json +64 -0
  107. data/schemas/flows.json +32 -0
  108. data/schemas/flowsImportPost.json +64 -0
  109. data/schemas/flowsImportResult.json +96 -0
  110. data/schemas/githubLogin.json +33 -4
  111. data/schemas/instance.json +132 -0
  112. data/schemas/instanceOrg.json +119 -0
  113. data/schemas/instanceOrgPatch.json +103 -0
  114. data/schemas/instanceOrgPost.json +114 -0
  115. data/schemas/instanceOrgs.json +160 -0
  116. data/schemas/instances.json +43 -0
  117. data/schemas/integration.json +3 -0
  118. data/schemas/integrationPatch.json +3 -0
  119. data/schemas/integrationPost.json +3 -0
  120. data/schemas/integrations.json +3 -0
  121. data/schemas/me.json +3 -3
  122. data/schemas/mePatch.json +2 -2
  123. data/schemas/notebook.json +96 -0
  124. data/schemas/notebookExecutionLogs.json +7 -0
  125. data/schemas/notebookPatch.json +96 -0
  126. data/schemas/notebookPost.json +96 -0
  127. data/schemas/notebooks.json +96 -0
  128. data/schemas/org.json +1 -1
  129. data/schemas/orgInviteInfo.json +3 -0
  130. data/schemas/orgInvitePost.json +3 -0
  131. data/schemas/orgInvites.json +3 -0
  132. data/schemas/orgPatch.json +1 -1
  133. data/schemas/orgs.json +1 -1
  134. data/schemas/passwordResetFinish.json +2 -2
  135. data/schemas/samlResponse.json +1 -1
  136. data/schemas/tagKeysResponse.json +14 -0
  137. data/schemas/tagValuesResponse.json +19 -0
  138. data/schemas/templateKeywords.json +14 -0
  139. data/schemas/timeSeriesData.json +12 -2
  140. data/schemas/timeSeriesQuery.json +94 -14
  141. data/schemas/userCredentials.json +31 -3
  142. data/schemas/userPost.json +39 -7
  143. metadata +34 -6
@@ -42,6 +42,7 @@ module LosantRest
42
42
  # Parameters:
43
43
  # * {string} applicationId - ID associated with the application
44
44
  # * {string} experienceEndpointId - ID associated with the experience endpoint
45
+ # * {string} includeWorkflows - If the workflows that utilize this experience endpoint should also be deleted.
45
46
  # * {string} losantdomain - Domain scope of request (rarely needed)
46
47
  # * {boolean} _actions - Return resource actions in response
47
48
  # * {boolean} _links - Return resource link in response
@@ -62,6 +63,7 @@ module LosantRest
62
63
  raise ArgumentError.new("applicationId is required") unless params.has_key?(:applicationId)
63
64
  raise ArgumentError.new("experienceEndpointId is required") unless params.has_key?(:experienceEndpointId)
64
65
 
66
+ query_params[:includeWorkflows] = params[:includeWorkflows] if params.has_key?(:includeWorkflows)
65
67
  headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
66
68
  query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
67
69
  query_params[:_links] = params[:_links] if params.has_key?(:_links)
@@ -148,6 +148,7 @@ module LosantRest
148
148
  # * {string} applicationId - ID associated with the application
149
149
  # * {string} statGrouping - Field to group the statistics by. Accepted values are: statusCode, endpointId, version, domain
150
150
  # * {string} duration - Duration in milliseconds
151
+ # * {string} end - End of time range in milliseconds since epoch
151
152
  # * {string} resolution - Resolution in milliseconds
152
153
  # * {string} versionFilter - Filters the stats to a particular experience version
153
154
  # * {string} domainFilter - Filters the stats to a particular experience domain or slug
@@ -174,6 +175,7 @@ module LosantRest
174
175
 
175
176
  query_params[:statGrouping] = params[:statGrouping] if params.has_key?(:statGrouping)
176
177
  query_params[:duration] = params[:duration] if params.has_key?(:duration)
178
+ query_params[:end] = params[:end] if params.has_key?(:end)
177
179
  query_params[:resolution] = params[:resolution] if params.has_key?(:resolution)
178
180
  query_params[:versionFilter] = params[:versionFilter] if params.has_key?(:versionFilter)
179
181
  query_params[:domainFilter] = params[:domainFilter] if params.has_key?(:domainFilter)
@@ -52,7 +52,7 @@ module LosantRest
52
52
  #
53
53
  # Errors:
54
54
  # * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
55
- # * 404 - Error if event was not found (https://api.losant.com/#/definitions/error)
55
+ # * 404 - Error if file was not found (https://api.losant.com/#/definitions/error)
56
56
  def delete(params = {})
57
57
  params = Utils.symbolize_hash_keys(params)
58
58
  query_params = { _actions: false, _links: true, _embedded: true }
@@ -146,7 +146,7 @@ module LosantRest
146
146
  #
147
147
  # Errors:
148
148
  # * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
149
- # * 404 - Error if application was not found (https://api.losant.com/#/definitions/error)
149
+ # * 404 - Error if file was not found (https://api.losant.com/#/definitions/error)
150
150
  def move(params = {})
151
151
  params = Utils.symbolize_hash_keys(params)
152
152
  query_params = { _actions: false, _links: true, _embedded: true }
@@ -195,7 +195,7 @@ module LosantRest
195
195
  #
196
196
  # Errors:
197
197
  # * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
198
- # * 404 - Error if application was not found (https://api.losant.com/#/definitions/error)
198
+ # * 404 - Error if file was not found (https://api.losant.com/#/definitions/error)
199
199
  def patch(params = {})
200
200
  params = Utils.symbolize_hash_keys(params)
201
201
  query_params = { _actions: false, _links: true, _embedded: true }
@@ -123,6 +123,64 @@ module LosantRest
123
123
  body: body)
124
124
  end
125
125
 
126
+ # Get information about errors that occurred during runs of this workflow
127
+ #
128
+ # Authentication:
129
+ # The client must be configured with a valid api
130
+ # access token to call this action. The token
131
+ # must include at least one of the following scopes:
132
+ # all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, flow.*, or flow.errors.
133
+ #
134
+ # Parameters:
135
+ # * {string} applicationId - ID associated with the application
136
+ # * {string} flowId - ID associated with the flow
137
+ # * {string} duration - Duration of time range in milliseconds
138
+ # * {string} end - End of time range in milliseconds since epoch
139
+ # * {string} limit - Maximum number of errors to return
140
+ # * {string} sortDirection - Direction to sort the results by. Accepted values are: asc, desc
141
+ # * {string} flowVersion - Flow version name or ID. When not included, will be errors for all versions. Pass develop for just the develop version.
142
+ # * {string} deviceId - For edge workflows, the Device ID to return workflow errors for. When not included, will be errors for all device IDs.
143
+ # * {string} losantdomain - Domain scope of request (rarely needed)
144
+ # * {boolean} _actions - Return resource actions in response
145
+ # * {boolean} _links - Return resource link in response
146
+ # * {boolean} _embedded - Return embedded resources in response
147
+ #
148
+ # Responses:
149
+ # * 200 - Workflow error information (https://api.losant.com/#/definitions/flowErrors)
150
+ #
151
+ # Errors:
152
+ # * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
153
+ # * 404 - Error if flow was not found (https://api.losant.com/#/definitions/error)
154
+ def errors(params = {})
155
+ params = Utils.symbolize_hash_keys(params)
156
+ query_params = { _actions: false, _links: true, _embedded: true }
157
+ headers = {}
158
+ body = nil
159
+
160
+ raise ArgumentError.new("applicationId is required") unless params.has_key?(:applicationId)
161
+ raise ArgumentError.new("flowId is required") unless params.has_key?(:flowId)
162
+
163
+ query_params[:duration] = params[:duration] if params.has_key?(:duration)
164
+ query_params[:end] = params[:end] if params.has_key?(:end)
165
+ query_params[:limit] = params[:limit] if params.has_key?(:limit)
166
+ query_params[:sortDirection] = params[:sortDirection] if params.has_key?(:sortDirection)
167
+ query_params[:flowVersion] = params[:flowVersion] if params.has_key?(:flowVersion)
168
+ query_params[:deviceId] = params[:deviceId] if params.has_key?(:deviceId)
169
+ headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
170
+ query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
171
+ query_params[:_links] = params[:_links] if params.has_key?(:_links)
172
+ query_params[:_embedded] = params[:_embedded] if params.has_key?(:_embedded)
173
+
174
+ path = "/applications/#{params[:applicationId]}/flows/#{params[:flowId]}/errors"
175
+
176
+ @client.request(
177
+ method: :get,
178
+ path: path,
179
+ query: query_params,
180
+ headers: headers,
181
+ body: body)
182
+ end
183
+
126
184
  # Retrieves information on a flow
127
185
  #
128
186
  # Authentication:
@@ -194,7 +252,7 @@ module LosantRest
194
252
  #
195
253
  # Errors:
196
254
  # * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
197
- # * 404 - Error if device was not found (https://api.losant.com/#/definitions/error)
255
+ # * 404 - Error if flow was not found (https://api.losant.com/#/definitions/error)
198
256
  def get_log_entries(params = {})
199
257
  params = Utils.symbolize_hash_keys(params)
200
258
  query_params = { _actions: false, _links: true, _embedded: true }
@@ -416,5 +474,61 @@ module LosantRest
416
474
  body: body)
417
475
  end
418
476
 
477
+ # Get statistics about workflow runs for this workflow
478
+ #
479
+ # Authentication:
480
+ # The client must be configured with a valid api
481
+ # access token to call this action. The token
482
+ # must include at least one of the following scopes:
483
+ # all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, flow.*, or flow.stats.
484
+ #
485
+ # Parameters:
486
+ # * {string} applicationId - ID associated with the application
487
+ # * {string} flowId - ID associated with the flow
488
+ # * {string} duration - Duration of time range in milliseconds
489
+ # * {string} end - End of time range in milliseconds since epoch
490
+ # * {string} resolution - Resolution in milliseconds
491
+ # * {string} flowVersion - Flow version name or ID. When not included, will be aggregate for all versions. Pass develop for just the develop version.
492
+ # * {string} deviceId - For edge workflows, the device ID to return workflow stats for. When not included, will be aggregate for all device IDs.
493
+ # * {string} losantdomain - Domain scope of request (rarely needed)
494
+ # * {boolean} _actions - Return resource actions in response
495
+ # * {boolean} _links - Return resource link in response
496
+ # * {boolean} _embedded - Return embedded resources in response
497
+ #
498
+ # Responses:
499
+ # * 200 - Statistics for workflow runs (https://api.losant.com/#/definitions/flowStats)
500
+ #
501
+ # Errors:
502
+ # * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
503
+ # * 404 - Error if flow was not found (https://api.losant.com/#/definitions/error)
504
+ def stats(params = {})
505
+ params = Utils.symbolize_hash_keys(params)
506
+ query_params = { _actions: false, _links: true, _embedded: true }
507
+ headers = {}
508
+ body = nil
509
+
510
+ raise ArgumentError.new("applicationId is required") unless params.has_key?(:applicationId)
511
+ raise ArgumentError.new("flowId is required") unless params.has_key?(:flowId)
512
+
513
+ query_params[:duration] = params[:duration] if params.has_key?(:duration)
514
+ query_params[:end] = params[:end] if params.has_key?(:end)
515
+ query_params[:resolution] = params[:resolution] if params.has_key?(:resolution)
516
+ query_params[:flowVersion] = params[:flowVersion] if params.has_key?(:flowVersion)
517
+ query_params[:deviceId] = params[:deviceId] if params.has_key?(:deviceId)
518
+ headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
519
+ query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
520
+ query_params[:_links] = params[:_links] if params.has_key?(:_links)
521
+ query_params[:_embedded] = params[:_embedded] if params.has_key?(:_embedded)
522
+
523
+ path = "/applications/#{params[:applicationId]}/flows/#{params[:flowId]}/stats"
524
+
525
+ @client.request(
526
+ method: :get,
527
+ path: path,
528
+ query: query_params,
529
+ headers: headers,
530
+ body: body)
531
+ end
532
+
419
533
  end
420
534
  end
@@ -79,6 +79,64 @@ module LosantRest
79
79
  body: body)
80
80
  end
81
81
 
82
+ # Get information about errors that occurred during runs of this workflow version
83
+ #
84
+ # Authentication:
85
+ # The client must be configured with a valid api
86
+ # access token to call this action. The token
87
+ # must include at least one of the following scopes:
88
+ # all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, flowVersion.*, or flowVersion.errors.
89
+ #
90
+ # Parameters:
91
+ # * {string} applicationId - ID associated with the application
92
+ # * {string} flowId - ID associated with the flow
93
+ # * {string} flowVersionId - Version ID or version name associated with the flow version
94
+ # * {string} duration - Duration of time range in milliseconds
95
+ # * {string} end - End of time range in milliseconds since epoch
96
+ # * {string} limit - Maximum number of errors to return
97
+ # * {string} sortDirection - Direction to sort the results by. Accepted values are: asc, desc
98
+ # * {string} deviceId - For edge workflows, the Device ID to return workflow errors for. When not included, will be errors for all device IDs.
99
+ # * {string} losantdomain - Domain scope of request (rarely needed)
100
+ # * {boolean} _actions - Return resource actions in response
101
+ # * {boolean} _links - Return resource link in response
102
+ # * {boolean} _embedded - Return embedded resources in response
103
+ #
104
+ # Responses:
105
+ # * 200 - Workflow error information (https://api.losant.com/#/definitions/flowErrors)
106
+ #
107
+ # Errors:
108
+ # * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
109
+ # * 404 - Error if flow version was not found (https://api.losant.com/#/definitions/error)
110
+ def errors(params = {})
111
+ params = Utils.symbolize_hash_keys(params)
112
+ query_params = { _actions: false, _links: true, _embedded: true }
113
+ headers = {}
114
+ body = nil
115
+
116
+ raise ArgumentError.new("applicationId is required") unless params.has_key?(:applicationId)
117
+ raise ArgumentError.new("flowId is required") unless params.has_key?(:flowId)
118
+ raise ArgumentError.new("flowVersionId is required") unless params.has_key?(:flowVersionId)
119
+
120
+ query_params[:duration] = params[:duration] if params.has_key?(:duration)
121
+ query_params[:end] = params[:end] if params.has_key?(:end)
122
+ query_params[:limit] = params[:limit] if params.has_key?(:limit)
123
+ query_params[:sortDirection] = params[:sortDirection] if params.has_key?(:sortDirection)
124
+ query_params[:deviceId] = params[:deviceId] if params.has_key?(:deviceId)
125
+ headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
126
+ query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
127
+ query_params[:_links] = params[:_links] if params.has_key?(:_links)
128
+ query_params[:_embedded] = params[:_embedded] if params.has_key?(:_embedded)
129
+
130
+ path = "/applications/#{params[:applicationId]}/flows/#{params[:flowId]}/versions/#{params[:flowVersionId]}/errors"
131
+
132
+ @client.request(
133
+ method: :get,
134
+ path: path,
135
+ query: query_params,
136
+ headers: headers,
137
+ body: body)
138
+ end
139
+
82
140
  # Retrieves information on a flow version
83
141
  #
84
142
  # Authentication:
@@ -153,7 +211,7 @@ module LosantRest
153
211
  #
154
212
  # Errors:
155
213
  # * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
156
- # * 404 - Error if device was not found (https://api.losant.com/#/definitions/error)
214
+ # * 404 - Error if flow version was not found (https://api.losant.com/#/definitions/error)
157
215
  def get_log_entries(params = {})
158
216
  params = Utils.symbolize_hash_keys(params)
159
217
  query_params = { _actions: false, _links: true, _embedded: true }
@@ -234,5 +292,61 @@ module LosantRest
234
292
  body: body)
235
293
  end
236
294
 
295
+ # Get statistics about workflow runs for this workflow version
296
+ #
297
+ # Authentication:
298
+ # The client must be configured with a valid api
299
+ # access token to call this action. The token
300
+ # must include at least one of the following scopes:
301
+ # all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, flowVersion.*, or flowVersion.stats.
302
+ #
303
+ # Parameters:
304
+ # * {string} applicationId - ID associated with the application
305
+ # * {string} flowId - ID associated with the flow
306
+ # * {string} flowVersionId - Version ID or version name associated with the flow version
307
+ # * {string} duration - Duration of time range in milliseconds
308
+ # * {string} end - End of time range in milliseconds since epoch
309
+ # * {string} resolution - Resolution in milliseconds
310
+ # * {string} deviceId - For edge workflows, the device ID to return workflow stats for. When not included, will be aggregate for all device IDs.
311
+ # * {string} losantdomain - Domain scope of request (rarely needed)
312
+ # * {boolean} _actions - Return resource actions in response
313
+ # * {boolean} _links - Return resource link in response
314
+ # * {boolean} _embedded - Return embedded resources in response
315
+ #
316
+ # Responses:
317
+ # * 200 - Statistics for workflow runs (https://api.losant.com/#/definitions/flowStats)
318
+ #
319
+ # Errors:
320
+ # * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
321
+ # * 404 - Error if flow version was not found (https://api.losant.com/#/definitions/error)
322
+ def stats(params = {})
323
+ params = Utils.symbolize_hash_keys(params)
324
+ query_params = { _actions: false, _links: true, _embedded: true }
325
+ headers = {}
326
+ body = nil
327
+
328
+ raise ArgumentError.new("applicationId is required") unless params.has_key?(:applicationId)
329
+ raise ArgumentError.new("flowId is required") unless params.has_key?(:flowId)
330
+ raise ArgumentError.new("flowVersionId is required") unless params.has_key?(:flowVersionId)
331
+
332
+ query_params[:duration] = params[:duration] if params.has_key?(:duration)
333
+ query_params[:end] = params[:end] if params.has_key?(:end)
334
+ query_params[:resolution] = params[:resolution] if params.has_key?(:resolution)
335
+ query_params[:deviceId] = params[:deviceId] if params.has_key?(:deviceId)
336
+ headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
337
+ query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
338
+ query_params[:_links] = params[:_links] if params.has_key?(:_links)
339
+ query_params[:_embedded] = params[:_embedded] if params.has_key?(:_embedded)
340
+
341
+ path = "/applications/#{params[:applicationId]}/flows/#{params[:flowId]}/versions/#{params[:flowVersionId]}/stats"
342
+
343
+ @client.request(
344
+ method: :get,
345
+ path: path,
346
+ query: query_params,
347
+ headers: headers,
348
+ body: body)
349
+ end
350
+
237
351
  end
238
352
  end
@@ -49,6 +49,7 @@ module LosantRest
49
49
  # * {string} filterField - Field to filter the results by. Blank or not provided means no filtering. Accepted values are: version
50
50
  # * {string} filter - Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering.
51
51
  # * {string} includeCustomNodes - If the result of the request should also include the details of any custom nodes referenced by the returned workflows
52
+ # * {hash} query - Workflow filter JSON object which overrides the filterField and filter parameters. (https://api.losant.com/#/definitions/advancedFlowVersionQuery)
52
53
  # * {string} losantdomain - Domain scope of request (rarely needed)
53
54
  # * {boolean} _actions - Return resource actions in response
54
55
  # * {boolean} _links - Return resource link in response
@@ -76,6 +77,8 @@ module LosantRest
76
77
  query_params[:filterField] = params[:filterField] if params.has_key?(:filterField)
77
78
  query_params[:filter] = params[:filter] if params.has_key?(:filter)
78
79
  query_params[:includeCustomNodes] = params[:includeCustomNodes] if params.has_key?(:includeCustomNodes)
80
+ query_params[:query] = params[:query] if params.has_key?(:query)
81
+ query_params[:query] = JSON.dump(query_params[:query]) if query_params.has_key?(:query)
79
82
  headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
80
83
  query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
81
84
  query_params[:_links] = params[:_links] if params.has_key?(:_links)
@@ -50,6 +50,8 @@ module LosantRest
50
50
  # * {string} flowClass - Filter the workflows by the given flow class. Accepted values are: edge, cloud, customNode, experience
51
51
  # * {hash} triggerFilter - Array of triggers to filter by - always filters against default flow version. (https://api.losant.com/#/definitions/flowTriggerFilter)
52
52
  # * {string} includeCustomNodes - If the result of the request should also include the details of any custom nodes referenced by the returned workflows
53
+ # * {hash} query - Workflow filter JSON object which overrides the filterField, filter, triggerFilter, and flowClass parameters. (https://api.losant.com/#/definitions/advancedFlowQuery)
54
+ # * {string} allVersions - If the request should also return flows with matching versions. Only applicable for requests with an advanced query.
53
55
  # * {string} losantdomain - Domain scope of request (rarely needed)
54
56
  # * {boolean} _actions - Return resource actions in response
55
57
  # * {boolean} _links - Return resource link in response
@@ -78,6 +80,9 @@ module LosantRest
78
80
  query_params[:flowClass] = params[:flowClass] if params.has_key?(:flowClass)
79
81
  query_params[:triggerFilter] = params[:triggerFilter] if params.has_key?(:triggerFilter)
80
82
  query_params[:includeCustomNodes] = params[:includeCustomNodes] if params.has_key?(:includeCustomNodes)
83
+ query_params[:query] = params[:query] if params.has_key?(:query)
84
+ query_params[:query] = JSON.dump(query_params[:query]) if query_params.has_key?(:query)
85
+ query_params[:allVersions] = params[:allVersions] if params.has_key?(:allVersions)
81
86
  headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
82
87
  query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
83
88
  query_params[:_links] = params[:_links] if params.has_key?(:_links)
@@ -113,6 +118,7 @@ module LosantRest
113
118
  # * {string} version - Return the workflow versions for the given version.
114
119
  # * {hash} triggerFilter - Array of triggers to filter by - always filters against default flow version. (https://api.losant.com/#/definitions/flowTriggerFilter)
115
120
  # * {string} includeCustomNodes - If the result of the request should also include the details of any custom nodes referenced by the returned workflows
121
+ # * {hash} query - Workflow filter JSON object which overrides the filterField, filter, triggerFilter, and flowClass parameters. (https://api.losant.com/#/definitions/advancedFlowByVersionQuery)
116
122
  # * {string} losantdomain - Domain scope of request (rarely needed)
117
123
  # * {boolean} _actions - Return resource actions in response
118
124
  # * {boolean} _links - Return resource link in response
@@ -143,6 +149,8 @@ module LosantRest
143
149
  query_params[:version] = params[:version] if params.has_key?(:version)
144
150
  query_params[:triggerFilter] = params[:triggerFilter] if params.has_key?(:triggerFilter)
145
151
  query_params[:includeCustomNodes] = params[:includeCustomNodes] if params.has_key?(:includeCustomNodes)
152
+ query_params[:query] = params[:query] if params.has_key?(:query)
153
+ query_params[:query] = JSON.dump(query_params[:query]) if query_params.has_key?(:query)
146
154
  headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
147
155
  query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
148
156
  query_params[:_links] = params[:_links] if params.has_key?(:_links)
@@ -42,6 +42,7 @@ module LosantRest
42
42
  # Parameters:
43
43
  # * {string} applicationId - ID associated with the application
44
44
  # * {string} integrationId - ID associated with the integration
45
+ # * {string} includeWorkflows - If the workflows that utilize this integration should also be deleted.
45
46
  # * {string} losantdomain - Domain scope of request (rarely needed)
46
47
  # * {boolean} _actions - Return resource actions in response
47
48
  # * {boolean} _links - Return resource link in response
@@ -62,6 +63,7 @@ module LosantRest
62
63
  raise ArgumentError.new("applicationId is required") unless params.has_key?(:applicationId)
63
64
  raise ArgumentError.new("integrationId is required") unless params.has_key?(:integrationId)
64
65
 
66
+ query_params[:includeWorkflows] = params[:includeWorkflows] if params.has_key?(:includeWorkflows)
65
67
  headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
66
68
  query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
67
69
  query_params[:_links] = params[:_links] if params.has_key?(:_links)
@@ -248,47 +248,6 @@ module LosantRest
248
248
  body: body)
249
249
  end
250
250
 
251
- # Disconnects the user from Twitter
252
- #
253
- # Authentication:
254
- # The client must be configured with a valid api
255
- # access token to call this action. The token
256
- # must include at least one of the following scopes:
257
- # all.User, me.*, or me.disconnectTwitter.
258
- #
259
- # Parameters:
260
- # * {string} losantdomain - Domain scope of request (rarely needed)
261
- # * {boolean} _actions - Return resource actions in response
262
- # * {boolean} _links - Return resource link in response
263
- # * {boolean} _embedded - Return embedded resources in response
264
- #
265
- # Responses:
266
- # * 200 - Updated user information (https://api.losant.com/#/definitions/me)
267
- #
268
- # Errors:
269
- # * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
270
- def disconnect_twitter(params = {})
271
- params = Utils.symbolize_hash_keys(params)
272
- query_params = { _actions: false, _links: true, _embedded: true }
273
- headers = {}
274
- body = nil
275
-
276
-
277
- headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
278
- query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
279
- query_params[:_links] = params[:_links] if params.has_key?(:_links)
280
- query_params[:_embedded] = params[:_embedded] if params.has_key?(:_embedded)
281
-
282
- path = "/me/disconnectTwitter"
283
-
284
- @client.request(
285
- method: :patch,
286
- path: path,
287
- query: query_params,
288
- headers: headers,
289
- body: body)
290
- end
291
-
292
251
  # Enables two factor auth for the current user
293
252
  #
294
253
  # Authentication: