losant_rest 1.5.1 → 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 642120cd33c786bece7c7dcc170fe54dda8f6aca
4
- data.tar.gz: 804b06af95cea5979cffab9c16d6947ce7211ceb
3
+ metadata.gz: 47ea8f796b42c4b171270bac5ffe9dbcf56f5df9
4
+ data.tar.gz: 573c095284e1b7f017221892560810daa43f478a
5
5
  SHA512:
6
- metadata.gz: 692853eb945b848a1029c4fa80993bd241dff3957e6515be5e9c56c8ce8ddd34cd4cb77e542fba7c6020db36eff5f2d7c96e3c7f4e8a92e9330b365bef92d92d
7
- data.tar.gz: 1ea964c4717cae0490d40149b0bf5e6cd269fc58131d704392bb3a6c272912334a3fa9d1818765e04d7e12ac33f796e7809b7ec8a066531bca709849141b8644
6
+ metadata.gz: ecb7bdbf1e281f4b7891e103a8670c0ac4dfe79ceb2f869b9013aebc5ddd31b4e1536dfb4d32d36352d173f80c951b1e38dcf8d93189dbb2a3aa3e316befa1c3
7
+ data.tar.gz: 5d3297f1c9421e5d201cdf81fc1225a86e9b510253ea40c84e2414d42fbb8a4db44b0633992e7554e7924dbe28500a902cf4e1ff053e62e81fd846c60faad1fd
@@ -86,6 +86,11 @@
86
86
  * [Experience View Patch](#experience-view-patch)
87
87
  * [Experience View Post](#experience-view-post)
88
88
  * [Experience Views](#experience-views)
89
+ * [File Schema](#file-schema)
90
+ * [File Patch](#file-patch)
91
+ * [File Post](#file-post)
92
+ * [File Post Response](#file-post-response)
93
+ * [Files Schema](#files-schema)
89
94
  * [Workflow](#workflow)
90
95
  * [Workflow Log](#workflow-log)
91
96
  * [Workflow Patch](#workflow-patch)
@@ -659,6 +664,8 @@ Schema for the body of an Application API Token creation request
659
664
  "experienceViews.*",
660
665
  "integration.*",
661
666
  "integrations.*",
667
+ "file.*",
668
+ "files.*",
662
669
  "flow.*",
663
670
  "flows.*",
664
671
  "flowVersion.*",
@@ -757,6 +764,12 @@ Schema for the body of an Application API Token creation request
757
764
  "experienceView.patch",
758
765
  "experienceViews.get",
759
766
  "experienceViews.post",
767
+ "file.get",
768
+ "file.patch",
769
+ "file.move",
770
+ "file.delete",
771
+ "files.get",
772
+ "files.post",
760
773
  "flow.delete",
761
774
  "flow.clearStorageEntries",
762
775
  "flow.get",
@@ -2631,7 +2644,8 @@ Schema for the body of a request to change the current user's password
2631
2644
  "newPassword": {
2632
2645
  "type": "string",
2633
2646
  "minLength": 8,
2634
- "maxLength": 2048
2647
+ "maxLength": 2048,
2648
+ "pattern": "^(?=.*[A-Z])(?=.*[^A-z0-9])(?=.*[0-9])(?=.*[a-z]).{8,}$"
2635
2649
  },
2636
2650
  "invalidateExistingTokens": {
2637
2651
  "type": "boolean"
@@ -4481,7 +4495,91 @@ Schema for the body of a data table export
4481
4495
  "maxLength": 1024
4482
4496
  },
4483
4497
  "query": {
4484
- "$ref": "#/definitions/dataTableQuery"
4498
+ "title": "Data Table Query",
4499
+ "description": "Schema for a data table query",
4500
+ "type": "object",
4501
+ "properties": {
4502
+ "$and": {
4503
+ "type": "array",
4504
+ "items": {
4505
+ "$ref": "#/definitions/dataTableQuery"
4506
+ }
4507
+ },
4508
+ "$or": {
4509
+ "type": "array",
4510
+ "items": {
4511
+ "$ref": "#/definitions/dataTableQuery"
4512
+ }
4513
+ }
4514
+ },
4515
+ "patternProperties": {
4516
+ "^[0-9a-zA-Z_-]{1,255}$": {
4517
+ "oneOf": [
4518
+ {
4519
+ "type": [
4520
+ "string",
4521
+ "number",
4522
+ "boolean",
4523
+ "null"
4524
+ ]
4525
+ },
4526
+ {
4527
+ "type": "object",
4528
+ "properties": {
4529
+ "$eq": {
4530
+ "type": [
4531
+ "string",
4532
+ "number",
4533
+ "boolean",
4534
+ "null"
4535
+ ]
4536
+ },
4537
+ "$ne": {
4538
+ "type": [
4539
+ "string",
4540
+ "number",
4541
+ "boolean",
4542
+ "null"
4543
+ ]
4544
+ },
4545
+ "$gt": {
4546
+ "type": [
4547
+ "string",
4548
+ "number",
4549
+ "boolean",
4550
+ "null"
4551
+ ]
4552
+ },
4553
+ "$lt": {
4554
+ "type": [
4555
+ "string",
4556
+ "number",
4557
+ "boolean",
4558
+ "null"
4559
+ ]
4560
+ },
4561
+ "$gte": {
4562
+ "type": [
4563
+ "string",
4564
+ "number",
4565
+ "boolean",
4566
+ "null"
4567
+ ]
4568
+ },
4569
+ "$lte": {
4570
+ "type": [
4571
+ "string",
4572
+ "number",
4573
+ "boolean",
4574
+ "null"
4575
+ ]
4576
+ }
4577
+ }
4578
+ }
4579
+ ]
4580
+ }
4581
+ },
4582
+ "additionalProperties": false
4485
4583
  },
4486
4584
  "queryOptions": {
4487
4585
  "type": "object",
@@ -9483,6 +9581,536 @@ Schema for a collection of Experience Views
9483
9581
 
9484
9582
  <br/>
9485
9583
 
9584
+ ## File Schema
9585
+
9586
+ Schema for a single file
9587
+
9588
+ ### <a name="file-schema-schema"></a> Schema
9589
+
9590
+ ```json
9591
+ {
9592
+ "$schema": "http://json-schema.org/draft-04/schema#",
9593
+ "type": "object",
9594
+ "properties": {
9595
+ "id": {
9596
+ "type": "string",
9597
+ "pattern": "^[A-Fa-f\\d]{24}$"
9598
+ },
9599
+ "applicationId": {
9600
+ "type": "string",
9601
+ "pattern": "^[A-Fa-f\\d]{24}$"
9602
+ },
9603
+ "creationDate": {
9604
+ "type": "string",
9605
+ "format": "date-time"
9606
+ },
9607
+ "lastUpdated": {
9608
+ "type": "string",
9609
+ "format": "date-time"
9610
+ },
9611
+ "authorId": {
9612
+ "type": "string",
9613
+ "pattern": "^[A-Fa-f\\d]{24}$"
9614
+ },
9615
+ "authorType": {
9616
+ "type": "string",
9617
+ "enum": [
9618
+ "flow",
9619
+ "user",
9620
+ "device",
9621
+ "apiToken"
9622
+ ]
9623
+ },
9624
+ "status": {
9625
+ "type": "string",
9626
+ "enum": [
9627
+ "pending",
9628
+ "moving",
9629
+ "deleting",
9630
+ "completed"
9631
+ ]
9632
+ },
9633
+ "name": {
9634
+ "type": "string",
9635
+ "minLength": 1,
9636
+ "maxLength": 2048
9637
+ },
9638
+ "parentDirectory": {
9639
+ "type": "string",
9640
+ "maxLength": 2048
9641
+ },
9642
+ "type": {
9643
+ "type": "string",
9644
+ "enum": [
9645
+ "file",
9646
+ "directory"
9647
+ ]
9648
+ },
9649
+ "fileSize": {
9650
+ "type": "number"
9651
+ },
9652
+ "contentType": {
9653
+ "type": "string",
9654
+ "maxLength": 1024
9655
+ },
9656
+ "fileDimensions": {
9657
+ "type": "object",
9658
+ "properties": {
9659
+ "width": {
9660
+ "type": "number"
9661
+ },
9662
+ "height": {
9663
+ "type": "number"
9664
+ }
9665
+ }
9666
+ }
9667
+ }
9668
+ }
9669
+ ```
9670
+ ### <a name="file-schema-example"></a> Example
9671
+
9672
+ ```json
9673
+ {
9674
+ "id": "575ec8687ae143cd83dc4a97",
9675
+ "applicationId": "575ec8687ae143cd83dc4a97",
9676
+ "creationDate": "2016-06-13T04:00:00.000Z",
9677
+ "lastUpdated": "2016-06-13T04:00:00.000Z",
9678
+ "authorId": "575ed70c7ae143cd83dc4aa9",
9679
+ "authorType": "user",
9680
+ "status": "pending",
9681
+ "name": "file.csv",
9682
+ "type": "file",
9683
+ "parentDirectory": "/",
9684
+ "fileSize": 500,
9685
+ "contentType": "text/csv"
9686
+ }
9687
+ ```
9688
+
9689
+ <br/>
9690
+
9691
+ ## File Patch
9692
+
9693
+ Schema to patch a file
9694
+
9695
+ ### <a name="file-patch-schema"></a> Schema
9696
+
9697
+ ```json
9698
+ {
9699
+ "$schema": "http://json-schema.org/draft-04/schema#",
9700
+ "type": "object",
9701
+ "properties": {
9702
+ "fileSize": {
9703
+ "type": "number"
9704
+ },
9705
+ "contentType": {
9706
+ "type": "string",
9707
+ "maxLength": 1024
9708
+ },
9709
+ "fileDimensions": {
9710
+ "type": "object",
9711
+ "properties": {
9712
+ "width": {
9713
+ "type": "number"
9714
+ },
9715
+ "height": {
9716
+ "type": "number"
9717
+ }
9718
+ }
9719
+ }
9720
+ }
9721
+ }
9722
+ ```
9723
+ ### <a name="file-patch-example"></a> Example
9724
+
9725
+ ```json
9726
+ {
9727
+ "fileSize": 500,
9728
+ "contentType": "image",
9729
+ "fileDimensions": {
9730
+ "width": 200,
9731
+ "height": 200
9732
+ }
9733
+ }
9734
+ ```
9735
+
9736
+ <br/>
9737
+
9738
+ ## File Post
9739
+
9740
+ Schema to create a single file or directory
9741
+
9742
+ ### <a name="file-post-schema"></a> Schema
9743
+
9744
+ ```json
9745
+ {
9746
+ "$schema": "http://json-schema.org/draft-04/schema#",
9747
+ "type": "object",
9748
+ "properties": {
9749
+ "name": {
9750
+ "type": "string",
9751
+ "minLength": 1,
9752
+ "maxLength": 2048
9753
+ },
9754
+ "parentDirectory": {
9755
+ "type": "string",
9756
+ "maxLength": 2048
9757
+ },
9758
+ "type": {
9759
+ "type": "string",
9760
+ "enum": [
9761
+ "file",
9762
+ "directory"
9763
+ ]
9764
+ },
9765
+ "fileSize": {
9766
+ "type": "number"
9767
+ },
9768
+ "contentType": {
9769
+ "type": "string",
9770
+ "maxLength": 1024
9771
+ },
9772
+ "fileDimensions": {
9773
+ "type": "object",
9774
+ "properties": {
9775
+ "width": {
9776
+ "type": "number"
9777
+ },
9778
+ "height": {
9779
+ "type": "number"
9780
+ }
9781
+ }
9782
+ }
9783
+ }
9784
+ }
9785
+ ```
9786
+ ### <a name="file-post-example"></a> Example
9787
+
9788
+ ```json
9789
+ {
9790
+ "name": "file.csv",
9791
+ "type": "file",
9792
+ "parentDirectory": "/",
9793
+ "fileSize": 500,
9794
+ "contentType": "text/csv"
9795
+ }
9796
+ ```
9797
+
9798
+ <br/>
9799
+
9800
+ ## File Post Response
9801
+
9802
+ Schema to upload the file to s3
9803
+
9804
+ ### <a name="file-post-response-schema"></a> Schema
9805
+
9806
+ ```json
9807
+ {
9808
+ "$schema": "http://json-schema.org/draft-04/schema#",
9809
+ "type": "object",
9810
+ "properties": {
9811
+ "id": {
9812
+ "type": "string",
9813
+ "pattern": "^[A-Fa-f\\d]{24}$"
9814
+ },
9815
+ "applicationId": {
9816
+ "type": "string",
9817
+ "pattern": "^[A-Fa-f\\d]{24}$"
9818
+ },
9819
+ "creationDate": {
9820
+ "type": "string",
9821
+ "format": "date-time"
9822
+ },
9823
+ "lastUpdated": {
9824
+ "type": "string",
9825
+ "format": "date-time"
9826
+ },
9827
+ "authorId": {
9828
+ "type": "string",
9829
+ "pattern": "^[A-Fa-f\\d]{24}$"
9830
+ },
9831
+ "authorType": {
9832
+ "type": "string",
9833
+ "enum": [
9834
+ "flow",
9835
+ "user",
9836
+ "device",
9837
+ "apiToken"
9838
+ ]
9839
+ },
9840
+ "status": {
9841
+ "type": "string",
9842
+ "enum": [
9843
+ "pending",
9844
+ "moving",
9845
+ "deleting",
9846
+ "completed"
9847
+ ]
9848
+ },
9849
+ "name": {
9850
+ "type": "string",
9851
+ "minLength": 1,
9852
+ "maxLength": 2048
9853
+ },
9854
+ "parentDirectory": {
9855
+ "type": "string",
9856
+ "maxLength": 2048
9857
+ },
9858
+ "type": {
9859
+ "type": "string",
9860
+ "enum": [
9861
+ "file",
9862
+ "directory"
9863
+ ]
9864
+ },
9865
+ "fileSize": {
9866
+ "type": "number"
9867
+ },
9868
+ "contentType": {
9869
+ "type": "string",
9870
+ "maxLength": 1024
9871
+ },
9872
+ "fileDimensions": {
9873
+ "type": "object",
9874
+ "properties": {
9875
+ "width": {
9876
+ "type": "number"
9877
+ },
9878
+ "height": {
9879
+ "type": "number"
9880
+ }
9881
+ }
9882
+ },
9883
+ "upload": {
9884
+ "url": {
9885
+ "type": "string"
9886
+ },
9887
+ "fields": {
9888
+ "type": "object",
9889
+ "properties": {
9890
+ "key": {
9891
+ "type": "string"
9892
+ },
9893
+ "bucket": {
9894
+ "type": "string"
9895
+ },
9896
+ "X-Amz-Algorithm": {
9897
+ "type": "string"
9898
+ },
9899
+ "X-Amz-Credential": {
9900
+ "type": "string"
9901
+ },
9902
+ "X-Amz-Date": {
9903
+ "type": "string"
9904
+ },
9905
+ "Policy": {
9906
+ "type": "string"
9907
+ },
9908
+ "X-Amz-Signature": {
9909
+ "type": "string"
9910
+ }
9911
+ }
9912
+ }
9913
+ }
9914
+ }
9915
+ }
9916
+ ```
9917
+ ### <a name="file-post-response-example"></a> Example
9918
+
9919
+ ```json
9920
+ {
9921
+ "id": "575ec8687ae143cd83dc4a97",
9922
+ "applicationId": "575ec8687ae143cd83dc4a97",
9923
+ "creationDate": "2016-06-13T04:00:00.000Z",
9924
+ "lastUpdated": "2016-06-13T04:00:00.000Z",
9925
+ "authorId": "575ed70c7ae143cd83dc4aa9",
9926
+ "authorType": "user",
9927
+ "status": "pending",
9928
+ "name": "file.csv",
9929
+ "type": "file",
9930
+ "parentDirectory": "/",
9931
+ "fileSize": 500,
9932
+ "contentType": "text/csv",
9933
+ "upload": {
9934
+ "url": "https://s3.us-west-1.amazonaws.com/a-bucket-on-amazon",
9935
+ "fields": {
9936
+ "key": "5630dcbe1035c9d0011/file.js",
9937
+ "bucket": "a-bucket-on-amazon",
9938
+ "X-Amz-Algorithm": "AWS4-HMAC-SHA256",
9939
+ "X-Amz-Credential": "AKIAJPGQGBQX4PYM6FXA/20180416/us-west-1/s3/aws4_request",
9940
+ "X-Amz-Date": "20180416T142402Z",
9941
+ "Policy": "wMloiLCJjb25kaXRpb25zIjpbeyJrZXkiOiI1NjMwZGNiZTEwM2Y4ZTQ4NWM5ZDAwMTEvZmlsZS5qcyJ9LHsiYnVja2V0IjoibG9zYW50LWZpbGVzIn0seyJYLUFtei1BbGdvcml0aG0iOiJBV1M0LUhNQUMtU0hBMjU2In0seyJYLUFtei1DcmVkZW50aWFsIjoiQUtJQUpQR1FHQlFYNFBZTTZGWEEvMjAxODA0MTYvdXMtd2VzdC0xL3MzL2F3czRfcmVxdWVzdCJ9LHsiWC1BbXotRGF0ZSI6IjIwMTgwNDE2VDE0MjQwMloifV19",
9942
+ "X-Amz-Signature": "a4a411df572c43b4427ff08ef51763bc2d834fa399c3688f347d936370"
9943
+ }
9944
+ }
9945
+ }
9946
+ ```
9947
+
9948
+ <br/>
9949
+
9950
+ ## Files Schema
9951
+
9952
+ Schema for a collection of files
9953
+
9954
+ ### <a name="files-schema-schema"></a> Schema
9955
+
9956
+ ```json
9957
+ {
9958
+ "$schema": "http://json-schema.org/draft-04/schema#",
9959
+ "type": "object",
9960
+ "properties": {
9961
+ "items": {
9962
+ "type": "array",
9963
+ "items": {
9964
+ "title": "File Schema",
9965
+ "description": "Schema for a single file",
9966
+ "type": "object",
9967
+ "properties": {
9968
+ "id": {
9969
+ "type": "string",
9970
+ "pattern": "^[A-Fa-f\\d]{24}$"
9971
+ },
9972
+ "applicationId": {
9973
+ "type": "string",
9974
+ "pattern": "^[A-Fa-f\\d]{24}$"
9975
+ },
9976
+ "creationDate": {
9977
+ "type": "string",
9978
+ "format": "date-time"
9979
+ },
9980
+ "lastUpdated": {
9981
+ "type": "string",
9982
+ "format": "date-time"
9983
+ },
9984
+ "authorId": {
9985
+ "type": "string",
9986
+ "pattern": "^[A-Fa-f\\d]{24}$"
9987
+ },
9988
+ "authorType": {
9989
+ "type": "string",
9990
+ "enum": [
9991
+ "flow",
9992
+ "user",
9993
+ "device",
9994
+ "apiToken"
9995
+ ]
9996
+ },
9997
+ "status": {
9998
+ "type": "string",
9999
+ "enum": [
10000
+ "pending",
10001
+ "moving",
10002
+ "deleting",
10003
+ "completed"
10004
+ ]
10005
+ },
10006
+ "name": {
10007
+ "type": "string",
10008
+ "minLength": 1,
10009
+ "maxLength": 2048
10010
+ },
10011
+ "parentDirectory": {
10012
+ "type": "string",
10013
+ "maxLength": 2048
10014
+ },
10015
+ "type": {
10016
+ "type": "string",
10017
+ "enum": [
10018
+ "file",
10019
+ "directory"
10020
+ ]
10021
+ },
10022
+ "fileSize": {
10023
+ "type": "number"
10024
+ },
10025
+ "contentType": {
10026
+ "type": "string",
10027
+ "maxLength": 1024
10028
+ },
10029
+ "fileDimensions": {
10030
+ "type": "object",
10031
+ "properties": {
10032
+ "width": {
10033
+ "type": "number"
10034
+ },
10035
+ "height": {
10036
+ "type": "number"
10037
+ }
10038
+ }
10039
+ }
10040
+ }
10041
+ }
10042
+ },
10043
+ "count": {
10044
+ "type": "integer"
10045
+ },
10046
+ "totalCount": {
10047
+ "type": "integer"
10048
+ },
10049
+ "perPage": {
10050
+ "type": "integer"
10051
+ },
10052
+ "page": {
10053
+ "type": "integer"
10054
+ },
10055
+ "filter": {
10056
+ "type": "string"
10057
+ },
10058
+ "filterField": {
10059
+ "type": "string"
10060
+ },
10061
+ "sortField": {
10062
+ "type": "string"
10063
+ },
10064
+ "sortDirection": {
10065
+ "type": "string",
10066
+ "enum": [
10067
+ "asc",
10068
+ "desc"
10069
+ ]
10070
+ }
10071
+ }
10072
+ }
10073
+ ```
10074
+ ### <a name="files-schema-example"></a> Example
10075
+
10076
+ ```json
10077
+ {
10078
+ "items": [
10079
+ {
10080
+ "id": "575ec8687ae143cd83dc4a97",
10081
+ "applicationId": "575ec8687ae143cd83dc4a97",
10082
+ "creationDate": "2016-06-13T04:00:00.000Z",
10083
+ "lastUpdated": "2016-06-13T04:00:00.000Z",
10084
+ "authorId": "575ed70c7ae143cd83dc4aa9",
10085
+ "authorType": "user",
10086
+ "status": "pending",
10087
+ "name": "file.csv",
10088
+ "type": "file",
10089
+ "parentDirectory": "/",
10090
+ "fileSize": 500,
10091
+ "contentType": "text/csv"
10092
+ },
10093
+ {
10094
+ "id": "575ec8687ae143cd83dc4a96",
10095
+ "applicationId": "575ec8687ae143cd83dc4a97",
10096
+ "creationDate": "2016-06-13T04:00:00.000Z",
10097
+ "lastUpdated": "2016-06-13T04:00:00.000Z",
10098
+ "authorId": "575ed70c7ae143cd83dc4aa9",
10099
+ "authorType": "user",
10100
+ "status": "completed",
10101
+ "name": "b",
10102
+ "type": "directory",
10103
+ "parentDirectory": "/a/",
10104
+ "fileSize": 500,
10105
+ "contentType": "text/csv"
10106
+ }
10107
+ ],
10108
+ "count": 2
10109
+ }
10110
+ ```
10111
+
10112
+ <br/>
10113
+
9486
10114
  ## Workflow
9487
10115
 
9488
10116
  Schema for a single Workflow
@@ -12795,7 +13423,8 @@ Schema for the body of request to modify the current user
12795
13423
  "password": {
12796
13424
  "type": "string",
12797
13425
  "minLength": 8,
12798
- "maxLength": 2048
13426
+ "maxLength": 2048,
13427
+ "pattern": "^(?=.*[A-Z])(?=.*[^A-z0-9])(?=.*[0-9])(?=.*[a-z]).{8,}$"
12799
13428
  },
12800
13429
  "tokenCutoff": {
12801
13430
  "type": "string",
@@ -14929,7 +15558,8 @@ Schema for the body of a Solution User modification request
14929
15558
  "password": {
14930
15559
  "type": "string",
14931
15560
  "minLength": 8,
14932
- "maxLength": 2048
15561
+ "maxLength": 2048,
15562
+ "pattern": "^(?=.*[A-Z])(?=.*[^A-z0-9])(?=.*[0-9])(?=.*[a-z]).{8,}$"
14933
15563
  },
14934
15564
  "twoFactorAuthKey": {
14935
15565
  "type": "string",
@@ -15021,7 +15651,8 @@ Schema for the body of a Solution User creation request
15021
15651
  "password": {
15022
15652
  "type": "string",
15023
15653
  "minLength": 8,
15024
- "maxLength": 2048
15654
+ "maxLength": 2048,
15655
+ "pattern": "^(?=.*[A-Z])(?=.*[^A-z0-9])(?=.*[0-9])(?=.*[a-z]).{8,}$"
15025
15656
  },
15026
15657
  "twoFactorAuthKey": {
15027
15658
  "type": "string",
@@ -15494,7 +16125,8 @@ Schema for the result of a time series query
15494
16125
  "MIN",
15495
16126
  "MEDIAN",
15496
16127
  "MEAN",
15497
- "SUM"
16128
+ "SUM",
16129
+ "NONE"
15498
16130
  ]
15499
16131
  },
15500
16132
  "devices": {
@@ -15641,7 +16273,8 @@ Schema for the body of a time series query request
15641
16273
  "MIN",
15642
16274
  "MEDIAN",
15643
16275
  "MEAN",
15644
- "SUM"
16276
+ "SUM",
16277
+ "NONE"
15645
16278
  ]
15646
16279
  },
15647
16280
  "attributes": {