losant_rest 1.9.1 → 1.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/LICENSE +1 -1
- data/README.md +1 -1
- data/docs/_schemas.md +8502 -580
- data/docs/application.md +45 -3
- data/docs/applications.md +46 -0
- data/docs/experienceEndpoint.md +43 -0
- data/docs/experienceEndpoints.md +1 -1
- data/docs/experienceView.md +43 -0
- data/lib/losant_rest.rb +1 -1
- data/lib/losant_rest/application.rb +52 -4
- data/lib/losant_rest/application_api_token.rb +1 -1
- data/lib/losant_rest/application_api_tokens.rb +1 -1
- data/lib/losant_rest/application_certificate.rb +1 -1
- data/lib/losant_rest/application_certificate_authorities.rb +1 -1
- data/lib/losant_rest/application_certificate_authority.rb +1 -1
- data/lib/losant_rest/application_certificates.rb +1 -1
- data/lib/losant_rest/application_key.rb +1 -1
- data/lib/losant_rest/application_keys.rb +1 -1
- data/lib/losant_rest/applications.rb +1 -1
- data/lib/losant_rest/audit_log.rb +1 -1
- data/lib/losant_rest/audit_logs.rb +1 -1
- data/lib/losant_rest/auth.rb +1 -1
- data/lib/losant_rest/client.rb +3 -3
- data/lib/losant_rest/dashboard.rb +1 -1
- data/lib/losant_rest/dashboards.rb +1 -1
- data/lib/losant_rest/data.rb +1 -1
- data/lib/losant_rest/data_table.rb +1 -1
- data/lib/losant_rest/data_table_row.rb +1 -1
- data/lib/losant_rest/data_table_rows.rb +1 -1
- data/lib/losant_rest/data_tables.rb +1 -1
- data/lib/losant_rest/device.rb +1 -1
- data/lib/losant_rest/device_recipe.rb +1 -1
- data/lib/losant_rest/device_recipes.rb +1 -1
- data/lib/losant_rest/devices.rb +1 -1
- data/lib/losant_rest/edge_deployments.rb +1 -1
- data/lib/losant_rest/error.rb +1 -1
- data/lib/losant_rest/event.rb +1 -1
- data/lib/losant_rest/events.rb +1 -1
- data/lib/losant_rest/experience.rb +1 -1
- data/lib/losant_rest/experience_domain.rb +1 -1
- data/lib/losant_rest/experience_domains.rb +1 -1
- data/lib/losant_rest/experience_endpoint.rb +51 -1
- data/lib/losant_rest/experience_endpoints.rb +1 -1
- data/lib/losant_rest/experience_group.rb +1 -1
- data/lib/losant_rest/experience_groups.rb +1 -1
- data/lib/losant_rest/experience_slug.rb +1 -1
- data/lib/losant_rest/experience_slugs.rb +1 -1
- data/lib/losant_rest/experience_user.rb +1 -1
- data/lib/losant_rest/experience_users.rb +1 -1
- data/lib/losant_rest/experience_version.rb +1 -1
- data/lib/losant_rest/experience_versions.rb +1 -1
- data/lib/losant_rest/experience_view.rb +51 -1
- data/lib/losant_rest/experience_views.rb +1 -1
- data/lib/losant_rest/file.rb +1 -1
- data/lib/losant_rest/files.rb +1 -1
- data/lib/losant_rest/flow.rb +1 -1
- data/lib/losant_rest/flow_version.rb +1 -1
- data/lib/losant_rest/flow_versions.rb +1 -1
- data/lib/losant_rest/flows.rb +1 -1
- data/lib/losant_rest/integration.rb +1 -1
- data/lib/losant_rest/integrations.rb +1 -1
- data/lib/losant_rest/me.rb +1 -1
- data/lib/losant_rest/notebook.rb +1 -1
- data/lib/losant_rest/notebooks.rb +1 -1
- data/lib/losant_rest/org.rb +1 -1
- data/lib/losant_rest/org_invites.rb +1 -1
- data/lib/losant_rest/orgs.rb +1 -1
- data/lib/losant_rest/utils.rb +1 -1
- data/lib/losant_rest/version.rb +1 -1
- data/lib/losant_rest/webhook.rb +1 -1
- data/lib/losant_rest/webhooks.rb +1 -1
- data/schemas/application.json +3 -3
- data/schemas/applicationApiTokenPost.json +3 -0
- data/schemas/applicationCertificate.json +34 -0
- data/schemas/applicationCertificatePatch.json +34 -0
- data/schemas/applicationCertificatePost.json +34 -0
- data/schemas/applicationCertificates.json +34 -0
- data/schemas/{applicationCloneResult.json → applicationCreationByTemplateResult.json} +14 -6
- data/schemas/applicationExportPost.json +24 -0
- data/schemas/applicationExportResult.json +10 -0
- data/schemas/applicationKey.json +34 -0
- data/schemas/applicationKeyPatch.json +34 -0
- data/schemas/applicationKeyPost.json +34 -0
- data/schemas/applicationKeyPostResponse.json +34 -0
- data/schemas/applicationKeys.json +34 -0
- data/schemas/applicationPatch.json +3 -3
- data/schemas/applicationPost.json +3 -3
- data/schemas/applications.json +3 -3
- data/schemas/authedDevice.json +34 -0
- data/schemas/dashboard.json +76 -0
- data/schemas/dashboardPatch.json +76 -0
- data/schemas/dashboardPost.json +76 -0
- data/schemas/dashboards.json +76 -0
- data/schemas/experienceLinkedResources.json +6353 -0
- data/schemas/githubLogin.json +4 -0
- data/schemas/integration.json +4 -4
- data/schemas/integrationPatch.json +4 -4
- data/schemas/integrationPost.json +4 -4
- data/schemas/integrations.json +4 -4
- data/schemas/{applicationCloneEnqueued.json → jobEnqueuedResult.json} +0 -0
- data/schemas/notebook.json +198 -34
- data/schemas/notebookDataExportOptions.json +4 -0
- data/schemas/notebookExecutionLogs.json +4 -0
- data/schemas/notebookExecutionOptions.json +4 -0
- data/schemas/notebookPatch.json +198 -34
- data/schemas/notebookPost.json +198 -34
- data/schemas/notebooks.json +198 -34
- data/schemas/userCredentials.json +4 -0
- data/schemas/userPost.json +4 -0
- data/schemas/{validationCloneErrors.json → validationErrors.json} +9 -2
- metadata +9 -6
data/docs/application.md
CHANGED
@@ -10,6 +10,7 @@ parameters and the potential responses.
|
|
10
10
|
* [Backfill Archive Data](#backfill-archive-data)
|
11
11
|
* [Clone](#clone)
|
12
12
|
* [Delete](#delete)
|
13
|
+
* [Export](#export)
|
13
14
|
* [Full Data Tables Archive](#full-data-tables-archive)
|
14
15
|
* [Full Events Archive](#full-events-archive)
|
15
16
|
* [Get](#get)
|
@@ -125,8 +126,8 @@ all.Application, all.Organization, all.User, application.*, or application.clone
|
|
125
126
|
| Code | Type | Description |
|
126
127
|
| ---- | ---- | ----------- |
|
127
128
|
| 200 | [Success Dry Run](_schemas.md#success-dry-run) | if dryRun is set and successful, then return success |
|
128
|
-
| 201 | [Application
|
129
|
-
| 202 | [
|
129
|
+
| 201 | [Application Creation By Template Result](_schemas.md#application-creation-by-template-result) | If application was successfully cloned |
|
130
|
+
| 202 | [Job Enqueued API Result](_schemas.md#job-enqueued-api-result) | If application was enqueued to be cloned |
|
130
131
|
|
131
132
|
#### Error Responses
|
132
133
|
|
@@ -134,7 +135,7 @@ all.Application, all.Organization, all.User, application.*, or application.clone
|
|
134
135
|
| ---- | ---- | ----------- |
|
135
136
|
| 400 | [Error](_schemas.md#error) | Error if malformed request |
|
136
137
|
| 404 | [Error](_schemas.md#error) | Error if application is not found |
|
137
|
-
| 422 | [Validation
|
138
|
+
| 422 | [Validation Error](_schemas.md#validation-error) | Error if too many validation errors occurred on other resources |
|
138
139
|
|
139
140
|
<br/>
|
140
141
|
|
@@ -175,6 +176,47 @@ all.Application, all.Organization, all.User, application.*, or application.delet
|
|
175
176
|
|
176
177
|
<br/>
|
177
178
|
|
179
|
+
## Export
|
180
|
+
|
181
|
+
Export an application and all of it's resources
|
182
|
+
|
183
|
+
```ruby
|
184
|
+
result = client.application.export(
|
185
|
+
applicationId: my_application_id,
|
186
|
+
options: my_options)
|
187
|
+
|
188
|
+
puts result
|
189
|
+
```
|
190
|
+
|
191
|
+
#### Authentication
|
192
|
+
The client must be configured with a valid api access token to call this
|
193
|
+
action. The token must include at least one of the following scopes:
|
194
|
+
all.Application, all.Organization, all.User, application.*, or application.export.
|
195
|
+
|
196
|
+
#### Available Parameters
|
197
|
+
|
198
|
+
| Name | Type | Required | Description | Default | Example |
|
199
|
+
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
200
|
+
| applicationId | string | Y | ID of the associated application | | 575ec8687ae143cd83dc4a97 |
|
201
|
+
| options | [Application Export Post Schema](_schemas.md#application-export-post-schema) | Y | Object containing export application options | | [Application Export Post Schema Example](_schemas.md#application-export-post-schema-example) |
|
202
|
+
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
203
|
+
|
204
|
+
#### Successful Responses
|
205
|
+
|
206
|
+
| Code | Type | Description |
|
207
|
+
| ---- | ---- | ----------- |
|
208
|
+
| 200 | [Application Export Result](_schemas.md#application-export-result) | a url to download the zip of exported resources |
|
209
|
+
| 202 | [Job Enqueued API Result](_schemas.md#job-enqueued-api-result) | If application was enqueued to be exported |
|
210
|
+
|
211
|
+
#### Error Responses
|
212
|
+
|
213
|
+
| Code | Type | Description |
|
214
|
+
| ---- | ---- | ----------- |
|
215
|
+
| 400 | [Error](_schemas.md#error) | Error if malformed request |
|
216
|
+
| 404 | [Error](_schemas.md#error) | Error if application is not found |
|
217
|
+
|
218
|
+
<br/>
|
219
|
+
|
178
220
|
## Full Data Tables Archive
|
179
221
|
|
180
222
|
Returns success when a job has been enqueued to archive all selected data tables
|
data/docs/applications.md
CHANGED
@@ -7,6 +7,7 @@ parameters and the potential responses.
|
|
7
7
|
##### Contents
|
8
8
|
|
9
9
|
* [Get](#get)
|
10
|
+
* [Import](#import)
|
10
11
|
* [Post](#post)
|
11
12
|
|
12
13
|
<br/>
|
@@ -55,6 +56,51 @@ all.Organization, all.Organization.read, all.User, all.User.read, applications.*
|
|
55
56
|
|
56
57
|
<br/>
|
57
58
|
|
59
|
+
## Import
|
60
|
+
|
61
|
+
Create a new application from an import bundle
|
62
|
+
|
63
|
+
```ruby
|
64
|
+
result = client.applications.import(importBundle: my_import_bundle)
|
65
|
+
|
66
|
+
puts result
|
67
|
+
```
|
68
|
+
|
69
|
+
#### Authentication
|
70
|
+
The client must be configured with a valid api access token to call this
|
71
|
+
action. The token must include at least one of the following scopes:
|
72
|
+
all.Organization, all.User, applications.*, or applications.import.
|
73
|
+
|
74
|
+
#### Available Parameters
|
75
|
+
|
76
|
+
| Name | Type | Required | Description | Default | Example |
|
77
|
+
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
78
|
+
| importBundle | file | Y | The zip file containing the application to import and all of its resources | | undefined |
|
79
|
+
| ownerId | string | N | The owner id of the new application, defaults to the id of the user making the request | | 575ed6e87ae143cd83dc4aa8 |
|
80
|
+
| ownerType | string | N | The type of the owner id. Accepted values are: user, organization | user | user |
|
81
|
+
| includeDevices | string | N | If set, import devices from the import bundle | | true |
|
82
|
+
| includeDataTableRows | string | N | If set, import data table rows from import bundle | | true |
|
83
|
+
| includeFiles | string | N | If set, import files from import bundle | | true |
|
84
|
+
| email | string | N | Email address to notify the user when the job to import the application has completed or errored, defaults to the email address of the user making the request | | email@example.com |
|
85
|
+
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
86
|
+
|
87
|
+
#### Successful Responses
|
88
|
+
|
89
|
+
| Code | Type | Description |
|
90
|
+
| ---- | ---- | ----------- |
|
91
|
+
| 201 | [Application Creation By Template Result](_schemas.md#application-creation-by-template-result) | Successfully created application |
|
92
|
+
| 202 | [Job Enqueued API Result](_schemas.md#job-enqueued-api-result) | If application was enqueued to be imported |
|
93
|
+
|
94
|
+
#### Error Responses
|
95
|
+
|
96
|
+
| Code | Type | Description |
|
97
|
+
| ---- | ---- | ----------- |
|
98
|
+
| 400 | [Error](_schemas.md#error) | Error if malformed request |
|
99
|
+
| 404 | [Error](_schemas.md#error) | Error if application is not found |
|
100
|
+
| 422 | [Validation Error](_schemas.md#validation-error) | Error if too many validation errors occurred on other resources |
|
101
|
+
|
102
|
+
<br/>
|
103
|
+
|
58
104
|
## Post
|
59
105
|
|
60
106
|
Create a new application
|
data/docs/experienceEndpoint.md
CHANGED
@@ -8,6 +8,7 @@ parameters and the potential responses.
|
|
8
8
|
|
9
9
|
* [Delete](#delete)
|
10
10
|
* [Get](#get)
|
11
|
+
* [Linked Resources](#linked-resources)
|
11
12
|
* [Patch](#patch)
|
12
13
|
|
13
14
|
<br/>
|
@@ -93,6 +94,48 @@ all.Application, all.Application.read, all.Organization, all.Organization.read,
|
|
93
94
|
|
94
95
|
<br/>
|
95
96
|
|
97
|
+
## Linked Resources
|
98
|
+
|
99
|
+
Retrieves information on resources linked to an experience endpoint
|
100
|
+
|
101
|
+
```ruby
|
102
|
+
result = client.experience_endpoint.linked_resources(
|
103
|
+
applicationId: my_application_id,
|
104
|
+
experienceEndpointId: my_experience_endpoint_id)
|
105
|
+
|
106
|
+
puts result
|
107
|
+
```
|
108
|
+
|
109
|
+
#### Authentication
|
110
|
+
The client must be configured with a valid api access token to call this
|
111
|
+
action. The token must include at least one of the following scopes:
|
112
|
+
all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, experienceEndpoint.*, or experienceEndpoint.linkedResources.
|
113
|
+
|
114
|
+
#### Available Parameters
|
115
|
+
|
116
|
+
| Name | Type | Required | Description | Default | Example |
|
117
|
+
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
118
|
+
| applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
|
119
|
+
| experienceEndpointId | string | Y | ID associated with the experience endpoint | | 575ed78e7ae143cd83dc4aab |
|
120
|
+
| version | string | N | Version of this experience endpoint to query | develop | develop |
|
121
|
+
| includeCustomNodes | string | N | If the result of the request should also include the details of any custom nodes referenced by returned workflows | false | true |
|
122
|
+
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
123
|
+
|
124
|
+
#### Successful Responses
|
125
|
+
|
126
|
+
| Code | Type | Description |
|
127
|
+
| ---- | ---- | ----------- |
|
128
|
+
| 200 | [Experience Linked Resources](_schemas.md#experience-linked-resources) | Linked resource information |
|
129
|
+
|
130
|
+
#### Error Responses
|
131
|
+
|
132
|
+
| Code | Type | Description |
|
133
|
+
| ---- | ---- | ----------- |
|
134
|
+
| 400 | [Error](_schemas.md#error) | Error if malformed request |
|
135
|
+
| 404 | [Error](_schemas.md#error) | Error if experience endpoint was not found |
|
136
|
+
|
137
|
+
<br/>
|
138
|
+
|
96
139
|
## Patch
|
97
140
|
|
98
141
|
Updates information about an experience endpoint
|
data/docs/experienceEndpoints.md
CHANGED
@@ -32,7 +32,7 @@ all.Application, all.Application.read, all.Organization, all.Organization.read,
|
|
32
32
|
| Name | Type | Required | Description | Default | Example |
|
33
33
|
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
34
34
|
| applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
|
35
|
-
| sortField | string | N | Field to sort the results by. Accepted values are: order, method, route, id, creationDate, requestCount, lastUpdated | order |
|
35
|
+
| sortField | string | N | Field to sort the results by. Accepted values are: order, method, route, id, creationDate, requestCount, lastUpdated | order | order |
|
36
36
|
| sortDirection | string | N | Direction to sort the results by. Accepted values are: asc, desc | asc | asc |
|
37
37
|
| filterField | string | N | Field to filter the results by. Blank or not provided means no filtering. Accepted values are: method, route | | method |
|
38
38
|
| filter | string | N | Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering. | | my*route |
|
data/docs/experienceView.md
CHANGED
@@ -8,6 +8,7 @@ parameters and the potential responses.
|
|
8
8
|
|
9
9
|
* [Delete](#delete)
|
10
10
|
* [Get](#get)
|
11
|
+
* [Linked Resources](#linked-resources)
|
11
12
|
* [Patch](#patch)
|
12
13
|
|
13
14
|
<br/>
|
@@ -93,6 +94,48 @@ all.Application, all.Application.read, all.Organization, all.Organization.read,
|
|
93
94
|
|
94
95
|
<br/>
|
95
96
|
|
97
|
+
## Linked Resources
|
98
|
+
|
99
|
+
Retrieves information on resources linked to an experience view
|
100
|
+
|
101
|
+
```ruby
|
102
|
+
result = client.experience_view.linked_resources(
|
103
|
+
applicationId: my_application_id,
|
104
|
+
experienceViewId: my_experience_view_id)
|
105
|
+
|
106
|
+
puts result
|
107
|
+
```
|
108
|
+
|
109
|
+
#### Authentication
|
110
|
+
The client must be configured with a valid api access token to call this
|
111
|
+
action. The token must include at least one of the following scopes:
|
112
|
+
all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, experienceView.*, or experienceView.linkedResources.
|
113
|
+
|
114
|
+
#### Available Parameters
|
115
|
+
|
116
|
+
| Name | Type | Required | Description | Default | Example |
|
117
|
+
| ---- | ---- | -------- | ----------- | ------- | ------- |
|
118
|
+
| applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
|
119
|
+
| experienceViewId | string | Y | ID associated with the experience view | | 575ed78e7ae143cd83dc4aab |
|
120
|
+
| version | string | N | Version of this experience view to query | develop | develop |
|
121
|
+
| includeCustomNodes | string | N | If the result of the request should also include the details of any custom nodes referenced by returned workflows | false | true |
|
122
|
+
| losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
|
123
|
+
|
124
|
+
#### Successful Responses
|
125
|
+
|
126
|
+
| Code | Type | Description |
|
127
|
+
| ---- | ---- | ----------- |
|
128
|
+
| 200 | [Experience Linked Resources](_schemas.md#experience-linked-resources) | Linked resource information |
|
129
|
+
|
130
|
+
#### Error Responses
|
131
|
+
|
132
|
+
| Code | Type | Description |
|
133
|
+
| ---- | ---- | ----------- |
|
134
|
+
| 400 | [Error](_schemas.md#error) | Error if malformed request |
|
135
|
+
| 404 | [Error](_schemas.md#error) | Error if experience view was not found |
|
136
|
+
|
137
|
+
<br/>
|
138
|
+
|
96
139
|
## Patch
|
97
140
|
|
98
141
|
Updates information about an experience view
|
data/lib/losant_rest.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2020 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)
|
3
|
+
# Copyright (c) 2020 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
|
@@ -140,13 +140,13 @@ module LosantRest
|
|
140
140
|
#
|
141
141
|
# Responses:
|
142
142
|
# * 200 - if dryRun is set and successful, then return success (https://api.losant.com/#/definitions/applicationCloneDryRunResult)
|
143
|
-
# * 201 - If application was successfully cloned (https://api.losant.com/#/definitions/
|
144
|
-
# * 202 - If application was enqueued to be cloned (https://api.losant.com/#/definitions/
|
143
|
+
# * 201 - If application was successfully cloned (https://api.losant.com/#/definitions/applicationCreationByTemplateResult)
|
144
|
+
# * 202 - If application was enqueued to be cloned (https://api.losant.com/#/definitions/jobEnqueuedResult)
|
145
145
|
#
|
146
146
|
# Errors:
|
147
147
|
# * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
|
148
148
|
# * 404 - Error if application is not found (https://api.losant.com/#/definitions/error)
|
149
|
-
# * 422 - Error if too many validation errors occurred on other resources (https://api.losant.com/#/definitions/
|
149
|
+
# * 422 - Error if too many validation errors occurred on other resources (https://api.losant.com/#/definitions/validationErrors)
|
150
150
|
def clone(params = {})
|
151
151
|
params = Utils.symbolize_hash_keys(params)
|
152
152
|
query_params = { _actions: false, _links: true, _embedded: true }
|
@@ -215,6 +215,54 @@ module LosantRest
|
|
215
215
|
body: body)
|
216
216
|
end
|
217
217
|
|
218
|
+
# Export an application and all of it's resources
|
219
|
+
#
|
220
|
+
# Authentication:
|
221
|
+
# The client must be configured with a valid api
|
222
|
+
# access token to call this action. The token
|
223
|
+
# must include at least one of the following scopes:
|
224
|
+
# all.Application, all.Organization, all.User, application.*, or application.export.
|
225
|
+
#
|
226
|
+
# Parameters:
|
227
|
+
# * {string} applicationId - ID of the associated application
|
228
|
+
# * {hash} options - Object containing export application options (https://api.losant.com/#/definitions/applicationExportPost)
|
229
|
+
# * {string} losantdomain - Domain scope of request (rarely needed)
|
230
|
+
# * {boolean} _actions - Return resource actions in response
|
231
|
+
# * {boolean} _links - Return resource link in response
|
232
|
+
# * {boolean} _embedded - Return embedded resources in response
|
233
|
+
#
|
234
|
+
# Responses:
|
235
|
+
# * 200 - a url to download the zip of exported resources (https://api.losant.com/#/definitions/applicationExportResult)
|
236
|
+
# * 202 - If application was enqueued to be exported (https://api.losant.com/#/definitions/jobEnqueuedResult)
|
237
|
+
#
|
238
|
+
# Errors:
|
239
|
+
# * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
|
240
|
+
# * 404 - Error if application is not found (https://api.losant.com/#/definitions/error)
|
241
|
+
def export(params = {})
|
242
|
+
params = Utils.symbolize_hash_keys(params)
|
243
|
+
query_params = { _actions: false, _links: true, _embedded: true }
|
244
|
+
headers = {}
|
245
|
+
body = nil
|
246
|
+
|
247
|
+
raise ArgumentError.new("applicationId is required") unless params.has_key?(:applicationId)
|
248
|
+
raise ArgumentError.new("options is required") unless params.has_key?(:options)
|
249
|
+
|
250
|
+
body = params[:options] if params.has_key?(:options)
|
251
|
+
headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
|
252
|
+
query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
|
253
|
+
query_params[:_links] = params[:_links] if params.has_key?(:_links)
|
254
|
+
query_params[:_embedded] = params[:_embedded] if params.has_key?(:_embedded)
|
255
|
+
|
256
|
+
path = "/applications/#{params[:applicationId]}/export"
|
257
|
+
|
258
|
+
@client.request(
|
259
|
+
method: :post,
|
260
|
+
path: path,
|
261
|
+
query: query_params,
|
262
|
+
headers: headers,
|
263
|
+
body: body)
|
264
|
+
end
|
265
|
+
|
218
266
|
# Returns success when a job has been enqueued to archive all selected data tables
|
219
267
|
#
|
220
268
|
# Authentication:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2020 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)
|
3
|
+
# Copyright (c) 2020 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)
|
3
|
+
# Copyright (c) 2020 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)
|
3
|
+
# Copyright (c) 2020 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)
|
3
|
+
# Copyright (c) 2020 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)
|
3
|
+
# Copyright (c) 2020 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)
|
3
|
+
# Copyright (c) 2020 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)
|
3
|
+
# Copyright (c) 2020 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)
|
3
|
+
# Copyright (c) 2020 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)
|
3
|
+
# Copyright (c) 2020 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)
|
3
|
+
# Copyright (c) 2020 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
|
data/lib/losant_rest/auth.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c)
|
3
|
+
# Copyright (c) 2020 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
|