losant_rest 1.10.3 → 1.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (212) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +2 -2
  4. data/docs/_schemas.md +27526 -11724
  5. data/docs/application.md +83 -0
  6. data/docs/applicationApiTokens.md +2 -2
  7. data/docs/applicationCertificateAuthorities.md +1 -1
  8. data/docs/applicationCertificates.md +1 -1
  9. data/docs/applicationDashboard.md +133 -0
  10. data/docs/applicationDashboards.md +93 -0
  11. data/docs/applicationKeys.md +4 -3
  12. data/docs/applicationTemplate.md +46 -0
  13. data/docs/applicationTemplates.md +77 -2
  14. data/docs/applications.md +1 -1
  15. data/docs/auditLogs.md +1 -1
  16. data/docs/dashboards.md +1 -1
  17. data/docs/dataTables.md +1 -1
  18. data/docs/device.md +6 -3
  19. data/docs/deviceRecipes.md +1 -1
  20. data/docs/devices.md +125 -1
  21. data/docs/edgeDeployments.md +1 -1
  22. data/docs/events.md +4 -4
  23. data/docs/experienceEndpoint.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/files.md +1 -1
  29. data/docs/flow.md +41 -0
  30. data/docs/flowVersions.md +2 -1
  31. data/docs/flows.md +5 -2
  32. data/docs/instance.md +128 -0
  33. data/docs/instanceMember.md +133 -0
  34. data/docs/instanceMembers.md +91 -0
  35. data/docs/instanceOrg.md +133 -0
  36. data/docs/instanceOrgMember.md +139 -0
  37. data/docs/instanceOrgMembers.md +96 -0
  38. data/docs/instanceOrgs.md +91 -0
  39. data/docs/instances.md +50 -0
  40. data/docs/integration.md +1 -0
  41. data/docs/integrations.md +1 -1
  42. data/docs/me.md +0 -36
  43. data/docs/notebooks.md +1 -1
  44. data/docs/orgs.md +1 -1
  45. data/docs/webhook.md +1 -0
  46. data/docs/webhooks.md +1 -1
  47. data/lib/losant_rest.rb +12 -1
  48. data/lib/losant_rest/application.rb +97 -2
  49. data/lib/losant_rest/application_api_token.rb +1 -1
  50. data/lib/losant_rest/application_api_tokens.rb +2 -2
  51. data/lib/losant_rest/application_certificate.rb +1 -1
  52. data/lib/losant_rest/application_certificate_authorities.rb +1 -1
  53. data/lib/losant_rest/application_certificate_authority.rb +1 -1
  54. data/lib/losant_rest/application_certificates.rb +1 -1
  55. data/lib/losant_rest/application_dashboard.rb +176 -0
  56. data/lib/losant_rest/application_dashboards.rb +138 -0
  57. data/lib/losant_rest/application_key.rb +1 -1
  58. data/lib/losant_rest/application_keys.rb +4 -1
  59. data/lib/losant_rest/application_template.rb +79 -0
  60. data/lib/losant_rest/application_templates.rb +90 -2
  61. data/lib/losant_rest/applications.rb +1 -1
  62. data/lib/losant_rest/audit_log.rb +1 -1
  63. data/lib/losant_rest/audit_logs.rb +1 -1
  64. data/lib/losant_rest/auth.rb +1 -1
  65. data/lib/losant_rest/client.rb +47 -3
  66. data/lib/losant_rest/dashboard.rb +1 -1
  67. data/lib/losant_rest/dashboards.rb +1 -1
  68. data/lib/losant_rest/data.rb +1 -1
  69. data/lib/losant_rest/data_table.rb +1 -1
  70. data/lib/losant_rest/data_table_row.rb +1 -1
  71. data/lib/losant_rest/data_table_rows.rb +1 -1
  72. data/lib/losant_rest/data_tables.rb +1 -1
  73. data/lib/losant_rest/device.rb +10 -4
  74. data/lib/losant_rest/device_recipe.rb +1 -1
  75. data/lib/losant_rest/device_recipes.rb +1 -1
  76. data/lib/losant_rest/devices.rb +153 -1
  77. data/lib/losant_rest/edge_deployments.rb +1 -1
  78. data/lib/losant_rest/error.rb +1 -1
  79. data/lib/losant_rest/event.rb +1 -1
  80. data/lib/losant_rest/events.rb +4 -4
  81. data/lib/losant_rest/experience.rb +1 -1
  82. data/lib/losant_rest/experience_domain.rb +1 -1
  83. data/lib/losant_rest/experience_domains.rb +1 -1
  84. data/lib/losant_rest/experience_endpoint.rb +3 -1
  85. data/lib/losant_rest/experience_endpoints.rb +1 -1
  86. data/lib/losant_rest/experience_group.rb +1 -1
  87. data/lib/losant_rest/experience_groups.rb +1 -1
  88. data/lib/losant_rest/experience_slug.rb +1 -1
  89. data/lib/losant_rest/experience_slugs.rb +1 -1
  90. data/lib/losant_rest/experience_user.rb +1 -1
  91. data/lib/losant_rest/experience_users.rb +1 -1
  92. data/lib/losant_rest/experience_version.rb +1 -1
  93. data/lib/losant_rest/experience_versions.rb +1 -1
  94. data/lib/losant_rest/experience_view.rb +1 -1
  95. data/lib/losant_rest/experience_views.rb +1 -1
  96. data/lib/losant_rest/file.rb +1 -1
  97. data/lib/losant_rest/files.rb +1 -1
  98. data/lib/losant_rest/flow.rb +47 -1
  99. data/lib/losant_rest/flow_version.rb +1 -1
  100. data/lib/losant_rest/flow_versions.rb +4 -1
  101. data/lib/losant_rest/flows.rb +9 -1
  102. data/lib/losant_rest/instance.rb +181 -0
  103. data/lib/losant_rest/instance_member.rb +176 -0
  104. data/lib/losant_rest/instance_members.rb +134 -0
  105. data/lib/losant_rest/instance_org.rb +176 -0
  106. data/lib/losant_rest/instance_org_member.rb +182 -0
  107. data/lib/losant_rest/instance_org_members.rb +138 -0
  108. data/lib/losant_rest/instance_orgs.rb +139 -0
  109. data/lib/losant_rest/instances.rb +88 -0
  110. data/lib/losant_rest/integration.rb +3 -1
  111. data/lib/losant_rest/integrations.rb +1 -1
  112. data/lib/losant_rest/me.rb +2 -43
  113. data/lib/losant_rest/notebook.rb +1 -1
  114. data/lib/losant_rest/notebooks.rb +1 -1
  115. data/lib/losant_rest/org.rb +2 -2
  116. data/lib/losant_rest/org_invites.rb +1 -1
  117. data/lib/losant_rest/orgs.rb +1 -1
  118. data/lib/losant_rest/utils.rb +1 -1
  119. data/lib/losant_rest/version.rb +2 -2
  120. data/lib/losant_rest/webhook.rb +3 -1
  121. data/lib/losant_rest/webhooks.rb +1 -1
  122. data/schemas/advancedApplicationKeyQuery.json +1082 -0
  123. data/schemas/advancedDeviceQuery.json +309 -0
  124. data/schemas/advancedFlowByVersionQuery.json +665 -0
  125. data/schemas/advancedFlowQuery.json +883 -0
  126. data/schemas/advancedFlowVersionQuery.json +925 -0
  127. data/schemas/application.json +8 -0
  128. data/schemas/applicationApiTokenPost.json +12 -0
  129. data/schemas/applicationApplyTemplatePatch.json +19 -0
  130. data/schemas/applicationCreationByTemplateResult.json +8 -0
  131. data/schemas/applicationDashboardPost.json +5683 -0
  132. data/schemas/applicationGlobalPatch.json +33 -0
  133. data/schemas/applicationPost.json +8 -0
  134. data/schemas/applicationTemplate.json +20 -0
  135. data/schemas/applicationTemplateCategories.json +43 -0
  136. data/schemas/applicationTemplateCategory.json +23 -0
  137. data/schemas/applicationTemplates.json +32 -0
  138. data/schemas/applications.json +8 -0
  139. data/schemas/attributeNamesResponse.json +14 -0
  140. data/schemas/authedUser.json +3 -0
  141. data/schemas/changePassword.json +2 -2
  142. data/schemas/dashboard.json +197 -26
  143. data/schemas/dashboardPatch.json +197 -26
  144. data/schemas/dashboardPost.json +197 -26
  145. data/schemas/dashboards.json +197 -26
  146. data/schemas/dataExport.json +132 -1
  147. data/schemas/deviceAttributeDataTypeFilter.json +29 -0
  148. data/schemas/deviceClassFilter.json +1 -2
  149. data/schemas/devicesDeletePost.json +309 -0
  150. data/schemas/devicesExportPost.json +309 -0
  151. data/schemas/devicesPatch.json +309 -0
  152. data/schemas/devicesRemoveDataPost.json +309 -0
  153. data/schemas/experienceLinkedResources.json +96 -0
  154. data/schemas/experienceVersion.json +9 -0
  155. data/schemas/experienceVersionPatch.json +9 -0
  156. data/schemas/experienceVersions.json +9 -0
  157. data/schemas/filePost.json +8 -2
  158. data/schemas/files.json +3 -0
  159. data/schemas/flow.json +32 -0
  160. data/schemas/flowPatch.json +32 -0
  161. data/schemas/flowPost.json +32 -0
  162. data/schemas/flowStorageMetadata.json +13 -0
  163. data/schemas/flowVersion.json +64 -0
  164. data/schemas/flowVersionPost.json +32 -0
  165. data/schemas/flowVersions.json +64 -0
  166. data/schemas/flows.json +32 -0
  167. data/schemas/flowsImportPost.json +64 -0
  168. data/schemas/flowsImportResult.json +96 -0
  169. data/schemas/githubLogin.json +53 -4
  170. data/schemas/historicalSummaries.json +43 -0
  171. data/schemas/historicalSummary.json +455 -0
  172. data/schemas/instance.json +132 -0
  173. data/schemas/instanceMember.json +37 -0
  174. data/schemas/instanceMemberPatch.json +17 -0
  175. data/schemas/instanceMemberPost.json +22 -0
  176. data/schemas/instanceMembers.json +69 -0
  177. data/schemas/instanceOrg.json +133 -0
  178. data/schemas/instanceOrgMember.json +37 -0
  179. data/schemas/instanceOrgMemberPatch.json +69 -0
  180. data/schemas/instanceOrgMemberPost.json +161 -0
  181. data/schemas/instanceOrgMembers.json +34 -0
  182. data/schemas/instanceOrgPatch.json +122 -0
  183. data/schemas/instanceOrgPost.json +125 -0
  184. data/schemas/instanceOrgs.json +174 -0
  185. data/schemas/instanceReportOptionsPost.json +40 -0
  186. data/schemas/instances.json +43 -0
  187. data/schemas/integration.json +3 -0
  188. data/schemas/integrationPatch.json +3 -0
  189. data/schemas/integrationPost.json +3 -0
  190. data/schemas/integrations.json +3 -0
  191. data/schemas/me.json +3 -3
  192. data/schemas/mePatch.json +2 -2
  193. data/schemas/multiDeviceCommand.json +309 -0
  194. data/schemas/notebook.json +7 -0
  195. data/schemas/notebookExecutionLogs.json +7 -0
  196. data/schemas/notebookPatch.json +7 -0
  197. data/schemas/notebookPost.json +7 -0
  198. data/schemas/notebooks.json +7 -0
  199. data/schemas/orgInviteInfo.json +3 -0
  200. data/schemas/orgInvitePost.json +3 -0
  201. data/schemas/orgInvites.json +3 -0
  202. data/schemas/orgPatch.json +0 -9
  203. data/schemas/passwordResetFinish.json +2 -2
  204. data/schemas/payloadStats.json +110 -0
  205. data/schemas/tagKeysResponse.json +14 -0
  206. data/schemas/tagValuesResponse.json +19 -0
  207. data/schemas/templateKeywords.json +14 -0
  208. data/schemas/timeSeriesData.json +12 -2
  209. data/schemas/timeSeriesQuery.json +94 -14
  210. data/schemas/userCredentials.json +51 -3
  211. data/schemas/userPost.json +59 -7
  212. metadata +61 -6
