losant_rest 1.8.5 → 1.8.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/docs/_schemas.md +2209 -127
  3. data/docs/application.md +4 -2
  4. data/docs/applications.md +4 -2
  5. data/docs/data.md +41 -0
  6. data/docs/me.md +4 -2
  7. data/docs/notebook.md +305 -0
  8. data/docs/notebooks.md +93 -0
  9. data/docs/org.md +8 -2
  10. data/docs/orgs.md +4 -2
  11. data/lib/losant_rest/application.rb +6 -2
  12. data/lib/losant_rest/applications.rb +6 -2
  13. data/lib/losant_rest/client.rb +10 -2
  14. data/lib/losant_rest/data.rb +47 -0
  15. data/lib/losant_rest/me.rb +6 -2
  16. data/lib/losant_rest/notebook.rb +322 -0
  17. data/lib/losant_rest/notebooks.rb +136 -0
  18. data/lib/losant_rest/org.rb +14 -2
  19. data/lib/losant_rest/orgs.rb +6 -2
  20. data/lib/losant_rest/version.rb +1 -1
  21. data/lib/losant_rest.rb +2 -0
  22. data/schemas/application.json +15 -4
  23. data/schemas/applicationApiTokenPost.json +12 -0
  24. data/schemas/applications.json +15 -4
  25. data/schemas/dataExport.json +65 -0
  26. data/schemas/deviceCredentials.json +1 -0
  27. data/schemas/edgeDeployment.json +2 -1
  28. data/schemas/edgeDeployments.json +2 -1
  29. data/schemas/event.json +4 -2
  30. data/schemas/events.json +4 -2
  31. data/schemas/file.json +2 -1
  32. data/schemas/fileUploadPostResponse.json +20 -26
  33. data/schemas/files.json +2 -1
  34. data/schemas/flow.json +1 -0
  35. data/schemas/flowPatch.json +1 -0
  36. data/schemas/flowPost.json +1 -0
  37. data/schemas/flowVersion.json +2 -0
  38. data/schemas/flowVersionPost.json +1 -0
  39. data/schemas/flowVersions.json +2 -0
  40. data/schemas/flows.json +1 -0
  41. data/schemas/flowsImportPost.json +2 -0
  42. data/schemas/flowsImportResult.json +3 -0
  43. data/schemas/githubLogin.json +12 -0
  44. data/schemas/me.json +28 -8
  45. data/schemas/notebook.json +322 -0
  46. data/schemas/notebookDataExportOptions.json +34 -0
  47. data/schemas/notebookExecutionLogs.json +125 -0
  48. data/schemas/notebookExecutionOptions.json +29 -0
  49. data/schemas/notebookPatch.json +295 -0
  50. data/schemas/notebookPost.json +298 -0
  51. data/schemas/notebooks.json +364 -0
  52. data/schemas/org.json +27 -10
  53. data/schemas/orgs.json +27 -10
  54. data/schemas/userCredentials.json +12 -0
  55. data/schemas/userPost.json +12 -0
  56. metadata +14 -2
data/docs/application.md CHANGED
@@ -151,8 +151,8 @@ all.Application, all.Application.read, all.Organization, all.Organization.read,
151
151
  | Name | Type | Required | Description | Default | Example |
152
152
  | ---- | ---- | -------- | ----------- | ------- | ------- |
153
153
  | applicationId | string | Y | ID of the associated application | | 575ec8687ae143cd83dc4a97 |
154
- | summaryExclude | string | N | Comma seperated list of summary fields to exclude from application summary | | payloadCount |
155
- | summaryInclude | string | N | Comma seperated list of summary fields to include in application summary | | payloadCount |
154
+ | summaryExclude | string | N | Comma-separated list of summary fields to exclude from application summary | | payloadCount |
155
+ | summaryInclude | string | N | Comma-separated list of summary fields to include in application summary | | payloadCount |
156
156
  | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
157
157
 
158
158
  #### Successful Responses
@@ -233,6 +233,8 @@ all.Application, all.Organization, all.User, application.*, or application.patch
233
233
  | ---- | ---- | -------- | ----------- | ------- | ------- |
