losant_rest 1.16.3 → 1.16.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/docs/_schemas.md +1131 -127
  3. data/docs/dashboard.md +2 -0
  4. data/docs/device.md +4 -0
  5. data/docs/devices.md +4 -0
  6. data/docs/me.md +36 -0
  7. data/lib/losant_rest/client.rb +2 -2
  8. data/lib/losant_rest/dashboard.rb +4 -0
  9. data/lib/losant_rest/device.rb +8 -0
  10. data/lib/losant_rest/devices.rb +8 -0
  11. data/lib/losant_rest/me.rb +41 -0
  12. data/lib/losant_rest/version.rb +1 -1
  13. data/schemas/apiTokenPost.json +1 -0
  14. data/schemas/applicationDashboardPost.json +152 -24
  15. data/schemas/dashboard.json +152 -24
  16. data/schemas/dashboardPatch.json +152 -24
  17. data/schemas/dashboardPost.json +152 -24
  18. data/schemas/dashboards.json +152 -24
  19. data/schemas/enableTwoFactorAuth.json +5 -1
  20. data/schemas/experienceLinkedResources.json +3 -0
  21. data/schemas/experienceVersion.json +27 -0
  22. data/schemas/experienceVersionPatch.json +27 -0
  23. data/schemas/experienceVersionPost.json +39 -0
  24. data/schemas/experienceVersions.json +27 -0
  25. data/schemas/flow.json +1 -0
  26. data/schemas/flowPatch.json +1 -0
  27. data/schemas/flowPost.json +1 -0
  28. data/schemas/flowVersion.json +2 -0
  29. data/schemas/flowVersionPost.json +1 -0
  30. data/schemas/flowVersions.json +2 -0
  31. data/schemas/flows.json +1 -0
  32. data/schemas/flowsImportPost.json +2 -0
  33. data/schemas/flowsImportResult.json +3 -0
  34. data/schemas/githubLogin.json +1 -0
  35. data/schemas/importIntoApplicationOptions.json +7 -1
  36. data/schemas/importNewApplicationOptions.json +1 -0
  37. data/schemas/instanceCustomNodePatch.json +1 -0
  38. data/schemas/instanceCustomNodePost.json +1 -0
  39. data/schemas/integration.json +34 -1
  40. data/schemas/integrationPatch.json +34 -1
  41. data/schemas/integrationPost.json +34 -1
  42. data/schemas/integrations.json +34 -1
  43. data/schemas/samlResponse.json +1 -0
  44. data/schemas/twoFactorAuthInfo.json +15 -0
  45. data/schemas/userCredentials.json +1 -0
  46. data/schemas/userPost.json +1 -0
  47. data/schemas/validateContextError.json +3 -0
  48. data/schemas/validateContextSuccess.json +27 -0
  49. metadata +3 -2
data/docs/dashboard.md CHANGED
@@ -189,6 +189,8 @@ No api access token is required to call this action.
189
189
  | dashboardId | string | Y | ID of the associated dashboard | | 575ece2b7ae143cd83dc4a9b |
