losant_rest 1.2.1 → 1.2.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7dc37858179ca1de41ef93fbb30937193cddd9d5
4
- data.tar.gz: fb41cbf5d02a1fc1c17cc8a23b8a800484ef1a15
3
+ metadata.gz: 65b7f0024f51f1ea6c68c00753d586ce964be213
4
+ data.tar.gz: f4f3b4bc5c1dbd07a71cbc9b28eb6c8b63b6642d
5
5
  SHA512:
6
- metadata.gz: 212bff8aeccd7b19da7777a84a2c13106146b65e2fab93e3a9c464a35ae3921522dbfcb081a442c127494f559432851f37ad9ff1764d4722557109739d9d572c
7
- data.tar.gz: cf964850c8fbfebab80bad7c507f2fa4ae606ec0e37cb9f9f894fa1946d91eb31d35e6ed7d78993e4b87c198767e37349708243c19577711af7dfd5fa12d6d8a
6
+ metadata.gz: 7a8fa656387ca0027a093624183c04682765282f09ec197ca17e7cd804173ac094df4f14bea42f3f34a8e584da17a5e8b868742dca0e3b5fdfb6539ea64ea2aa
7
+ data.tar.gz: 91aa7fc39c33959a36bb135ba03b6f638553ec2698027fae79e07fc00d9ee001c66a255899e05d3a27cc291a5bbd3685f69dbe63f4c7156c61957f2f8d7f8079
data/README.md CHANGED
@@ -224,6 +224,16 @@ Contains all the actions that can be performed against the collection of
224
224
  [Workflows](https://docs.losant.com/workflows/overview/) belonging
225
225
  to an Application - such as listing the workflows or creating a new workflow.
226
226
 
227
+ * [flow_version](docs/flowVersion.md)
228
+ Contains all the actions that can be performed against a single
229
+ [Workflow Version](https://docs.losant.com/workflows/versioning/), such as enabling or
230
+ disabling a workflow version, or updating the version notes.
231
+
232
+ * [flow_versions](docs/flowVersions.md)
233
+ Contains all the actions that can be performed against the collection of
234
+ [Workflow Versions](https://docs.losant.com/workflows/versioning/) belonging
235
+ to a Workflow - such as listing the versions or creating a new version.
236
+
227
237
  * [integration](docs/integration.md)
228
238
  Contains all the actions that can be performed against a single
229
239
  [Integration](https://docs.losant.com/applications/integrations/), which
data/docs/_schemas.md CHANGED
@@ -67,6 +67,10 @@
67
67
  * [Workflow Storage Entries](#workflow-storage-entries)
68
68
  * [Workflow Storage Entry](#workflow-storage-entry)
69
69
  * [Workflow Trigger Filter](#workflow-trigger-filter)
70
+ * [Workflow Version](#workflow-version)
71
+ * [Workflow Version Patch](#workflow-version-patch)
72
+ * [Workflow Version Post](#workflow-version-post)
73
+ * [Workflow Versions](#workflow-versions)
70
74
  * [Workflows](#workflows)
71
75
  * [Github Login](#github-login)
72
76
  * [Integrations](#integrations)
@@ -446,6 +450,8 @@ Schema for the body of an Application API Token creation request
446
450
  "integrations.*",
447
451
  "flow.*",
448
452
  "flows.*",
453
+ "flowVersion.*",
454
+ "flowVersions.*",
449
455
  "webhook.*",
450
456
  "webhooks.*",
451
457
  "application.delete",
@@ -517,6 +523,12 @@ Schema for the body of an Application API Token creation request
517
523
  "flow.setStorageEntry",
518
524
  "flows.get",
519
525
  "flows.post",
526
+ "flowVersion.delete",
527
+ "flowVersion.get",
528
+ "flowVersion.log",
529
+ "flowVersion.patch",
530
+ "flowVersions.get",
531
+ "flowVersions.post",
520
532
  "integration.delete",
521
533
  "integration.get",
522
534
  "integration.patch",
@@ -1938,16 +1950,16 @@ Schema for a single Dashboard
1938
1950
  "pattern": "^[A-Fa-f\\d]{24}$"
1939
1951
  },
1940
1952
  "startX": {
1941
- "type": "integer"
1953
+ "type": "number"
1942
1954
  },
1943
1955
  "startY": {
1944
- "type": "integer"
1956
+ "type": "number"
1945
1957
  },
1946
1958
  "width": {
1947
- "type": "integer"
1959
+ "type": "number"
1948
1960
  },
1949
1961
  "height": {
1950
- "type": "integer"
1962
+ "type": "number"
1951
1963
  },
1952
1964
  "config": {
1953
1965
  "type": "object"
@@ -2144,16 +2156,16 @@ Schema for the body of a Dashboard modification request
2144
2156
  "pattern": "^[A-Fa-f\\d]{24}$"
2145
2157
  },
2146
2158
  "startX": {
2147
- "type": "integer"
2159
+ "type": "number"
2148
2160
  },
2149
2161
  "startY": {
2150
- "type": "integer"
2162
+ "type": "number"
2151
2163
  },
2152
2164
  "width": {
2153
- "type": "integer"
2165
+ "type": "number"
2154
2166
  },
2155
2167
  "height": {
2156
- "type": "integer"
2168
+ "type": "number"
2157
2169
  },
2158
2170
  "config": {
2159
2171
  "type": "object"
@@ -2334,16 +2346,16 @@ Schema for the body of a Dashboard creation request
2334
2346
  "pattern": "^[A-Fa-f\\d]{24}$"
2335
2347
  },
2336
2348
  "startX": {
2337
- "type": "integer"
2349
+ "type": "number"
2338
2350
  },
2339
2351
  "startY": {
2340
- "type": "integer"
2352
+ "type": "number"
2341
2353
  },
2342
2354
  "width": {
2343
- "type": "integer"
2355
+ "type": "number"
2344
2356
  },
2345
2357
  "height": {
2346
- "type": "integer"
2358
+ "type": "number"
2347
2359
  },
2348
2360
  "config": {
2349
2361
  "type": "object"
@@ -2570,16 +2582,16 @@ Schema for a collection of Dashboards
2570
2582
  "pattern": "^[A-Fa-f\\d]{24}$"
2571
2583
  },
2572
2584
  "startX": {
2573
- "type": "integer"
2585
+ "type": "number"
2574
2586
  },
2575
2587
  "startY": {
2576
- "type": "integer"
2588
+ "type": "number"
2577
2589
  },
2578
2590
  "width": {
2579
- "type": "integer"
2591
+ "type": "number"
2580
2592
  },
2581
2593
  "height": {
2582
- "type": "integer"
2594
+ "type": "number"
2583
2595
  },
2584
2596
  "config": {
2585
2597
  "type": "object"
@@ -4111,6 +4123,11 @@ Schema for a single device state or an array of device states
4111
4123
  }
4112
4124
  },
4113
4125
  "additionalProperties": false
4126
+ },
4127
+ "flowVersion": {
4128
+ "type": "string",
4129
+ "minLength": 1,
4130
+ "maxLength": 255
4114
4131
  }
4115
4132
  },
4116
4133
  "required": [
@@ -4165,6 +4182,11 @@ Schema for a single device state or an array of device states
4165
4182
  }
4166
4183
  },
4167
4184
  "additionalProperties": false
4185
+ },
4186
+ "flowVersion": {
4187
+ "type": "string",
4188
+ "minLength": 1,
4189
+ "maxLength": 255
4168
4190
  }
4169
4191
  },
4170
4192
  "required": [
@@ -4242,6 +4264,11 @@ Schema for an array of Device states
4242
4264
  }
4243
4265
  },
4244
4266
  "additionalProperties": false
4267
+ },
4268
+ "flowVersion": {
4269
+ "type": "string",
4270
+ "minLength": 1,
4271
+ "maxLength": 255
4245
4272
  }
4246
4273
  },
4247
4274
  "required": [
@@ -6289,6 +6316,10 @@ Schema for a single Workflow
6289
6316
  "enabled": {
6290
6317
  "type": "boolean"
6291
6318
  },
6319
+ "defaultVersionId": {
6320
+ "type": "string",
6321
+ "pattern": "^[A-Fa-f\\d]{24}$"
6322
+ },
6292
6323
  "triggers": {
6293
6324
  "type": "array",
6294
6325
  "items": {
@@ -6409,6 +6440,22 @@ Schema for a single Workflow
6409
6440
  },
6410
6441
  "errorCount": {
6411
6442
  "type": "number"
6443
+ },
6444
+ "byVersion": {
6445
+ "type": "object",
6446
+ "patternProperties": {
6447
+ ".*": {
6448
+ "type": "object",
6449
+ "properties": {
6450
+ "runCount": {
6451
+ "type": "number"
6452
+ },
6453
+ "errorCount": {
6454
+ "type": "number"
6455
+ }
6456
+ }
6457
+ }
6458
+ }
6412
6459
  }
6413
6460
  }
6414
6461
  }
@@ -6452,6 +6499,9 @@ Log of aggregated workflow run information
6452
6499
  "items": {
6453
6500
  "type": "object",
6454
6501
  "properties": {
6502
+ "flowVersionId": {
6503
+ "type": "string"
6504
+ },
6455
6505
  "time": {
6456
6506
  "type": "string",
6457
6507
  "format": "date-time"
@@ -6538,6 +6588,17 @@ Schema for the body of a Workflow modification request
6538
6588
  "enabled": {
6539
6589
  "type": "boolean"
6540
6590
  },
6591
+ "defaultVersionId": {
6592
+ "oneOf": [
6593
+ {
6594
+ "type": "string",
6595
+ "pattern": "^[A-Fa-f\\d]{24}$"
6596
+ },
6597
+ {
6598
+ "type": "null"
6599
+ }
6600
+ ]
6601
+ },
6541
6602
  "triggers": {
6542
6603
  "type": "array",
6543
6604
  "items": {
@@ -6924,125 +6985,740 @@ Array of triggers for filtering workflows. Trigger keys and trigger types are op
6924
6985
 
6925
6986
  <br/>
6926
6987
 
6927
- ## Workflows
6988
+ ## Workflow Version
6928
6989
 
6929
- Schema for a collection of Workflows
6990
+ Schema for a single Workflow Version
6930
6991
 
6931
- ### <a name="workflows-schema"></a> Schema
6992
+ ### <a name="workflow-version-schema"></a> Schema
6932
6993
 
6933
6994
  ```json
6934
6995
  {
6935
6996
  "$schema": "http://json-schema.org/draft-04/schema#",
6936
6997
  "type": "object",
6937
6998
  "properties": {
6938
- "items": {
6999
+ "id": {
7000
+ "type": "string",
7001
+ "pattern": "^[A-Fa-f\\d]{24}$"
7002
+ },
7003
+ "flowVersionId": {
7004
+ "type": "string",
7005
+ "pattern": "^[A-Fa-f\\d]{24}$"
7006
+ },
7007
+ "flowId": {
7008
+ "type": "string",
7009
+ "pattern": "^[A-Fa-f\\d]{24}$"
7010
+ },
7011
+ "applicationId": {
7012
+ "type": "string",
7013
+ "pattern": "^[A-Fa-f\\d]{24}$"
7014
+ },
7015
+ "creationDate": {
7016
+ "type": "string",
7017
+ "format": "date-time"
7018
+ },
7019
+ "lastUpdated": {
7020
+ "type": "string",
7021
+ "format": "date-time"
7022
+ },
7023
+ "version": {
7024
+ "type": "string",
7025
+ "minLength": 1,
7026
+ "maxLength": 255
7027
+ },
7028
+ "notes": {
7029
+ "type": "string",
7030
+ "maxLength": 32767
7031
+ },
7032
+ "enabled": {
7033
+ "type": "boolean"
7034
+ },
7035
+ "triggers": {
6939
7036
  "type": "array",
6940
7037
  "items": {
6941
- "title": "Workflow",
6942
- "description": "Schema for a single Workflow",
6943
7038
  "type": "object",
6944
7039
  "properties": {
6945
- "id": {
7040
+ "key": {
6946
7041
  "type": "string",
6947
- "pattern": "^[A-Fa-f\\d]{24}$"
7042
+ "maxLength": 1024
6948
7043
  },
6949
- "flowId": {
7044
+ "type": {
6950
7045
  "type": "string",
6951
- "pattern": "^[A-Fa-f\\d]{24}$"
7046
+ "enum": [
7047
+ "deviceId",
7048
+ "deviceIdConnect",
7049
+ "deviceIdDisconnect",
7050
+ "deviceTag",
7051
+ "deviceTagConnect",
7052
+ "deviceTagDisconnect",
7053
+ "endpoint",
7054
+ "event",
7055
+ "mqttTopic",
7056
+ "integration",
7057
+ "timer",
7058
+ "virtualButton",
7059
+ "webhook"
7060
+ ]
6952
7061
  },
6953
- "applicationId": {
6954
- "type": "string",
6955
- "pattern": "^[A-Fa-f\\d]{24}$"
7062
+ "config": {
7063
+ "type": "object"
6956
7064
  },
6957
- "creationDate": {
6958
- "type": "string",
6959
- "format": "date-time"
7065
+ "meta": {
7066
+ "type": "object"
6960
7067
  },
6961
- "lastUpdated": {
7068
+ "outputIds": {
7069
+ "type": "array",
7070
+ "items": {
7071
+ "type": "array",
7072
+ "items": {
7073
+ "type": "string",
7074
+ "maxLength": 255
7075
+ },
7076
+ "maxItems": 100
7077
+ },
7078
+ "maxItems": 100
7079
+ }
7080
+ },
7081
+ "additionalProperties": false,
7082
+ "required": [
7083
+ "type"
7084
+ ]
7085
+ }
7086
+ },
7087
+ "nodes": {
7088
+ "type": "array",
7089
+ "items": {
7090
+ "type": "object",
7091
+ "properties": {
7092
+ "id": {
6962
7093
  "type": "string",
6963
- "format": "date-time"
7094
+ "maxLength": 1024
6964
7095
  },
6965
- "name": {
7096
+ "type": {
6966
7097
  "type": "string",
6967
7098
  "minLength": 1,
6968
- "maxLength": 255
7099
+ "maxLength": 1024
6969
7100
  },
6970
- "description": {
6971
- "type": "string",
6972
- "maxLength": 32767
7101
+ "config": {
7102
+ "type": "object"
6973
7103
  },
6974
- "enabled": {
6975
- "type": "boolean"
7104
+ "meta": {
7105
+ "type": "object"
6976
7106
  },
6977
- "triggers": {
7107
+ "outputIds": {
6978
7108
  "type": "array",
6979
7109
  "items": {
6980
- "type": "object",
6981
- "properties": {
6982
- "key": {
6983
- "type": "string",
6984
- "maxLength": 1024
6985
- },
6986
- "type": {
6987
- "type": "string",
6988
- "enum": [
6989
- "deviceId",
6990
- "deviceIdConnect",
6991
- "deviceIdDisconnect",
6992
- "deviceTag",
6993
- "deviceTagConnect",
6994
- "deviceTagDisconnect",
6995
- "endpoint",
6996
- "event",
6997
- "mqttTopic",
6998
- "integration",
6999
- "timer",
7000
- "virtualButton",
7001
- "webhook"
7002
- ]
7003
- },
7004
- "config": {
7005
- "type": "object"
7006
- },
7007
- "meta": {
7008
- "type": "object"
7009
- },
7010
- "outputIds": {
7011
- "type": "array",
7012
- "items": {
7013
- "type": "array",
7014
- "items": {
7015
- "type": "string",
7016
- "maxLength": 255
7017
- },
7018
- "maxItems": 100
7019
- },
7020
- "maxItems": 100
7021
- }
7110
+ "type": "array",
7111
+ "items": {
7112
+ "type": "string",
7113
+ "maxLength": 255
7022
7114
  },
7023
- "additionalProperties": false,
7024
- "required": [
7025
- "type"
7026
- ]
7027
- }
7115
+ "maxItems": 100
7116
+ },
7117
+ "maxItems": 100
7118
+ }
7119
+ },
7120
+ "additionalProperties": false,
7121
+ "required": [
7122
+ "type"
7123
+ ]
7124
+ }
7125
+ },
7126
+ "globals": {
7127
+ "type": "array",
7128
+ "items": {
7129
+ "type": "object",
7130
+ "properties": {
7131
+ "key": {
7132
+ "type": "string",
7133
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
7028
7134
  },
7029
- "nodes": {
7030
- "type": "array",
7031
- "items": {
7032
- "type": "object",
7033
- "properties": {
7034
- "id": {
7035
- "type": "string",
7036
- "maxLength": 1024
7037
- },
7038
- "type": {
7039
- "type": "string",
7040
- "minLength": 1,
7041
- "maxLength": 1024
7042
- },
7043
- "config": {
7044
- "type": "object"
7045
- },
7135
+ "json": {
7136
+ "type": "string",
7137
+ "minLength": 1
7138
+ }
7139
+ },
7140
+ "additionalProperties": false,
7141
+ "required": [
7142
+ "key",
7143
+ "json"
7144
+ ]
7145
+ }
7146
+ }
7147
+ }
7148
+ }
7149
+ ```
7150
+ ### <a name="workflow-version-example"></a> Example
7151
+
7152
+ ```json
7153
+ {
7154
+ "id": "675ed18f7ae143cd83dc4bb7",
7155
+ "flowVersionId": "675ed18f7ae143cd83dc4bb7",
7156
+ "flowId": "575ed18f7ae143cd83dc4aa6",
7157
+ "applicationId": "575ec8687ae143cd83dc4a97",
7158
+ "creationDate": "2016-06-13T04:00:00.000Z",
7159
+ "lastUpdated": "2016-06-13T04:00:00.000Z",
7160
+ "version": "v1.2.3",
7161
+ "notes": "Description of my workflow version",
7162
+ "enabled": true,
7163
+ "triggers": [],
7164
+ "nodes": [],
7165
+ "globals": []
7166
+ }
7167
+ ```
7168
+
7169
+ <br/>
7170
+
7171
+ ## Workflow Version Patch
7172
+
7173
+ Schema for the body of a Workflow Version modification request
7174
+
7175
+ ### <a name="workflow-version-patch-schema"></a> Schema
7176
+
7177
+ ```json
7178
+ {
7179
+ "$schema": "http://json-schema.org/draft-04/schema#",
7180
+ "type": "object",
7181
+ "properties": {
7182
+ "notes": {
7183
+ "type": "string",
7184
+ "maxLength": 32767
7185
+ },
7186
+ "enabled": {
7187
+ "type": "boolean"
7188
+ }
7189
+ },
7190
+ "additionalProperties": false
7191
+ }
7192
+ ```
7193
+ ### <a name="workflow-version-patch-example"></a> Example
7194
+
7195
+ ```json
7196
+ {
7197
+ "notes": "Updated workflow version notes",
7198
+ "enabled": false
7199
+ }
7200
+ ```
7201
+
7202
+ <br/>
7203
+
7204
+ ## Workflow Version Post
7205
+
7206
+ Schema for the body of a Workflow Version creation request
7207
+
7208
+ ### <a name="workflow-version-post-schema"></a> Schema
7209
+
7210
+ ```json
7211
+ {
7212
+ "$schema": "http://json-schema.org/draft-04/schema#",
7213
+ "type": "object",
7214
+ "properties": {
7215
+ "version": {
7216
+ "type": "string",
7217
+ "minLength": 1,
7218
+ "maxLength": 255
7219
+ },
7220
+ "notes": {
7221
+ "type": "string",
7222
+ "maxLength": 32767
7223
+ },
7224
+ "enabled": {
7225
+ "type": "boolean"
7226
+ },
7227
+ "triggers": {
7228
+ "type": "array",
7229
+ "items": {
7230
+ "type": "object",
7231
+ "properties": {
7232
+ "key": {
7233
+ "type": "string",
7234
+ "maxLength": 1024
7235
+ },
7236
+ "type": {
7237
+ "type": "string",
7238
+ "enum": [
7239
+ "deviceId",
7240
+ "deviceIdConnect",
7241
+ "deviceIdDisconnect",
7242
+ "deviceTag",
7243
+ "deviceTagConnect",
7244
+ "deviceTagDisconnect",
7245
+ "endpoint",
7246
+ "event",
7247
+ "mqttTopic",
7248
+ "integration",
7249
+ "timer",
7250
+ "virtualButton",
7251
+ "webhook"
7252
+ ]
7253
+ },
7254
+ "config": {
7255
+ "type": "object"
7256
+ },
7257
+ "meta": {
7258
+ "type": "object"
7259
+ },
7260
+ "outputIds": {
7261
+ "type": "array",
7262
+ "items": {
7263
+ "type": "array",
7264
+ "items": {
7265
+ "type": "string",
7266
+ "maxLength": 255
7267
+ },
7268
+ "maxItems": 100
7269
+ },
7270
+ "maxItems": 100
7271
+ }
7272
+ },
7273
+ "additionalProperties": false,
7274
+ "required": [
7275
+ "type"
7276
+ ]
7277
+ }
7278
+ },
7279
+ "nodes": {
7280
+ "type": "array",
7281
+ "items": {
7282
+ "type": "object",
7283
+ "properties": {
7284
+ "id": {
7285
+ "type": "string",
7286
+ "maxLength": 1024
7287
+ },
7288
+ "type": {
7289
+ "type": "string",
7290
+ "minLength": 1,
7291
+ "maxLength": 1024
7292
+ },
7293
+ "config": {
7294
+ "type": "object"
7295
+ },
7296
+ "meta": {
7297
+ "type": "object"
7298
+ },
7299
+ "outputIds": {
7300
+ "type": "array",
7301
+ "items": {
7302
+ "type": "array",
7303
+ "items": {
7304
+ "type": "string",
7305
+ "maxLength": 255
7306
+ },
7307
+ "maxItems": 100
7308
+ },
7309
+ "maxItems": 100
7310
+ }
7311
+ },
7312
+ "additionalProperties": false,
7313
+ "required": [
7314
+ "type"
7315
+ ]
7316
+ }
7317
+ },
7318
+ "globals": {
7319
+ "type": "array",
7320
+ "items": {
7321
+ "type": "object",
7322
+ "properties": {
7323
+ "key": {
7324
+ "type": "string",
7325
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
7326
+ },
7327
+ "json": {
7328
+ "type": "string",
7329
+ "minLength": 1
7330
+ }
7331
+ },
7332
+ "additionalProperties": false,
7333
+ "required": [
7334
+ "key",
7335
+ "json"
7336
+ ]
7337
+ }
7338
+ }
7339
+ },
7340
+ "additionalProperties": false,
7341
+ "required": [
7342
+ "version"
7343
+ ]
7344
+ }
7345
+ ```
7346
+ ### <a name="workflow-version-post-example"></a> Example
7347
+
7348
+ ```json
7349
+ {
7350
+ "version": "v1.2.3",
7351
+ "notes": "Notes about my new workflow version",
7352
+ "enabled": false
7353
+ }
7354
+ ```
7355
+
7356
+ <br/>
7357
+
7358
+ ## Workflow Versions
7359
+
7360
+ Schema for a collection of Workflow Versions
7361
+
7362
+ ### <a name="workflow-versions-schema"></a> Schema
7363
+
7364
+ ```json
7365
+ {
7366
+ "$schema": "http://json-schema.org/draft-04/schema#",
7367
+ "type": "object",
7368
+ "properties": {
7369
+ "items": {
7370
+ "type": "array",
7371
+ "items": {
7372
+ "title": "Workflow Version",
7373
+ "description": "Schema for a single Workflow Version",
7374
+ "type": "object",
7375
+ "properties": {
7376
+ "id": {
7377
+ "type": "string",
7378
+ "pattern": "^[A-Fa-f\\d]{24}$"
7379
+ },
7380
+ "flowVersionId": {
7381
+ "type": "string",
7382
+ "pattern": "^[A-Fa-f\\d]{24}$"
7383
+ },
7384
+ "flowId": {
7385
+ "type": "string",
7386
+ "pattern": "^[A-Fa-f\\d]{24}$"
7387
+ },
7388
+ "applicationId": {
7389
+ "type": "string",
7390
+ "pattern": "^[A-Fa-f\\d]{24}$"
7391
+ },
7392
+ "creationDate": {
7393
+ "type": "string",
7394
+ "format": "date-time"
7395
+ },
7396
+ "lastUpdated": {
7397
+ "type": "string",
7398
+ "format": "date-time"
7399
+ },
7400
+ "version": {
7401
+ "type": "string",
7402
+ "minLength": 1,
7403
+ "maxLength": 255
7404
+ },
7405
+ "notes": {
7406
+ "type": "string",
7407
+ "maxLength": 32767
7408
+ },
7409
+ "enabled": {
7410
+ "type": "boolean"
7411
+ },
7412
+ "triggers": {
7413
+ "type": "array",
7414
+ "items": {
7415
+ "type": "object",
7416
+ "properties": {
7417
+ "key": {
7418
+ "type": "string",
7419
+ "maxLength": 1024
7420
+ },
7421
+ "type": {
7422
+ "type": "string",
7423
+ "enum": [
7424
+ "deviceId",
7425
+ "deviceIdConnect",
7426
+ "deviceIdDisconnect",
7427
+ "deviceTag",
7428
+ "deviceTagConnect",
7429
+ "deviceTagDisconnect",
7430
+ "endpoint",
7431
+ "event",
7432
+ "mqttTopic",
7433
+ "integration",
7434
+ "timer",
7435
+ "virtualButton",
7436
+ "webhook"
7437
+ ]
7438
+ },
7439
+ "config": {
7440
+ "type": "object"
7441
+ },
7442
+ "meta": {
7443
+ "type": "object"
7444
+ },
7445
+ "outputIds": {
7446
+ "type": "array",
7447
+ "items": {
7448
+ "type": "array",
7449
+ "items": {
7450
+ "type": "string",
7451
+ "maxLength": 255
7452
+ },
7453
+ "maxItems": 100
7454
+ },
7455
+ "maxItems": 100
7456
+ }
7457
+ },
7458
+ "additionalProperties": false,
7459
+ "required": [
7460
+ "type"
7461
+ ]
7462
+ }
7463
+ },
7464
+ "nodes": {
7465
+ "type": "array",
7466
+ "items": {
7467
+ "type": "object",
7468
+ "properties": {
7469
+ "id": {
7470
+ "type": "string",
7471
+ "maxLength": 1024
7472
+ },
7473
+ "type": {
7474
+ "type": "string",
7475
+ "minLength": 1,
7476
+ "maxLength": 1024
7477
+ },
7478
+ "config": {
7479
+ "type": "object"
7480
+ },
7481
+ "meta": {
7482
+ "type": "object"
7483
+ },
7484
+ "outputIds": {
7485
+ "type": "array",
7486
+ "items": {
7487
+ "type": "array",
7488
+ "items": {
7489
+ "type": "string",
7490
+ "maxLength": 255
7491
+ },
7492
+ "maxItems": 100
7493
+ },
7494
+ "maxItems": 100
7495
+ }
7496
+ },
7497
+ "additionalProperties": false,
7498
+ "required": [
7499
+ "type"
7500
+ ]
7501
+ }
7502
+ },
7503
+ "globals": {
7504
+ "type": "array",
7505
+ "items": {
7506
+ "type": "object",
7507
+ "properties": {
7508
+ "key": {
7509
+ "type": "string",
7510
+ "pattern": "^[0-9a-zA-Z_-]{1,255}$"
7511
+ },
7512
+ "json": {
7513
+ "type": "string",
7514
+ "minLength": 1
7515
+ }
7516
+ },
7517
+ "additionalProperties": false,
7518
+ "required": [
7519
+ "key",
7520
+ "json"
7521
+ ]
7522
+ }
7523
+ }
7524
+ }
7525
+ }
7526
+ },
7527
+ "count": {
7528
+ "type": "integer"
7529
+ },
7530
+ "totalCount": {
7531
+ "type": "integer"
7532
+ },
7533
+ "perPage": {
7534
+ "type": "integer"
7535
+ },
7536
+ "page": {
7537
+ "type": "integer"
7538
+ },
7539
+ "filter": {
7540
+ "type": "string"
7541
+ },
7542
+ "filterField": {
7543
+ "type": "string"
7544
+ },
7545
+ "sortField": {
7546
+ "type": "string"
7547
+ },
7548
+ "sortDirection": {
7549
+ "type": "string",
7550
+ "enum": [
7551
+ "asc",
7552
+ "desc"
7553
+ ]
7554
+ },
7555
+ "applicationId": {
7556
+ "type": "string",
7557
+ "pattern": "^[A-Fa-f\\d]{24}$"
7558
+ },
7559
+ "flowId": {
7560
+ "type": "string",
7561
+ "pattern": "^[A-Fa-f\\d]{24}$"
7562
+ }
7563
+ }
7564
+ }
7565
+ ```
7566
+ ### <a name="workflow-versions-example"></a> Example
7567
+
7568
+ ```json
7569
+ {
7570
+ "items": [
7571
+ {
7572
+ "id": "675ed18f7ae143cd83dc4bb7",
7573
+ "flowVersionId": "675ed18f7ae143cd83dc4bb7",
7574
+ "flowId": "575ed18f7ae143cd83dc4aa6",
7575
+ "applicationId": "575ec8687ae143cd83dc4a97",
7576
+ "creationDate": "2016-06-13T04:00:00.000Z",
7577
+ "lastUpdated": "2016-06-13T04:00:00.000Z",
7578
+ "version": "v1.2.3",
7579
+ "notes": "Description of my workflow version",
7580
+ "enabled": true,
7581
+ "triggers": [],
7582
+ "nodes": [],
7583
+ "globals": []
7584
+ }
7585
+ ],
7586
+ "count": 1,
7587
+ "totalCount": 4,
7588
+ "perPage": 1,
7589
+ "page": 0,
7590
+ "sortField": "version",
7591
+ "sortDirection": "asc",
7592
+ "applicationId": "575ec8687ae143cd83dc4a97",
7593
+ "flowId": "575ed18f7ae143cd83dc4aa6"
7594
+ }
7595
+ ```
7596
+
7597
+ <br/>
7598
+
7599
+ ## Workflows
7600
+
7601
+ Schema for a collection of Workflows
7602
+
7603
+ ### <a name="workflows-schema"></a> Schema
7604
+
7605
+ ```json
7606
+ {
7607
+ "$schema": "http://json-schema.org/draft-04/schema#",
7608
+ "type": "object",
7609
+ "properties": {
7610
+ "items": {
7611
+ "type": "array",
7612
+ "items": {
7613
+ "title": "Workflow",
7614
+ "description": "Schema for a single Workflow",
7615
+ "type": "object",
7616
+ "properties": {
7617
+ "id": {
7618
+ "type": "string",
7619
+ "pattern": "^[A-Fa-f\\d]{24}$"
7620
+ },
7621
+ "flowId": {
7622
+ "type": "string",
7623
+ "pattern": "^[A-Fa-f\\d]{24}$"
7624
+ },
7625
+ "applicationId": {
7626
+ "type": "string",
7627
+ "pattern": "^[A-Fa-f\\d]{24}$"
7628
+ },
7629
+ "creationDate": {
7630
+ "type": "string",
7631
+ "format": "date-time"
7632
+ },
7633
+ "lastUpdated": {
7634
+ "type": "string",
7635
+ "format": "date-time"
7636
+ },
7637
+ "name": {
7638
+ "type": "string",
7639
+ "minLength": 1,
7640
+ "maxLength": 255
7641
+ },
7642
+ "description": {
7643
+ "type": "string",
7644
+ "maxLength": 32767
7645
+ },
7646
+ "enabled": {
7647
+ "type": "boolean"
7648
+ },
7649
+ "defaultVersionId": {
7650
+ "type": "string",
7651
+ "pattern": "^[A-Fa-f\\d]{24}$"
7652
+ },
7653
+ "triggers": {
7654
+ "type": "array",
7655
+ "items": {
7656
+ "type": "object",
7657
+ "properties": {
7658
+ "key": {
7659
+ "type": "string",
7660
+ "maxLength": 1024
7661
+ },
7662
+ "type": {
7663
+ "type": "string",
7664
+ "enum": [
7665
+ "deviceId",
7666
+ "deviceIdConnect",
7667
+ "deviceIdDisconnect",
7668
+ "deviceTag",
7669
+ "deviceTagConnect",
7670
+ "deviceTagDisconnect",
7671
+ "endpoint",
7672
+ "event",
7673
+ "mqttTopic",
7674
+ "integration",
7675
+ "timer",
7676
+ "virtualButton",
7677
+ "webhook"
7678
+ ]
7679
+ },
7680
+ "config": {
7681
+ "type": "object"
7682
+ },
7683
+ "meta": {
7684
+ "type": "object"
7685
+ },
7686
+ "outputIds": {
7687
+ "type": "array",
7688
+ "items": {
7689
+ "type": "array",
7690
+ "items": {
7691
+ "type": "string",
7692
+ "maxLength": 255
7693
+ },
7694
+ "maxItems": 100
7695
+ },
7696
+ "maxItems": 100
7697
+ }
7698
+ },
7699
+ "additionalProperties": false,
7700
+ "required": [
7701
+ "type"
7702
+ ]
7703
+ }
7704
+ },
7705
+ "nodes": {
7706
+ "type": "array",
7707
+ "items": {
7708
+ "type": "object",
7709
+ "properties": {
7710
+ "id": {
7711
+ "type": "string",
7712
+ "maxLength": 1024
7713
+ },
7714
+ "type": {
7715
+ "type": "string",
7716
+ "minLength": 1,
7717
+ "maxLength": 1024
7718
+ },
7719
+ "config": {
7720
+ "type": "object"
7721
+ },
7046
7722
  "meta": {
7047
7723
  "type": "object"
7048
7724
  },
@@ -7094,6 +7770,22 @@ Schema for a collection of Workflows
7094
7770
  },
7095
7771
  "errorCount": {
7096
7772
  "type": "number"
7773
+ },
7774
+ "byVersion": {
7775
+ "type": "object",
7776
+ "patternProperties": {
7777
+ ".*": {
7778
+ "type": "object",
7779
+ "properties": {
7780
+ "runCount": {
7781
+ "type": "number"
7782
+ },
7783
+ "errorCount": {
7784
+ "type": "number"
7785
+ }
7786
+ }
7787
+ }
7788
+ }
7097
7789
  }
7098
7790
  }
7099
7791
  }
@@ -7242,7 +7934,8 @@ Schema for a single Integrations
7242
7934
  "type": "string",
7243
7935
  "enum": [
7244
7936
  "mqtt",
7245
- "googlePubSub"
7937
+ "googlePubSub",
7938
+ "particle"
7246
7939
  ]
7247
7940
  },
7248
7941
  "enabled": {
@@ -7339,6 +8032,35 @@ Schema for a single Integrations
7339
8032
  "host"
7340
8033
  ]
7341
8034
  },
8035
+ "particleConfig": {
8036
+ "type": "object",
8037
+ "properties": {
8038
+ "accessToken": {
8039
+ "type": "string",
8040
+ "maxLength": 1024,
8041
+ "minLength": 1
8042
+ },
8043
+ "productSlugOrId": {
8044
+ "type": "string",
8045
+ "maxLength": 1024,
8046
+ "minLength": 1
8047
+ },
8048
+ "orgSlugOrId": {
8049
+ "type": "string",
8050
+ "maxLength": 1024,
8051
+ "minLength": 1
8052
+ },
8053
+ "deviceNameOrId": {
8054
+ "type": "string",
8055
+ "maxLength": 1024,
8056
+ "minLength": 1
8057
+ }
8058
+ },
8059
+ "additionalProperties": false,
8060
+ "required": [
8061
+ "accessToken"
8062
+ ]
8063
+ },
7342
8064
  "status": {
7343
8065
  "lastKeepAlive": {
7344
8066
  "type": [
@@ -7437,7 +8159,8 @@ Schema for the body of an Integrations modification request
7437
8159
  "type": "string",
7438
8160
  "enum": [
7439
8161
  "mqtt",
7440
- "googlePubSub"
8162
+ "googlePubSub",
8163
+ "particle"
7441
8164
  ]
7442
8165
  },
7443
8166
  "enabled": {
@@ -7533,6 +8256,35 @@ Schema for the body of an Integrations modification request
7533
8256
  "protocol",
7534
8257
  "host"
7535
8258
  ]
8259
+ },
8260
+ "particleConfig": {
8261
+ "type": "object",
8262
+ "properties": {
8263
+ "accessToken": {
8264
+ "type": "string",
8265
+ "maxLength": 1024,
8266
+ "minLength": 1
8267
+ },
8268
+ "productSlugOrId": {
8269
+ "type": "string",
8270
+ "maxLength": 1024,
8271
+ "minLength": 1
8272
+ },
8273
+ "orgSlugOrId": {
8274
+ "type": "string",
8275
+ "maxLength": 1024,
8276
+ "minLength": 1
8277
+ },
8278
+ "deviceNameOrId": {
8279
+ "type": "string",
8280
+ "maxLength": 1024,
8281
+ "minLength": 1
8282
+ }
8283
+ },
8284
+ "additionalProperties": false,
8285
+ "required": [
8286
+ "accessToken"
8287
+ ]
7536
8288
  }
7537
8289
  },
7538
8290
  "additionalProperties": false
@@ -7570,7 +8322,8 @@ Schema for the body of an Integrations creation request
7570
8322
  "type": "string",
7571
8323
  "enum": [
7572
8324
  "mqtt",
7573
- "googlePubSub"
8325
+ "googlePubSub",
8326
+ "particle"
7574
8327
  ]
7575
8328
  },
7576
8329
  "enabled": {
@@ -7666,6 +8419,35 @@ Schema for the body of an Integrations creation request
7666
8419
  "protocol",
7667
8420
  "host"
7668
8421
  ]
8422
+ },
8423
+ "particleConfig": {
8424
+ "type": "object",
8425
+ "properties": {
8426
+ "accessToken": {
8427
+ "type": "string",
8428
+ "maxLength": 1024,
8429
+ "minLength": 1
8430
+ },
8431
+ "productSlugOrId": {
8432
+ "type": "string",
8433
+ "maxLength": 1024,
8434
+ "minLength": 1
8435
+ },
8436
+ "orgSlugOrId": {
8437
+ "type": "string",
8438
+ "maxLength": 1024,
8439
+ "minLength": 1
8440
+ },
8441
+ "deviceNameOrId": {
8442
+ "type": "string",
8443
+ "maxLength": 1024,
8444
+ "minLength": 1
8445
+ }
8446
+ },
8447
+ "additionalProperties": false,
8448
+ "required": [
8449
+ "accessToken"
8450
+ ]
7669
8451
  }
7670
8452
  },
7671
8453
  "additionalProperties": false,
@@ -7744,7 +8526,8 @@ Schema for a collection of Integrations
7744
8526
  "type": "string",
7745
8527
  "enum": [
7746
8528
  "mqtt",
7747
- "googlePubSub"
8529
+ "googlePubSub",
8530
+ "particle"
7748
8531
  ]
7749
8532
  },
7750
8533
  "enabled": {
@@ -7841,6 +8624,35 @@ Schema for a collection of Integrations
7841
8624
  "host"
7842
8625
  ]
7843
8626
  },
8627
+ "particleConfig": {
8628
+ "type": "object",
8629
+ "properties": {
8630
+ "accessToken": {
8631
+ "type": "string",
8632
+ "maxLength": 1024,
8633
+ "minLength": 1
8634
+ },
8635
+ "productSlugOrId": {
8636
+ "type": "string",
8637
+ "maxLength": 1024,
8638
+ "minLength": 1
8639
+ },
8640
+ "orgSlugOrId": {
8641
+ "type": "string",
8642
+ "maxLength": 1024,
8643
+ "minLength": 1
8644
+ },
8645
+ "deviceNameOrId": {
8646
+ "type": "string",
8647
+ "maxLength": 1024,
8648
+ "minLength": 1
8649
+ }
8650
+ },
8651
+ "additionalProperties": false,
8652
+ "required": [
8653
+ "accessToken"
8654
+ ]
8655
+ },
7844
8656
  "status": {
7845
8657
  "lastKeepAlive": {
7846
8658
  "type": [
@@ -11415,7 +12227,12 @@ Schema for the body of a request to press a Workflow virtual button
11415
12227
  "type": "string"
11416
12228
  },
11417
12229
  "payload": {},
11418
- "meta": {}
12230
+ "meta": {},
12231
+ "flowVersion": {
12232
+ "type": "string",
12233
+ "minLength": 1,
12234
+ "maxLength": 255
12235
+ }
11419
12236
  },
11420
12237
  "required": [
11421
12238
  "key"