234
234
  | applicationId | string | Y | ID of the associated application | | 575ec8687ae143cd83dc4a97 |
235
235
  | application | [Application Patch](_schemas.md#application-patch) | Y | Object containing new application properties | | [Application Patch Example](_schemas.md#application-patch-example) |
236
+ | summaryExclude | string | N | Comma-separated list of summary fields to exclude from application summary | | payloadCount |
237
+ | summaryInclude | string | N | Comma-separated list of summary fields to include in application summary | | payloadCount |
236
238
  | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
237
239
 
238
240
  #### Successful Responses
data/docs/applications.md CHANGED
@@ -37,8 +37,8 @@ all.Organization, all.Organization.read, all.User, all.User.read, applications.*
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 * app |
39
39
  | orgId | string | N | If not provided, return all applications. If provided but blank, only return applications belonging to the current user. If provided and an id, only return applications belonging to the given organization id. | | 575ecdf07ae143cd83dc4a9a |
40
- | summaryExclude | string | N | Comma seperated list of summary fields to exclude from application summary | | payloadCount |
41
- | summaryInclude | string | N | Comma seperated list of summary fields to include in application summary | | payloadCount |
40
+ | summaryExclude | string | N | Comma-separated list of summary fields to exclude from application summary | | payloadCount |
41
+ | summaryInclude | string | N | Comma-separated list of summary fields to include in application summary | | payloadCount |
42
42
  | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
43
43
 
44
44
  #### Successful Responses
@@ -75,6 +75,8 @@ all.Organization, all.User, applications.*, or applications.post.
75
75
  | Name | Type | Required | Description | Default | Example |
76
76
  | ---- | ---- | -------- | ----------- | ------- | ------- |
77
77
  | application | [Application Post](_schemas.md#application-post) | Y | New application information | | [Application Post Example](_schemas.md#application-post-example) |
78
+ | summaryExclude | string | N | Comma-separated list of summary fields to exclude from application summary | | payloadCount |
79
+ | summaryInclude | string | N | Comma-separated list of summary fields to include in application summary | | payloadCount |
78
80
  | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
79
81
 
80
82
  #### Successful Responses
data/docs/data.md CHANGED
@@ -6,11 +6,52 @@ parameters and the potential responses.
6
6
 
7
7
  ##### Contents
8
8
 
9
+ * [Export](#export)
9
10
  * [Last Value Query](#last-value-query)
10
11
  * [Time Series Query](#time-series-query)
11
12
 
12
13
  <br/>
13
14
 
15
+ ## Export
16
+
17
+ Creates a csv file from a query of devices and attributes over a time range.
18
+
19
+ ```ruby
20
+ result = client.data.export(
21
+ applicationId: my_application_id,
22
+ query: my_query)
23
+
24
+ puts result
25
+ ```
26
+
27
+ #### Authentication
28
+ The client must be configured with a valid api access token to call this
29
+ action. The token must include at least one of the following scopes:
30
+ all.Application, all.Application.read, all.Device, all.Device.read, all.Organization, all.Organization.read, all.User, all.User.read, data.*, or data.export.
31
+
32
+ #### Available Parameters
33
+
34
+ | Name | Type | Required | Description | Default | Example |
35
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
36
+ | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
37
+ | query | [Data Export](_schemas.md#data-export) | Y | The query parameters | | [Data Export Example](_schemas.md#data-export-example) |
38
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
39
+
40
+ #### Successful Responses
41
+
42
+ | Code | Type | Description |
43
+ | ---- | ---- | ----------- |
44
+ | 200 | [Success](_schemas.md#success) | If command was successfully sent |
45
+
46
+ #### Error Responses
47
+
48
+ | Code | Type | Description |
49
+ | ---- | ---- | ----------- |
50
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
51
+ | 404 | [Error](_schemas.md#error) | Error if application was not found |
52
+
53
+ <br/>
54
+
14
55
  ## Last Value Query
15
56
 
16
57
  Returns the last known data for the given attribute
data/docs/me.md CHANGED
@@ -329,8 +329,8 @@ all.SolutionUser, all.SolutionUser.read, all.User, all.User.read, me.*, or me.ge
329
329
  | Name | Type | Required | Description | Default | Example |
330
330
  | ---- | ---- | -------- | ----------- | ------- | ------- |
331
331
  | includeRecent | undefined | N | Should the user include recent app/dashboard info | | true |
332
- | summaryExclude | string | N | Comma seperated list of summary fields to exclude from user summary | | payloadCount |
333
- | summaryInclude | string | N | Comma seperated list of summary fields to include in user summary | | payloadCount |
332
+ | summaryExclude | string | N | Comma-separated list of summary fields to exclude from user summary | | payloadCount |
333
+ | summaryInclude | string | N | Comma-separated list of summary fields to include in user summary | | payloadCount |
334
334
  | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
335
335
 
336
336
  #### Successful Responses
@@ -366,6 +366,8 @@ all.SolutionUser, all.User, me.*, or me.patch.
366
366
  | Name | Type | Required | Description | Default | Example |
367
367
  | ---- | ---- | -------- | ----------- | ------- | ------- |
368
368
  | user | [Me Patch](_schemas.md#me-patch) | Y | Object containing new user properties | | [Me Patch Example](_schemas.md#me-patch-example) |
369
+ | summaryExclude | string | N | Comma-separated list of summary fields to exclude from user summary | | payloadCount |
370
+ | summaryInclude | string | N | Comma-separated list of summary fields to include in user summary | | payloadCount |
369
371
  | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
370
372
 
371
373
  #### Successful Responses
data/docs/notebook.md ADDED
@@ -0,0 +1,305 @@
1
+ # Notebook Actions
2
+
3
+ Details on the various actions that can be performed on the
4
+ Notebook resource, including the expected
5
+ parameters and the potential responses.
6
+
7
+ ##### Contents
8
+
9
+ * [Delete](#delete)
10
+ * [Execute](#execute)
11
+ * [Get](#get)
12
+ * [Logs](#logs)
13
+ * [Patch](#patch)
14
+ * [Request Input Data Export](#request-input-data-export)
15
+ * [Upload](#upload)
16
+
17
+ <br/>
18
+
19
+ ## Delete
20
+
21
+ Deletes a notebook
22
+
23
+ ```ruby
24
+ result = client.notebook.delete(
25
+ applicationId: my_application_id,
26
+ notebookId: my_notebook_id)
27
+
28
+ puts result
29
+ ```
30
+
31
+ #### Authentication
32
+ The client must be configured with a valid api access token to call this
33
+ action. The token must include at least one of the following scopes:
34
+ all.Application, all.Organization, all.User, notebook.*, or notebook.delete.
35
+
36
+ #### Available Parameters
37
+
38
+ | Name | Type | Required | Description | Default | Example |
39
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
40
+ | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
41
+ | notebookId | string | Y | ID associated with the notebook | | 575ed78e7ae143cd83dc4aab |
42
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
43
+
44
+ #### Successful Responses
45
+
46
+ | Code | Type | Description |
47
+ | ---- | ---- | ----------- |
48
+ | 200 | [Success](_schemas.md#success) | If notebook was successfully deleted |
49
+
50
+ #### Error Responses
51
+
52
+ | Code | Type | Description |
53
+ | ---- | ---- | ----------- |
54
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
55
+ | 404 | [Error](_schemas.md#error) | Error if notebook was not found |
56
+
57
+ <br/>
58
+
59
+ ## Execute
60
+
61
+ Triggers the execution of a notebook
62
+
63
+ ```ruby
64
+ result = client.notebook.execute(
65
+ applicationId: my_application_id,
66
+ notebookId: my_notebook_id,
67
+ executionOptions: my_execution_options)
68
+
69
+ puts result
70
+ ```
71
+
72
+ #### Authentication
73
+ The client must be configured with a valid api access token to call this
74
+ action. The token must include at least one of the following scopes:
75
+ all.Application, all.Organization, all.User, notebook.*, or notebook.execute.
76
+
77
+ #### Available Parameters
78
+
79
+ | Name | Type | Required | Description | Default | Example |
80
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
81
+ | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
82
+ | notebookId | string | Y | ID associated with the notebook | | 575ed78e7ae143cd83dc4aab |
83
+ | executionOptions | [Notebook Execution Options](_schemas.md#notebook-execution-options) | Y | The options for the execution | | [Notebook Execution Options Example](_schemas.md#notebook-execution-options-example) |
84
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
85
+
86
+ #### Successful Responses
87
+
88
+ | Code | Type | Description |
89
+ | ---- | ---- | ----------- |
90
+ | 200 | [Success](_schemas.md#success) | If execution request was accepted and successfully queued |
91
+
92
+ #### Error Responses
93
+
94
+ | Code | Type | Description |
95
+ | ---- | ---- | ----------- |
96
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
97
+ | 404 | [Error](_schemas.md#error) | Error if notebook was not found |
98
+
99
+ <br/>
100
+
101
+ ## Get
102
+
103
+ Retrieves information on a notebook
104
+
105
+ ```ruby
106
+ result = client.notebook.get(
107
+ applicationId: my_application_id,
108
+ notebookId: my_notebook_id)
109
+
110
+ puts result
111
+ ```
112
+
113
+ #### Authentication
114
+ The client must be configured with a valid api access token to call this
115
+ action. The token must include at least one of the following scopes:
116
+ all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, notebook.*, or notebook.get.
117
+
118
+ #### Available Parameters
119
+
120
+ | Name | Type | Required | Description | Default | Example |
121
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
122
+ | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
123
+ | notebookId | string | Y | ID associated with the notebook | | 575ed78e7ae143cd83dc4aab |
124
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
125
+
126
+ #### Successful Responses
127
+
128
+ | Code | Type | Description |
129
+ | ---- | ---- | ----------- |
130
+ | 200 | [Notebook](_schemas.md#notebook) | notebook information |
131
+
132
+ #### Error Responses
133
+
134
+ | Code | Type | Description |
135
+ | ---- | ---- | ----------- |
136
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
137
+ | 404 | [Error](_schemas.md#error) | Error if notebook was not found |
138
+
139
+ <br/>
140
+
141
+ ## Logs
142
+
143
+ Retrieves information on notebook executions
144
+
145
+ ```ruby
146
+ result = client.notebook.logs(
147
+ applicationId: my_application_id,
148
+ notebookId: my_notebook_id)
149
+
150
+ puts result
151
+ ```
152
+
153
+ #### Authentication
154
+ The client must be configured with a valid api access token to call this
155
+ action. The token must include at least one of the following scopes:
156
+ all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, notebook.*, or notebook.logs.
157
+
158
+ #### Available Parameters
159
+
160
+ | Name | Type | Required | Description | Default | Example |
161
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
162
+ | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
163
+ | notebookId | string | Y | ID associated with the notebook | | 575ed78e7ae143cd83dc4aab |
164
+ | limit | string | N | Max log entries to return (ordered by time descending) | 1 | 10 |
165
+ | since | string | N | Look for log entries since this time (ms since epoch) | | 1465790400000 |
166
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
167
+
168
+ #### Successful Responses
169
+
170
+ | Code | Type | Description |
171
+ | ---- | ---- | ----------- |
172
+ | 200 | [Notebook Execution Logs](_schemas.md#notebook-execution-logs) | notebook execution information |
173
+
174
+ #### Error Responses
175
+
176
+ | Code | Type | Description |
177
+ | ---- | ---- | ----------- |
178
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
179
+ | 404 | [Error](_schemas.md#error) | Error if notebook was not found |
180
+
181
+ <br/>
182
+
183
+ ## Patch
184
+
185
+ Updates information about a notebook
186
+
187
+ ```ruby
188
+ result = client.notebook.patch(
189
+ applicationId: my_application_id,
190
+ notebookId: my_notebook_id,
191
+ notebook: my_notebook)
192
+
193
+ puts result
194
+ ```
195
+
196
+ #### Authentication
197
+ The client must be configured with a valid api access token to call this
198
+ action. The token must include at least one of the following scopes:
199
+ all.Application, all.Organization, all.User, notebook.*, or notebook.patch.
200
+
201
+ #### Available Parameters
202
+
203
+ | Name | Type | Required | Description | Default | Example |
204
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
205
+ | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
206
+ | notebookId | string | Y | ID associated with the notebook | | 575ed78e7ae143cd83dc4aab |
207
+ | notebook | [Notebook Patch](_schemas.md#notebook-patch) | Y | Object containing new properties of the notebook | | [Notebook Patch Example](_schemas.md#notebook-patch-example) |
208
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
209
+
210
+ #### Successful Responses
211
+
212
+ | Code | Type | Description |
213
+ | ---- | ---- | ----------- |
214
+ | 200 | [Notebook](_schemas.md#notebook) | Updated notebook information |
215
+
216
+ #### Error Responses
217
+
218
+ | Code | Type | Description |
219
+ | ---- | ---- | ----------- |
220
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
221
+ | 404 | [Error](_schemas.md#error) | Error if notebook was not found |
222
+
223
+ <br/>
224
+
225
+ ## Request Input Data Export
226
+
227
+ Requests a combined zip file of the potential input data for a notebook execution
228
+
229
+ ```ruby
230
+ result = client.notebook.request_input_data_export(
231
+ applicationId: my_application_id,
232
+ notebookId: my_notebook_id,
233
+ exportOptions: my_export_options)
234
+
235
+ puts result
236
+ ```
237
+
238
+ #### Authentication
239
+ The client must be configured with a valid api access token to call this
240
+ action. The token must include at least one of the following scopes:
241
+ all.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, notebook.*, or notebook.requestInputDataExport.
242
+
243
+ #### Available Parameters
244
+
245
+ | Name | Type | Required | Description | Default | Example |
246
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
247
+ | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
248
+ | notebookId | string | Y | ID associated with the notebook | | 575ed78e7ae143cd83dc4aab |
249
+ | exportOptions | [Notebook Data Export Options](_schemas.md#notebook-data-export-options) | Y | The options for the export | | [Notebook Data Export Options Example](_schemas.md#notebook-data-export-options-example) |
250
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
251
+
252
+ #### Successful Responses
253
+
254
+ | Code | Type | Description |
255
+ | ---- | ---- | ----------- |
256
+ | 200 | [Success](_schemas.md#success) | If export request was accepted and successfully queued |
257
+
258
+ #### Error Responses
259
+
260
+ | Code | Type | Description |
261
+ | ---- | ---- | ----------- |
262
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
263
+ | 404 | [Error](_schemas.md#error) | Error if notebook was not found |
264
+
265
+ <br/>
266
+
267
+ ## Upload
268
+
269
+ Uploads the jupyter notebook file
270
+
271
+ ```ruby
272
+ result = client.notebook.upload(
273
+ applicationId: my_application_id,
274
+ notebookId: my_notebook_id,
275
+ jupyterFile: my_jupyter_file)
276
+
277
+ puts result
278
+ ```
279
+
280
+ #### Authentication
281
+ The client must be configured with a valid api access token to call this
282
+ action. The token must include at least one of the following scopes:
283
+ all.Application, all.Organization, all.User, notebook.*, or notebook.upload.
284
+
285
+ #### Available Parameters
286
+
287
+ | Name | Type | Required | Description | Default | Example |
288
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
289
+ | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
290
+ | notebookId | string | Y | ID associated with the notebook | | 575ed78e7ae143cd83dc4aab |
291
+ | jupyterFile | file | Y | The jupyter notebook file | | undefined |
292
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
293
+
294
+ #### Successful Responses
295
+
296
+ | Code | Type | Description |
297
+ | ---- | ---- | ----------- |
298
+ | 200 | [Notebook](_schemas.md#notebook) | Updated notebook information |
299
+
300
+ #### Error Responses
301
+
302
+ | Code | Type | Description |
303
+ | ---- | ---- | ----------- |
304
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
305
+ | 404 | [Error](_schemas.md#error) | Error if notebook was not found |
data/docs/notebooks.md ADDED
@@ -0,0 +1,93 @@
1
+ # Notebooks Actions
2
+
3
+ Details on the various actions that can be performed on the
4
+ Notebooks 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 notebooks for an application
17
+
18
+ ```ruby
19
+ result = client.notebooks.get(applicationId: my_application_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.Application, all.Application.read, all.Organization, all.Organization.read, all.User, all.User.read, notebooks.*, or notebooks.get.
28
+
29
+ #### Available Parameters
30
+
31
+ | Name | Type | Required | Description | Default | Example |
32
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
33
+ | applicationId | string | Y | ID associated with the application | | 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 | 1000 | 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*notebook |
40
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
41
+
42
+ #### Successful Responses
43
+
44
+ | Code | Type | Description |
45
+ | ---- | ---- | ----------- |
46
+ | 200 | [Notebooks](_schemas.md#notebooks) | Collection of notebooks |
47
+
48
+ #### Error Responses
49
+
50
+ | Code | Type | Description |
51
+ | ---- | ---- | ----------- |
52
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
53
+ | 404 | [Error](_schemas.md#error) | Error if application was not found |
54
+
55
+ <br/>
56
+
57
+ ## Post
58
+
59
+ Create a new notebook for an application
60
+
61
+ ```ruby
62
+ result = client.notebooks.post(
63
+ applicationId: my_application_id,
64
+ notebook: my_notebook)
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.Application, all.Organization, all.User, notebooks.*, or notebooks.post.
73
+
74
+ #### Available Parameters
75
+
76
+ | Name | Type | Required | Description | Default | Example |
77
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
78
+ | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
79
+ | notebook | [Notebook Post](_schemas.md#notebook-post) | Y | New notebook information | | [Notebook Post Example](_schemas.md#notebook-post-example) |
80
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
81
+
82
+ #### Successful Responses
83
+
84
+ | Code | Type | Description |
85
+ | ---- | ---- | ----------- |
86
+ | 201 | [Notebook](_schemas.md#notebook) | Successfully created notebook |
87
+
88
+ #### Error Responses
89
+
90
+ | Code | Type | Description |
91
+ | ---- | ---- | ----------- |
92
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
93
+ | 404 | [Error](_schemas.md#error) | Error if application was not found |
data/docs/org.md CHANGED
@@ -76,8 +76,8 @@ all.Organization, all.Organization.read, all.User, all.User.read, org.*, or org.
76
76
  | Name | Type | Required | Description | Default | Example |
77
77
  | ---- | ---- | -------- | ----------- | ------- | ------- |
78
78
  | orgId | string | Y | ID associated with the organization | | 575ed6e87ae143cd83dc4aa8 |
79
- | summaryExclude | string | N | Comma seperated list of summary fields to exclude from org summary | | payloadCount |
80
- | summaryInclude | string | N | Comma seperated list of summary fields to include in org summary | | payloadCount |
79
+ | summaryExclude | string | N | Comma-separated list of summary fields to exclude from org summary | | payloadCount |
80
+ | summaryInclude | string | N | Comma-separated list of summary fields to include in org summary | | payloadCount |
81
81
  | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
82
82
 
83
83
  #### Successful Responses
@@ -158,6 +158,8 @@ all.Organization, all.User, org.*, or org.modifyMember.
158
158
  | ---- | ---- | -------- | ----------- | ------- | ------- |
159
159
  | orgId | string | Y | ID associated with the organization | | 575ed6e87ae143cd83dc4aa8 |
160
160
  | member | [Organization Member Patch](_schemas.md#organization-member-patch) | Y | Object containing new member pair | | [Organization Member Patch Example](_schemas.md#organization-member-patch-example) |
161
+ | summaryExclude | string | N | Comma-separated list of summary fields to exclude from org summary | | payloadCount |
162
+ | summaryInclude | string | N | Comma-separated list of summary fields to include in org summary | | payloadCount |
161
163
  | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
162
164
 
163
165
  #### Successful Responses
@@ -198,6 +200,8 @@ all.Organization, all.User, org.*, or org.patch.
198
200
  | ---- | ---- | -------- | ----------- | ------- | ------- |
199
201
  | orgId | string | Y | ID associated with the organization | | 575ed6e87ae143cd83dc4aa8 |
200
202
  | organization | [Organization Patch](_schemas.md#organization-patch) | Y | Object containing new organization properties | | [Organization Patch Example](_schemas.md#organization-patch-example) |
203
+ | summaryExclude | string | N | Comma-separated list of summary fields to exclude from org summary | | payloadCount |
204
+ | summaryInclude | string | N | Comma-separated list of summary fields to include in org summary | | payloadCount |
201
205
  | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
202
206
 
203
207
  #### Successful Responses
@@ -314,6 +318,8 @@ all.Organization, all.User, org.*, or org.removeMember.
314
318
  | ---- | ---- | -------- | ----------- | ------- | ------- |
315
319
  | orgId | string | Y | ID associated with the organization | | 575ed6e87ae143cd83dc4aa8 |
316
320
  | userId | string | Y | Id of user to remove | | 575ed70c7ae143cd83dc4aa9 |
321
+ | summaryExclude | string | N | Comma-separated list of summary fields to exclude from org summary | | payloadCount |
322
+ | summaryInclude | string | N | Comma-separated list of summary fields to include in org summary | | payloadCount |
317
323
  | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
318
324
 
319
325
  #### Successful Responses
data/docs/orgs.md CHANGED
@@ -36,8 +36,8 @@ all.User, all.User.read, orgs.*, or orgs.get.
36
36
  | perPage | string | N | How many items to return per page | 1000 | 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
- | summaryExclude | string | N | Comma seperated list of summary fields to exclude from org summaries | | payloadCount |
40
- | summaryInclude | string | N | Comma seperated list of summary fields to include in org summary | | payloadCount |
39
+ | summaryExclude | string | N | Comma-separated list of summary fields to exclude from org summaries | | payloadCount |
40
+ | summaryInclude | string | N | Comma-separated list of summary fields to include in org summary | | payloadCount |
41
41
  | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
42
42
 
43
43
  #### Successful Responses
@@ -74,6 +74,8 @@ all.User, orgs.*, or orgs.post.
74
74
  | Name | Type | Required | Description | Default | Example |
75
75
  | ---- | ---- | -------- | ----------- | ------- | ------- |
76
76
  | organization | [Organization Post](_schemas.md#organization-post) | Y | New organization information | | [Organization Post Example](_schemas.md#organization-post-example) |
77
+ | summaryExclude | string | N | Comma-separated list of summary fields to exclude from org summary | | payloadCount |
78
+ | summaryInclude | string | N | Comma-separated list of summary fields to include in org summary | | payloadCount |
77
79
  | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
78
80
 
79
81
  #### Successful Responses
@@ -174,8 +174,8 @@ module LosantRest
174
174
  #
175
175
  # Parameters:
176
176
  # * {string} applicationId - ID of the associated application
177
- # * {string} summaryExclude - Comma seperated list of summary fields to exclude from application summary
178
- # * {string} summaryInclude - Comma seperated list of summary fields to include in application summary
177
+ # * {string} summaryExclude - Comma-separated list of summary fields to exclude from application summary
178
+ # * {string} summaryInclude - Comma-separated list of summary fields to include in application summary
179
179
  # * {string} losantdomain - Domain scope of request (rarely needed)
180
180
  # * {boolean} _actions - Return resource actions in response
181
181
  # * {boolean} _links - Return resource link in response
@@ -270,6 +270,8 @@ module LosantRest
270
270
  # Parameters:
271
271
  # * {string} applicationId - ID of the associated application
272
272
  # * {hash} application - Object containing new application properties (https://api.losant.com/#/definitions/applicationPatch)
273
+ # * {string} summaryExclude - Comma-separated list of summary fields to exclude from application summary
274
+ # * {string} summaryInclude - Comma-separated list of summary fields to include in application summary
273
275
  # * {string} losantdomain - Domain scope of request (rarely needed)
274
276
  # * {boolean} _actions - Return resource actions in response
275
277
  # * {boolean} _links - Return resource link in response
@@ -291,6 +293,8 @@ module LosantRest
291
293
  raise ArgumentError.new("application is required") unless params.has_key?(:application)
292
294
 
293
295
  body = params[:application] if params.has_key?(:application)
296
+ query_params[:summaryExclude] = params[:summaryExclude] if params.has_key?(:summaryExclude)
297
+ query_params[:summaryInclude] = params[:summaryInclude] if params.has_key?(:summaryInclude)
294
298
  headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
295
299
  query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
296
300
  query_params[:_links] = params[:_links] if params.has_key?(:_links)
@@ -45,8 +45,8 @@ module LosantRest
45
45
  # * {string} filterField - Field to filter the results by. Blank or not provided means no filtering. Accepted values are: name
46
46
  # * {string} filter - Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering.
47
47
  # * {string} orgId - If not provided, return all applications. If provided but blank, only return applications belonging to the current user. If provided and an id, only return applications belonging to the given organization id.
48
- # * {string} summaryExclude - Comma seperated list of summary fields to exclude from application summary
49
- # * {string} summaryInclude - Comma seperated list of summary fields to include in application summary
48
+ # * {string} summaryExclude - Comma-separated list of summary fields to exclude from application summary
49
+ # * {string} summaryInclude - Comma-separated list of summary fields to include in application summary
50
50
  # * {string} losantdomain - Domain scope of request (rarely needed)
51
51
  # * {boolean} _actions - Return resource actions in response
52
52
  # * {boolean} _links - Return resource link in response
@@ -98,6 +98,8 @@ module LosantRest
98
98
  #
99
99
  # Parameters:
100
100
  # * {hash} application - New application information (https://api.losant.com/#/definitions/applicationPost)
101
+ # * {string} summaryExclude - Comma-separated list of summary fields to exclude from application summary
102
+ # * {string} summaryInclude - Comma-separated list of summary fields to include in application summary
101
103
  # * {string} losantdomain - Domain scope of request (rarely needed)
102
104
  # * {boolean} _actions - Return resource actions in response
103
105
  # * {boolean} _links - Return resource link in response
@@ -117,6 +119,8 @@ module LosantRest
117
119
  raise ArgumentError.new("application is required") unless params.has_key?(:application)
118
120
 
119
121
  body = params[:application] if params.has_key?(:application)
122
+ query_params[:summaryExclude] = params[:summaryExclude] if params.has_key?(:summaryExclude)
123
+ query_params[:summaryInclude] = params[:summaryInclude] if params.has_key?(:summaryInclude)
120
124
  headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
121
125
  query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
122
126
  query_params[:_links] = params[:_links] if params.has_key?(:_links)
@@ -27,7 +27,7 @@ module LosantRest
27
27
  #
28
28
  # User API for accessing Losant data
29
29
  #
30
- # Built For Version 1.14.1
30
+ # Built For Version 1.15.0
31
31
  class Client
32
32
  attr_accessor :auth_token, :url
33
33
 
@@ -224,6 +224,14 @@ module LosantRest
224
224
  @me ||= Me.new(self)
225
225
  end
226
226
 
227
+ def notebook
228
+ @notebook ||= Notebook.new(self)
229
+ end
230
+
231
+ def notebooks
232
+ @notebooks ||= Notebooks.new(self)
233
+ end
234
+
227
235
  def org
228
236
  @org ||= Org.new(self)
229
237
  end
@@ -266,7 +274,7 @@ module LosantRest
266
274
 
267
275
  headers["Accept"] = "application/json"
268
276
  headers["Content-Type"] = "application/json"
269
- headers["Accept-Version"] = "^1.14.1"
277
+ headers["Accept-Version"] = "^1.15.0"
270
278
  headers["Authorization"] = "Bearer #{self.auth_token}" if self.auth_token
271
279
  path = self.url + options.fetch(:path, "")
272
280