190
190
  | ctx | [Dashboard Context Instance](_schemas.md#dashboard-context-instance) | Y | The context object to validate | | [Dashboard Context Instance Example](_schemas.md#dashboard-context-instance-example) |
191
191
  | password | string | N | Password for password-protected dashboards | | myPassword |
192
+ | duration | string | N | Duration of data to fetch in milliseconds | | 3600000 |
193
+ | resolution | string | N | Resolution in milliseconds | | 60000 |
192
194
  | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
193
195
 
194
196
  #### Successful Responses
data/docs/device.md CHANGED
@@ -131,6 +131,8 @@ all.Application, all.Application.read, all.Device, all.Device.read, all.Organiza
131
131
  | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
132
132
  | deviceId | string | Y | ID associated with the device | | 575ecf887ae143cd83dc4aa2 |
133
133
  | excludeConnectionInfo | string | N | If set, do not return connection info | | true |
134
+ | tagsAsObject | string | N | Return tags as an object map instead of an array. | | true |
135
+ | attributesAsObject | string | N | Return attributes as an object map instead of an array. | | false |
134
136
  | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
135
137
 
136
138
  #### Successful Responses
@@ -345,6 +347,8 @@ all.Application, all.Organization, all.User, device.*, or device.patch.
345
347
  | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
346
348
  | deviceId | string | Y | ID associated with the device | | 575ecf887ae143cd83dc4aa2 |
347
349
  | device | [Device Patch](_schemas.md#device-patch) | Y | Object containing new properties of the device | | [Device Patch Example](_schemas.md#device-patch-example) |
350
+ | tagsAsObject | string | N | Return tags as an object map instead of an array. | | true |
351
+ | attributesAsObject | string | N | Return attributes as an object map instead of an array. | | false |
348
352
  | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
349
353
 
350
354
  #### Successful Responses
data/docs/devices.md CHANGED
@@ -212,6 +212,8 @@ all.Application, all.Application.read, all.Device, all.Device.read, all.Organiza
212
212
  | excludeConnectionInfo | string | N | If set, do not return connection info | | true |
213
213
  | parentId | string | N | Filter devices as children of a given system id | | 575ecf887ae143cd83dc4aa2 |
214
214
  | query | [Advanced Device Query](_schemas.md#advanced-device-query) | N | Device filter JSON object which overrides the filterField, filter, deviceClass, tagFilter, and parentId parameters. | | [Advanced Device Query Example](_schemas.md#advanced-device-query-example) |
215
+ | tagsAsObject | string | N | Return tags as an object map instead of an array. | | true |
216
+ | attributesAsObject | string | N | Return attributes as an object map instead of an array. | | false |
215
217
  | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
216
218
 
217
219
  #### Successful Responses
@@ -331,6 +333,8 @@ all.Application, all.Organization, all.User, devices.*, or devices.post.
331
333
  | ---- | ---- | -------- | ----------- | ------- | ------- |
332
334
  | applicationId | string | Y | ID associated with the application | | 575ec8687ae143cd83dc4a97 |
333
335
  | device | [Device Post](_schemas.md#device-post) | Y | New device information | | [Device Post Example](_schemas.md#device-post-example) |
336
+ | tagsAsObject | string | N | Return tags as an object map instead of an array. | | true |
337
+ | attributesAsObject | string | N | Return attributes as an object map instead of an array. | | false |
334
338
  | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
335
339
 
336
340
  #### Successful Responses
data/docs/me.md CHANGED
@@ -13,6 +13,7 @@ parameters and the potential responses.
13
13
  * [Disconnect Github](#disconnect-github)
14
14
  * [Enable Two Factor Auth](#enable-two-factor-auth)
15
15
  * [Fetch Recent Items](#fetch-recent-items)
16
+ * [Generate Two Factor Auth](#generate-two-factor-auth)
16
17
  * [Get](#get)
17
18
  * [Patch](#patch)
18
19
  * [Payload Counts](#payload-counts)
@@ -274,6 +275,41 @@ all.User, all.User.read, me.*, or me.fetchRecentItems.
274
275
 
275
276
  <br/>
276
277
 
278
+ ## Generate Two Factor Auth
279
+
280
+ Returns the two factor auth key for a user
281
+
282
+ ```ruby
283
+ result = client.me.generate_two_factor_auth(optional_params)
284
+
285
+ puts result
286
+ ```
287
+
288
+ #### Authentication
289
+ The client must be configured with a valid api access token to call this
290
+ action. The token must include at least one of the following scopes:
291
+ all.User, me.*, or me.generateTwoFactorAuth.
292
+
293
+ #### Available Parameters
294
+
295
+ | Name | Type | Required | Description | Default | Example |
296
+ | ---- | ---- | -------- | ----------- | ------- | ------- |
297
+ | losantdomain | string | N | Domain scope of request (rarely needed) | | example.com |
298
+
299
+ #### Successful Responses
300
+
301
+ | Code | Type | Description |
302
+ | ---- | ---- | ----------- |
303
+ | 200 | [Two Factor Auth Info](_schemas.md#two-factor-auth-info) | Updated user information |
304
+
305
+ #### Error Responses
306
+
307
+ | Code | Type | Description |
308
+ | ---- | ---- | ----------- |
309
+ | 400 | [Error](_schemas.md#error) | Error if malformed request |
310
+
311
+ <br/>
312
+
277
313
  ## Get
278
314
 
279
315
  Retrieves information on the current user
@@ -27,7 +27,7 @@ module LosantRest
27
27
  #
28
28
  # User API for accessing Losant data
29
29
  #
30
- # Built For Version 1.23.3
30
+ # Built For Version 1.23.5
31
31
  class Client
32
32
  attr_accessor :auth_token, :url
33
33
 
@@ -374,7 +374,7 @@ module LosantRest
374
374
 
375
375
  headers["Accept"] = "application/json"
376
376
  headers["Content-Type"] = "application/json"
377
- headers["Accept-Version"] = "^1.23.3"
377
+ headers["Accept-Version"] = "^1.23.5"
378
378
  headers["Authorization"] = "Bearer #{self.auth_token}" if self.auth_token
379
379
  path = self.url + options.fetch(:path, "")
380
380
 
@@ -221,6 +221,8 @@ module LosantRest
221
221
  # * {string} dashboardId - ID of the associated dashboard
222
222
  # * {hash} ctx - The context object to validate (https://api.losant.com/#/definitions/dashboardContextInstance)
223
223
  # * {string} password - Password for password-protected dashboards
224
+ # * {string} duration - Duration of data to fetch in milliseconds
225
+ # * {string} resolution - Resolution in milliseconds
224
226
  # * {string} losantdomain - Domain scope of request (rarely needed)
225
227
  # * {boolean} _actions - Return resource actions in response
226
228
  # * {boolean} _links - Return resource link in response
@@ -243,6 +245,8 @@ module LosantRest
243
245
 
244
246
  body = params[:ctx] if params.has_key?(:ctx)
245
247
  query_params[:password] = params[:password] if params.has_key?(:password)
248
+ query_params[:duration] = params[:duration] if params.has_key?(:duration)
249
+ query_params[:resolution] = params[:resolution] if params.has_key?(:resolution)
246
250
  headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
247
251
  query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
248
252
  query_params[:_links] = params[:_links] if params.has_key?(:_links)
@@ -145,6 +145,8 @@ module LosantRest
145
145
  # * {string} applicationId - ID associated with the application
146
146
  # * {string} deviceId - ID associated with the device
147
147
  # * {string} excludeConnectionInfo - If set, do not return connection info
148
+ # * {string} tagsAsObject - Return tags as an object map instead of an array.
149
+ # * {string} attributesAsObject - Return attributes as an object map instead of an array.
148
150
  # * {string} losantdomain - Domain scope of request (rarely needed)
149
151
  # * {boolean} _actions - Return resource actions in response
150
152
  # * {boolean} _links - Return resource link in response
@@ -166,6 +168,8 @@ module LosantRest
166
168
  raise ArgumentError.new("deviceId is required") unless params.has_key?(:deviceId)
167
169
 
168
170
  query_params[:excludeConnectionInfo] = params[:excludeConnectionInfo] if params.has_key?(:excludeConnectionInfo)
171
+ query_params[:tagsAsObject] = params[:tagsAsObject] if params.has_key?(:tagsAsObject)
172
+ query_params[:attributesAsObject] = params[:attributesAsObject] if params.has_key?(:attributesAsObject)
169
173
  headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
170
174
  query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
171
175
  query_params[:_links] = params[:_links] if params.has_key?(:_links)
@@ -401,6 +405,8 @@ module LosantRest
401
405
  # * {string} applicationId - ID associated with the application
402
406
  # * {string} deviceId - ID associated with the device
403
407
  # * {hash} device - Object containing new properties of the device (https://api.losant.com/#/definitions/devicePatch)
408
+ # * {string} tagsAsObject - Return tags as an object map instead of an array.
409
+ # * {string} attributesAsObject - Return attributes as an object map instead of an array.
404
410
  # * {string} losantdomain - Domain scope of request (rarely needed)
405
411
  # * {boolean} _actions - Return resource actions in response
406
412
  # * {boolean} _links - Return resource link in response
@@ -423,6 +429,8 @@ module LosantRest
423
429
  raise ArgumentError.new("device is required") unless params.has_key?(:device)
424
430
 
425
431
  body = params[:device] if params.has_key?(:device)
432
+ query_params[:tagsAsObject] = params[:tagsAsObject] if params.has_key?(:tagsAsObject)
433
+ query_params[:attributesAsObject] = params[:attributesAsObject] if params.has_key?(:attributesAsObject)
426
434
  headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
427
435
  query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
428
436
  query_params[:_links] = params[:_links] if params.has_key?(:_links)
@@ -250,6 +250,8 @@ module LosantRest
250
250
  # * {string} excludeConnectionInfo - If set, do not return connection info
251
251
  # * {string} parentId - Filter devices as children of a given system id
252
252
  # * {hash} query - Device filter JSON object which overrides the filterField, filter, deviceClass, tagFilter, and parentId parameters. (https://api.losant.com/#/definitions/advancedDeviceQuery)
253
+ # * {string} tagsAsObject - Return tags as an object map instead of an array.
254
+ # * {string} attributesAsObject - Return attributes as an object map instead of an array.
253
255
  # * {string} losantdomain - Domain scope of request (rarely needed)
254
256
  # * {boolean} _actions - Return resource actions in response
255
257
  # * {boolean} _links - Return resource link in response
@@ -281,6 +283,8 @@ module LosantRest
281
283
  query_params[:parentId] = params[:parentId] if params.has_key?(:parentId)
282
284
  query_params[:query] = params[:query] if params.has_key?(:query)
283
285
  query_params[:query] = JSON.dump(query_params[:query]) if query_params.has_key?(:query)
286
+ query_params[:tagsAsObject] = params[:tagsAsObject] if params.has_key?(:tagsAsObject)
287
+ query_params[:attributesAsObject] = params[:attributesAsObject] if params.has_key?(:attributesAsObject)
284
288
  headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
285
289
  query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
286
290
  query_params[:_links] = params[:_links] if params.has_key?(:_links)
@@ -401,6 +405,8 @@ module LosantRest
401
405
  # Parameters:
402
406
  # * {string} applicationId - ID associated with the application
403
407
  # * {hash} device - New device information (https://api.losant.com/#/definitions/devicePost)
408
+ # * {string} tagsAsObject - Return tags as an object map instead of an array.
409
+ # * {string} attributesAsObject - Return attributes as an object map instead of an array.
404
410
  # * {string} losantdomain - Domain scope of request (rarely needed)
405
411
  # * {boolean} _actions - Return resource actions in response
406
412
  # * {boolean} _links - Return resource link in response
@@ -422,6 +428,8 @@ module LosantRest
422
428
  raise ArgumentError.new("device is required") unless params.has_key?(:device)
423
429
 
424
430
  body = params[:device] if params.has_key?(:device)
431
+ query_params[:tagsAsObject] = params[:tagsAsObject] if params.has_key?(:tagsAsObject)
432
+ query_params[:attributesAsObject] = params[:attributesAsObject] if params.has_key?(:attributesAsObject)
425
433
  headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
426
434
  query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
427
435
  query_params[:_links] = params[:_links] if params.has_key?(:_links)
@@ -338,6 +338,47 @@ module LosantRest
338
338
  body: body)
339
339
  end
340
340
 
341
+ # Returns the two factor auth key for a user
342
+ #
343
+ # Authentication:
344
+ # The client must be configured with a valid api
345
+ # access token to call this action. The token
346
+ # must include at least one of the following scopes:
347
+ # all.User, me.*, or me.generateTwoFactorAuth.
348
+ #
349
+ # Parameters:
350
+ # * {string} losantdomain - Domain scope of request (rarely needed)
351
+ # * {boolean} _actions - Return resource actions in response
352
+ # * {boolean} _links - Return resource link in response
353
+ # * {boolean} _embedded - Return embedded resources in response
354
+ #
355
+ # Responses:
356
+ # * 200 - Updated user information (https://api.losant.com/#/definitions/twoFactorAuthInfo)
357
+ #
358
+ # Errors:
359
+ # * 400 - Error if malformed request (https://api.losant.com/#/definitions/error)
360
+ def generate_two_factor_auth(params = {})
361
+ params = Utils.symbolize_hash_keys(params)
362
+ query_params = { _actions: false, _links: true, _embedded: true }
363
+ headers = {}
364
+ body = nil
365
+
366
+
367
+ headers[:losantdomain] = params[:losantdomain] if params.has_key?(:losantdomain)
368
+ query_params[:_actions] = params[:_actions] if params.has_key?(:_actions)
369
+ query_params[:_links] = params[:_links] if params.has_key?(:_links)
370
+ query_params[:_embedded] = params[:_embedded] if params.has_key?(:_embedded)
371
+
372
+ path = "/me/generateTwoFactorAuth"
373
+
374
+ @client.request(
375
+ method: :patch,
376
+ path: path,
377
+ query: query_params,
378
+ headers: headers,
379
+ body: body)
380
+ end
381
+
341
382
  # Retrieves information on the current user
342
383
  #
343
384
  # Authentication:
@@ -21,5 +21,5 @@
21
21
  # SOFTWARE.
22
22
 
23
23
  module LosantRest
24
- VERSION = "1.16.3"
24
+ VERSION = "1.16.5"
25
25
  end
@@ -426,6 +426,7 @@
426
426
  "me.delete",
427
427
  "me.verifyEmail",
428
428
  "me.changePassword",
429
+ "me.generateTwoFactorAuth",
429
430
  "me.enableTwoFactorAuth",
430
431
  "me.disableTwoFactorAuth",
431
432
  "me.disconnectGithub",
@@ -112,8 +112,18 @@
112
112
  "type": "boolean"
113
113
  },
114
114
  "duration": {
115
- "type": "integer",
116
- "minimum": 0
115
+ "oneOf": [
116
+ {
117
+ "type": "integer",
118
+ "minimum": 0
119
+ },
120
+ {
121
+ "type": "string",
122
+ "enum": [
123
+ "{{dashboard.duration}}"
124
+ ]
125
+ }
126
+ ]
117
127
  },
118
128
  "xAxisFormat": {
119
129
  "type": "string",
@@ -554,8 +564,18 @@
554
564
  }
555
565
  },
556
566
  "duration": {
557
- "type": "integer",
558
- "minimum": 0
567
+ "oneOf": [
568
+ {
569
+ "type": "integer",
570
+ "minimum": 0
571
+ },
572
+ {
573
+ "type": "string",
574
+ "enum": [
575
+ "{{dashboard.duration}}"
576
+ ]
577
+ }
578
+ ]
559
579
  },
560
580
  "resolution": {
561
581
  "oneOf": [
@@ -727,8 +747,18 @@
727
747
  }
728
748
  },
729
749
  "duration": {
730
- "type": "integer",
731
- "minimum": 0
750
+ "oneOf": [
751
+ {
752
+ "type": "integer",
753
+ "minimum": 0
754
+ },
755
+ {
756
+ "type": "string",
757
+ "enum": [
758
+ "{{dashboard.duration}}"
759
+ ]
760
+ }
761
+ ]
732
762
  }
733
763
  },
734
764
  "additionalProperties": false
@@ -1463,8 +1493,18 @@
1463
1493
  }
1464
1494
  },
1465
1495
  "duration": {
1466
- "type": "integer",
1467
- "minimum": 0
1496
+ "oneOf": [
1497
+ {
1498
+ "type": "integer",
1499
+ "minimum": 0
1500
+ },
1501
+ {
1502
+ "type": "string",
1503
+ "enum": [
1504
+ "{{dashboard.duration}}"
1505
+ ]
1506
+ }
1507
+ ]
1468
1508
  },
1469
1509
  "sortDirection": {
1470
1510
  "type": "integer",
@@ -1713,8 +1753,18 @@
1713
1753
  "type": "boolean"
1714
1754
  },
1715
1755
  "duration": {
1716
- "type": "integer",
1717
- "minimum": 0
1756
+ "oneOf": [
1757
+ {
1758
+ "type": "integer",
1759
+ "minimum": 0
1760
+ },
1761
+ {
1762
+ "type": "string",
1763
+ "enum": [
1764
+ "{{dashboard.duration}}"
1765
+ ]
1766
+ }
1767
+ ]
1718
1768
  },
1719
1769
  "gaugeMax": {
1720
1770
  "oneOf": [
@@ -2035,8 +2085,18 @@
2035
2085
  "type": "boolean"
2036
2086
  },
2037
2087
  "duration": {
2038
- "type": "integer",
2039
- "minimum": 0
2088
+ "oneOf": [
2089
+ {
2090
+ "type": "integer",
2091
+ "minimum": 0
2092
+ },
2093
+ {
2094
+ "type": "string",
2095
+ "enum": [
2096
+ "{{dashboard.duration}}"
2097
+ ]
2098
+ }
2099
+ ]
2040
2100
  },
2041
2101
  "resolution": {
2042
2102
  "oneOf": [
@@ -2411,8 +2471,18 @@
2411
2471
  }
2412
2472
  },
2413
2473
  "duration": {
2414
- "type": "integer",
2415
- "minimum": 0
2474
+ "oneOf": [
2475
+ {
2476
+ "type": "integer",
2477
+ "minimum": 0
2478
+ },
2479
+ {
2480
+ "type": "string",
2481
+ "enum": [
2482
+ "{{dashboard.duration}}"
2483
+ ]
2484
+ }
2485
+ ]
2416
2486
  },
2417
2487
  "locationTagKey": {
2418
2488
  "oneOf": [
@@ -2800,8 +2870,18 @@
2800
2870
  }
2801
2871
  },
2802
2872
  "duration": {
2803
- "type": "integer",
2804
- "minimum": 0
2873
+ "oneOf": [
2874
+ {
2875
+ "type": "integer",
2876
+ "minimum": 0
2877
+ },
2878
+ {
2879
+ "type": "string",
2880
+ "enum": [
2881
+ "{{dashboard.duration}}"
2882
+ ]
2883
+ }
2884
+ ]
2805
2885
  }
2806
2886
  },
2807
2887
  "additionalProperties": false
@@ -3256,8 +3336,18 @@
3256
3336
  "type": "boolean"
3257
3337
  },
3258
3338
  "duration": {
3259
- "type": "integer",
3260
- "minimum": 0
3339
+ "oneOf": [
3340
+ {
3341
+ "type": "integer",
3342
+ "minimum": 0
3343
+ },
3344
+ {
3345
+ "type": "string",
3346
+ "enum": [
3347
+ "{{dashboard.duration}}"
3348
+ ]
3349
+ }
3350
+ ]
3261
3351
  },
3262
3352
  "segments": {
3263
3353
  "type": "array",
@@ -4685,8 +4775,18 @@
4685
4775
  }
4686
4776
  },
4687
4777
  "duration": {
4688
- "type": "integer",
4689
- "minimum": 0
4778
+ "oneOf": [
4779
+ {
4780
+ "type": "integer",
4781
+ "minimum": 0
4782
+ },
4783
+ {
4784
+ "type": "string",
4785
+ "enum": [
4786
+ "{{dashboard.duration}}"
4787
+ ]
4788
+ }
4789
+ ]
4690
4790
  },
4691
4791
  "endColor": {
4692
4792
  "type": "string",
@@ -4881,8 +4981,18 @@
4881
4981
  "type": "boolean"
4882
4982
  },
4883
4983
  "duration": {
4884
- "type": "integer",
4885
- "minimum": 0
4984
+ "oneOf": [
4985
+ {
4986
+ "type": "integer",
4987
+ "minimum": 0
4988
+ },
4989
+ {
4990
+ "type": "string",
4991
+ "enum": [
4992
+ "{{dashboard.duration}}"
4993
+ ]
4994
+ }
4995
+ ]
4886
4996
  },
4887
4997
  "percentFormat": {
4888
4998
  "type": "string",
@@ -5196,8 +5306,18 @@
5196
5306
  }
5197
5307
  },
5198
5308
  "duration": {
5199
- "type": "integer",
5200
- "minimum": 0
5309
+ "oneOf": [
5310
+ {
5311
+ "type": "integer",
5312
+ "minimum": 0
5313
+ },
5314
+ {
5315
+ "type": "string",
5316
+ "enum": [
5317
+ "{{dashboard.duration}}"
5318
+ ]
5319
+ }
5320
+ ]
5201
5321
  },
5202
5322
  "endColor": {
5203
5323
  "type": "string",
@@ -5428,6 +5548,14 @@
5428
5548
  "minimum": 5,
5429
5549
  "maximum": 600
5430
5550
  },
5551
+ "duration": {
5552
+ "type": "integer",
5553
+ "minimum": 1
5554
+ },
5555
+ "resolution": {
5556
+ "type": "integer",
5557
+ "minimum": 1
5558
+ },
5431
5559
  "defaultTheme": {
5432
5560
  "type": "string",
5433
5561
  "enum": [