@@ -0,0 +1,96 @@
1
+ # Instance Org Members Actions
2
+
3
+ Details on the various actions that can be performed on the
4
+ Instance Org Members 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 an instance member
17
+
18
+ ```ruby
19
+ result = client.instance_org_members.get(
20
+ instanceId: my_instance_id,
21
+ orgId: my_org_id)
22
+
23
+ puts result
24
+ ```
25
+
26
+ #### Authentication
27
+ The client must be configured with a valid api access token to call this
28
+ action. The token must include at least one of the following scopes:
29
+ all.Instance, all.Instance.read, all.User, all.User.read, instanceOrgMembers.*, or instanceOrgMembers.get.
30
+
31
+ #### Available Parameters
32
+
33
+ | Name | Type | Required | Description | Default | Example |
34
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
35
+ | instanceId | string | Y | ID associated with the instance | | 575ec8687ae143cd83dc4a97 |
36
+ | orgId | string | Y | ID associated with the instance | | 575ec8687ae143cd83dc4a97 |
37
+ | sortField | string | N | Field to sort the results by. Accepted values are: email, role | email | role |
38
+ | sortDirection | string | N | Direction to sort the results by. Accepted values are: asc, desc | asc | asc |
39
+ | filterField | string | N | Field to filter the results by. Blank or not provided means no filtering. Accepted values are: email, role | | email |
40
+ | filter | string | N | Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering. | | my * instance |
41
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
42
+
43
+ #### Successful Responses
44
+
45
+ | Code | Type | Description |
46
+ | ---- | ---- | ----------- |
47
+ | 200 | [Instance Organization Members](_schemas.md#instance-organization-members) | A collection of instance organization members |
48
+
49
+ #### Error Responses
50
+
51
+ | Code | Type | Description |
52
+ | ---- | ---- | ----------- |
53
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
54
+ | 404 | [Error](_schemas.md#error) | Error if instance was not found |
55
+
56
+ <br/>
57
+
58
+ ## Post
59
+
60
+ Creates a new organization member
61
+
62
+ ```ruby
63
+ result = client.instance_org_members.post(
64
+ instanceId: my_instance_id,
65
+ orgId: my_org_id,
66
+ member: my_member)
67
+
68
+ puts result
69
+ ```
70
+
71
+ #### Authentication
72
+ The client must be configured with a valid api access token to call this
73
+ action. The token must include at least one of the following scopes:
74
+ all.Instance, all.User, instanceOrgMembers.*, or instanceOrgMembers.post.
75
+
76
+ #### Available Parameters
77
+
78
+ | Name | Type | Required | Description | Default | Example |
79
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
80
+ | instanceId | string | Y | ID associated with the instance | | 575ec8687ae143cd83dc4a97 |
81
+ | orgId | string | Y | ID associated with the instance | | 575ec8687ae143cd83dc4a97 |
82
+ | member | [Instance Org Member Post](_schemas.md#instance-org-member-post) | Y | Object containing new member info | | [Instance Org Member Post Example](_schemas.md#instance-org-member-post-example) |
83
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
84
+
85
+ #### Successful Responses
86
+
87
+ | Code | Type | Description |
88
+ | ---- | ---- | ----------- |
89
+ | 200 | [Instance Org Member](_schemas.md#instance-org-member) | The newly created instance member |
90
+
91
+ #### Error Responses
92
+
93
+ | Code | Type | Description |
94
+ | ---- | ---- | ----------- |
95
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
96
+ | 404 | [Error](_schemas.md#error) | Error if instance was not found |
@@ -0,0 +1,91 @@
1
+ # Instance Orgs Actions
2
+
3
+ Details on the various actions that can be performed on the
4
+ Instance Orgs 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 organizations associated with the current instance
17
+
18
+ ```ruby
19
+ result = client.instance_orgs.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, instanceOrgs.*, or instanceOrgs.get.
28
+
29
+ #### Available Parameters
30
+
31
+ | Name | Type | Required | Description | Default | Example |
32
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
33
+ | instanceId | string | Y | ID associated with the instance | | 575ec8687ae143cd83dc4a97 |
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 | | name |
39
+ | filter | string | N | Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering. | | my*org |
40
+ | summaryExclude | string | N | Comma-separated list of summary fields to exclude from org summaries | | payloadCount |
41
+ | summaryInclude | string | N | Comma-separated list of summary fields to include in org summary | | payloadCount |
42
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
43
+
44
+ #### Successful Responses
45
+
46
+ | Code | Type | Description |
47
+ | ---- | ---- | ----------- |
48
+ | 200 | [Instance Organizations](_schemas.md#instance-organizations) | A collection of organizations |
49
+
50
+ #### Error Responses
51
+
52
+ | Code | Type | Description |
53
+ | ---- | ---- | ----------- |
54
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
55
+
56
+ <br/>
57
+
58
+ ## Post
59
+
60
+ Create a new organization
61
+
62
+ ```ruby
63
+ result = client.instance_orgs.post(instanceId: my_instance_id)
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, instanceOrgs.*, or instanceOrgs.post.
72
+
73
+ #### Available Parameters
74
+
75
+ | Name | Type | Required | Description | Default | Example |
76
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
77
+ | instanceId | string | Y | ID associated with the instance | | 575ec8687ae143cd83dc4a97 |
78
+ | orgConfig | [Instance Owned Organization Post](_schemas.md#instance-owned-organization-post) | N | Object containing configurations for the new organization | | [Instance Owned Organization Post Example](_schemas.md#instance-owned-organization-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
+ | 200 | [Organization](_schemas.md#organization) | The newly created organization |
86
+
87
+ #### Error Responses
88
+
89
+ | Code | Type | Description |
90
+ | ---- | ---- | ----------- |
91
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
data/docs/instances.md ADDED
@@ -0,0 +1,50 @@
1
+ # Instances Actions
2
+
3
+ Details on the various actions that can be performed on the
4
+ Instances 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 a collection of instances
16
+
17
+ ```ruby
18
+ result = client.instances.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, instances.*, or instances.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 | 100 | 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 * instance |
38
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
39
+
40
+ #### Successful Responses
41
+
42
+ | Code | Type | Description |
43
+ | ---- | ---- | ----------- |
44
+ | 200 | [Instances](_schemas.md#instances) | Collection of instances |
45
+
46
+ #### Error Responses
47
+
48
+ | Code | Type | Description |
49
+ | ---- | ---- | ----------- |
50
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
data/docs/integration.md CHANGED
@@ -35,6 +35,7 @@ all.Application, all.Organization, all.User, integration.*, or integration.delet
35
35
  | ---- | ---- | -------- | ----------- | ------- | ------- |
36
36
  | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
37
37
  | integrationId | string | Y | ID associated with the integration | | 575ed78e7ae143cd83dc4aab |
38
+ | includeWorkflows | string | N | If the workflows that utilize this integration should also be deleted. | | true |
38
39
  | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
39
40
 
40
41
  #### Successful Responses
data/docs/integrations.md CHANGED
@@ -34,7 +34,7 @@ all.Application, all.Application.read, all.Organization, all.Organization.read,
34
34
  | sortField | string | N | Field to sort the results by. Accepted values are: name, id, creationDate, integrationType, lastUpdated | name | name |
35
35
  | sortDirection | string | N | Direction to sort the results by. Accepted values are: asc, desc | asc | asc |
36
36
  | page | string | N | Which page of results to return | 0 | 0 |
37
- | perPage | string | N | How many items to return per page | 1000 | 10 |
37
+ | perPage | string | N | How many items to return per page | 100 | 10 |
38
38
  | filterField | string | N | Field to filter the results by. Blank or not provided means no filtering. Accepted values are: name, integrationType | | integrationType |
39
39
  | filter | string | N | Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering. | | my*integration |
40
40
  | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
data/docs/me.md CHANGED
@@ -11,7 +11,6 @@ parameters and the potential responses.
11
11
  * [Delete](#delete)
12
12
  * [Disable Two Factor Auth](#disable-two-factor-auth)
13
13
  * [Disconnect Github](#disconnect-github)
14
- * [Disconnect Twitter](#disconnect-twitter)
15
14
  * [Enable Two Factor Auth](#enable-two-factor-auth)
16
15
  * [Fetch Recent Items](#fetch-recent-items)
17
16
  * [Get](#get)
@@ -202,41 +201,6 @@ all.User, me.*, or me.disconnectGithub.
202
201
 
203
202
  <br/>
204
203
 
205
- ## Disconnect Twitter
206
-
207
- Disconnects the user from Twitter
208
-
209
- ```ruby
210
- result = client.me.disconnect_twitter(optional_params)
211
-
212
- puts result
213
- ```
214
-
215
- #### Authentication
216
- The client must be configured with a valid api access token to call this
217
- action. The token must include at least one of the following scopes:
218
- all.User, me.*, or me.disconnectTwitter.
219
-
220
- #### Available Parameters
221
-
222
- | Name | Type | Required | Description | Default | Example |
223
- | ---- | ---- | -------- | ----------- | ------- | ------- |
224
- | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
225
-
226
- #### Successful Responses
227
-
228
- | Code | Type | Description |
229
- | ---- | ---- | ----------- |
230
- | 200 | [Me](_schemas.md#me) | Updated user information |
231
-
232
- #### Error Responses
233
-
234
- | Code | Type | Description |
235
- | ---- | ---- | ----------- |
236
- | 400 | [Error](_schemas.md#error) | Error if malformed request |
237
-
238
- <br/>
239
-
240
204
  ## Enable Two Factor Auth
241
205
 
242
206
  Enables two factor auth for the current user
data/docs/notebooks.md CHANGED
@@ -34,7 +34,7 @@ all.Application, all.Application.read, all.Organization, all.Organization.read,
34
34
  | sortField | string | N | Field to sort the results by. Accepted values are: name, id, creationDate, lastUpdated | name | name |
35
35
  | sortDirection | string | N | Direction to sort the results by. Accepted values are: asc, desc | asc | asc |
36
36
  | page | string | N | Which page of results to return | 0 | 0 |
37
- | perPage | string | N | How many items to return per page | 1000 | 10 |
37
+ | perPage | string | N | How many items to return per page | 100 | 10 |
38
38
  | filterField | string | N | Field to filter the results by. Blank or not provided means no filtering. Accepted values are: name | | name |
39
39
  | filter | string | N | Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering. | | my*notebook |
40
40
  | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
data/docs/orgs.md CHANGED
@@ -33,7 +33,7 @@ all.User, all.User.read, orgs.*, or orgs.get.
33
33
  | sortField | string | N | Field to sort the results by. Accepted values are: name, id, creationDate, lastUpdated | name | name |
34
34
  | sortDirection | string | N | Direction to sort the results by. Accepted values are: asc, desc | asc | asc |
35
35
  | page | string | N | Which page of results to return | 0 | 0 |
36
- | perPage | string | N | How many items to return per page | 1000 | 10 |
36
+ | perPage | string | N | How many items to return per page | 100 | 10 |
37
37
  | filterField | string | N | Field to filter the results by. Blank or not provided means no filtering. Accepted values are: name | | name |
38
38
  | filter | string | N | Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering. | | my*org |
39
39
  | summaryExclude | string | N | Comma-separated list of summary fields to exclude from org summaries | | payloadCount |
data/docs/webhook.md CHANGED
@@ -35,6 +35,7 @@ all.Application, all.Organization, all.User, webhook.*, or webhook.delete.
35
35
  | ---- | ---- | -------- | ----------- | ------- | ------- |
36
36
  | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
37
37
  | webhookId | string | Y | ID associated with the webhook | | 575ed78e7ae143cd83dc4aab |
38
+ | includeWorkflows | string | N | If the workflows that utilize this webhook should also be deleted. | | true |
38
39
  | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
39
40
 
40
41
  #### Successful Responses
data/docs/webhooks.md CHANGED
@@ -34,7 +34,7 @@ all.Application, all.Application.read, all.Organization, all.Organization.read,
34
34
  | sortField | string | N | Field to sort the results by. Accepted values are: name, id, creationDate, lastUpdated | name | name |
35
35
  | sortDirection | string | N | Direction to sort the results by. Accepted values are: asc, desc | asc | asc |
36
36
  | page | string | N | Which page of results to return | 0 | 0 |
37
- | perPage | string | N | How many items to return per page | 1000 | 10 |
37
+ | perPage | string | N | How many items to return per page | 100 | 10 |
38
38
  | filterField | string | N | Field to filter the results by. Blank or not provided means no filtering. Accepted values are: name | | name |
39
39
  | filter | string | N | Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering. | | my*webhook |
40
40
  | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
data/lib/losant_rest.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2020 Losant IoT, Inc.
3
+ # Copyright (c) 2021 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
@@ -30,8 +30,11 @@ require_relative "losant_rest/application_certificate"
30
30
  require_relative "losant_rest/application_certificate_authorities"
31
31
  require_relative "losant_rest/application_certificate_authority"
32
32
  require_relative "losant_rest/application_certificates"
33
+ require_relative "losant_rest/application_dashboard"
34
+ require_relative "losant_rest/application_dashboards"
33
35
  require_relative "losant_rest/application_key"
34
36
  require_relative "losant_rest/application_keys"
37
+ require_relative "losant_rest/application_template"
35
38
  require_relative "losant_rest/application_templates"
36
39
  require_relative "losant_rest/applications"
37
40
  require_relative "losant_rest/audit_log"
@@ -72,6 +75,14 @@ require_relative "losant_rest/flow"
72
75
  require_relative "losant_rest/flow_version"
73
76
  require_relative "losant_rest/flow_versions"
74
77
  require_relative "losant_rest/flows"
78
+ require_relative "losant_rest/instance"
79
+ require_relative "losant_rest/instance_member"
80
+ require_relative "losant_rest/instance_members"
81
+ require_relative "losant_rest/instance_org"
82
+ require_relative "losant_rest/instance_org_member"
83
+ require_relative "losant_rest/instance_org_members"
84
+ require_relative "losant_rest/instance_orgs"
85
+ require_relative "losant_rest/instances"
75
86
  require_relative "losant_rest/integration"
76
87
  require_relative "losant_rest/integrations"
77
88
  require_relative "losant_rest/me"
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2020 Losant IoT, Inc.
3
+ # Copyright (c) 2021 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
@@ -31,6 +31,54 @@ module LosantRest
31
31
  @client = client
32
32
  end
33
33
 
34
+ # Add resources to an application via an application template
35
+ #
36
+ # Authentication:
37
+ # The client must be configured with a valid api
38
+ # access token to call this action. The token
39
+ # must include at least one of the following scopes:
40
+ # all.Application, all.Organization, all.User, application.*, or application.applyTemplate.
41
+ #
42
+ # Parameters:
43
+ # * {string} applicationId - ID of the associated application
44
+ # * {hash} options - Object containing template import options (https://api.losant.com/#/definitions/applicationApplyTemplatePatch)
45
+ # * {string} losantdomain - Domain scope of request (rarely needed)
46
+ # * {boolean} _actions - Return resource actions in response
47
+ # * {boolean} _links - Return resource link in response
48
+ # * {boolean} _embedded - Return embedded resources in response
49
+ #
50
+ # Responses:
51
+ # * 200 - Updated application information (https://api.losant.com/#/definitions/application)
52
+ # * 202 - If a job was enqueued for the resources to be imported into the application (https://api.losant.com/#/definitions/jobEnqueuedResult)
53
+ #
54
+ # Errors:
55
+ # * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
56
+ # * 404 - Error if application is not found (https://api.losant.com/#/definitions/error)
57
+ def apply_template(params = {})
58
+ params = Utils.symbolize_hash_keys(params)
59
+ query_params = { _actions: false, _links: true, _embedded: true }
60
+ headers = {}
61
+ body = nil
62
+
63
+ raise ArgumentError.new("applicationId is required") unless params.has_key?(:applicationId)
64
+ raise ArgumentError.new("options is required") unless params.has_key?(:options)
65
+
66
+ body = params[:options] if params.has_key?(:options)
67
+ headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
68
+ query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
69
+ query_params[:_links] = params[:_links] if params.has_key?(:_links)
70
+ query_params[:_embedded] = params[:_embedded] if params.has_key?(:_embedded)
71
+
72
+ path = "/applications/#{params[:applicationId]}/applyTemplate"
73
+
74
+ @client.request(
75
+ method: :patch,
76
+ path: path,
77
+ query: query_params,
78
+ headers: headers,
79
+ body: body)
80
+ end
81
+
34
82
  # Returns success when a job has been enqueued to archive this application's device data for a given day
35
83
  #
36
84
  # Authentication:
@@ -399,6 +447,53 @@ module LosantRest
399
447
  body: body)
400
448
  end
401
449
 
450
+ # Updates an application global at the given key
451
+ #
452
+ # Authentication:
453
+ # The client must be configured with a valid api
454
+ # access token to call this action. The token
455
+ # must include at least one of the following scopes:
456
+ # all.Application, all.Organization, all.User, application.*, or application.patch.
457
+ #
458
+ # Parameters:
459
+ # * {string} applicationId - ID of the associated application
460
+ # * {hash} globals - Array of objects containing new application global information (https://api.losant.com/#/definitions/applicationGlobalPatch)
461
+ # * {string} losantdomain - Domain scope of request (rarely needed)
462
+ # * {boolean} _actions - Return resource actions in response
463
+ # * {boolean} _links - Return resource link in response
464
+ # * {boolean} _embedded - Return embedded resources in response
465
+ #
466
+ # Responses:
467
+ # * 200 - Updated application information (https://api.losant.com/#/definitions/application)
468
+ #
469
+ # Errors:
470
+ # * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
471
+ # * 404 - Error if application was not found (https://api.losant.com/#/definitions/error)
472
+ def globals(params = {})
473
+ params = Utils.symbolize_hash_keys(params)
474
+ query_params = { _actions: false, _links: true, _embedded: true }
475
+ headers = {}
476
+ body = nil
477
+
478
+ raise ArgumentError.new("applicationId is required") unless params.has_key?(:applicationId)
479
+ raise ArgumentError.new("globals is required") unless params.has_key?(:globals)
480
+
481
+ body = params[:globals] if params.has_key?(:globals)
482
+ headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
483
+ query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
484
+ query_params[:_links] = params[:_links] if params.has_key?(:_links)
485
+ query_params[:_embedded] = params[:_embedded] if params.has_key?(:_embedded)
486
+
487
+ path = "/applications/#{params[:applicationId]}/globals"
488
+
489
+ @client.request(
490
+ method: :patch,
491
+ path: path,
492
+ query: query_params,
493
+ headers: headers,
494
+ body: body)
495
+ end
496
+
402
497
  # Publishes the given message to the given MQTT topic
403
498
  #
404
499
  # Authentication:
@@ -515,7 +610,7 @@ module LosantRest
515
610
  # * {boolean} _embedded - Return embedded resources in response
516
611
  #
517
612
  # Responses:
518
- # * 200 - Payload counts, by type and source (https://api.losant.com/#/definitions/payloadCounts)
613
+ # * 200 - Payload counts, by type and source (https://api.losant.com/#/definitions/payloadStats)
519
614
  #
520
615
  # Errors:
521
616
  # * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)