files.com 1.0.92
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 +7 -0
- data/CONTRIBUTORS +4 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +82 -0
- data/LICENSE +21 -0
- data/README.md +119 -0
- data/Rakefile +12 -0
- data/SECURITY.md +24 -0
- data/_VERSION +1 -0
- data/bin/files +8 -0
- data/bin/files-console +16 -0
- data/docs/account_line_item.md +41 -0
- data/docs/action.md +37 -0
- data/docs/api_key.md +202 -0
- data/docs/app.md +59 -0
- data/docs/as2_key.md +133 -0
- data/docs/auto.md +11 -0
- data/docs/automation.md +190 -0
- data/docs/behavior.md +208 -0
- data/docs/bundle.md +252 -0
- data/docs/bundle_download.md +35 -0
- data/docs/clickwrap.md +143 -0
- data/docs/dns_record.md +35 -0
- data/docs/errors.md +17 -0
- data/docs/file.md +204 -0
- data/docs/file_action.md +126 -0
- data/docs/file_comment.md +116 -0
- data/docs/file_comment_reaction.md +62 -0
- data/docs/file_part_upload.md +37 -0
- data/docs/file_utils.md +4 -0
- data/docs/folder.md +90 -0
- data/docs/group.md +153 -0
- data/docs/group_user.md +124 -0
- data/docs/history.md +171 -0
- data/docs/history_export.md +174 -0
- data/docs/image.md +13 -0
- data/docs/invoice.md +72 -0
- data/docs/invoice_line_item.md +27 -0
- data/docs/ip_address.md +55 -0
- data/docs/lock.md +98 -0
- data/docs/message.md +147 -0
- data/docs/message_comment.md +132 -0
- data/docs/message_comment_reaction.md +94 -0
- data/docs/message_reaction.md +94 -0
- data/docs/notification.md +177 -0
- data/docs/payment.md +72 -0
- data/docs/payment_line_item.md +19 -0
- data/docs/permission.md +95 -0
- data/docs/preview.md +19 -0
- data/docs/project.md +121 -0
- data/docs/public_ip_address.md +13 -0
- data/docs/public_key.md +133 -0
- data/docs/remote_server.md +356 -0
- data/docs/request.md +100 -0
- data/docs/session.md +78 -0
- data/docs/site.md +448 -0
- data/docs/sso_strategy.md +114 -0
- data/docs/status.md +21 -0
- data/docs/style.md +93 -0
- data/docs/usage_daily_snapshot.md +45 -0
- data/docs/usage_snapshot.md +53 -0
- data/docs/user.md +535 -0
- data/docs/user_cipher_use.md +41 -0
- data/docs/user_request.md +93 -0
- data/files.com.gemspec +22 -0
- data/lib/files.com.rb +184 -0
- data/lib/files.com/api.rb +38 -0
- data/lib/files.com/api_client.rb +340 -0
- data/lib/files.com/errors.rb +41 -0
- data/lib/files.com/list.rb +95 -0
- data/lib/files.com/models/account_line_item.rb +82 -0
- data/lib/files.com/models/action.rb +77 -0
- data/lib/files.com/models/api_key.rb +270 -0
- data/lib/files.com/models/app.rb +106 -0
- data/lib/files.com/models/as2_key.rb +179 -0
- data/lib/files.com/models/auto.rb +17 -0
- data/lib/files.com/models/automation.rb +304 -0
- data/lib/files.com/models/behavior.rb +266 -0
- data/lib/files.com/models/bundle.rb +371 -0
- data/lib/files.com/models/bundle_download.rb +49 -0
- data/lib/files.com/models/clickwrap.rb +197 -0
- data/lib/files.com/models/dir.rb +3 -0
- data/lib/files.com/models/dns_record.rb +51 -0
- data/lib/files.com/models/errors.rb +22 -0
- data/lib/files.com/models/file.rb +968 -0
- data/lib/files.com/models/file_action.rb +126 -0
- data/lib/files.com/models/file_comment.rb +146 -0
- data/lib/files.com/models/file_comment_reaction.rb +100 -0
- data/lib/files.com/models/file_part_upload.rb +82 -0
- data/lib/files.com/models/file_utils.rb +118 -0
- data/lib/files.com/models/folder.rb +357 -0
- data/lib/files.com/models/group.rb +208 -0
- data/lib/files.com/models/group_user.rb +171 -0
- data/lib/files.com/models/history.rb +228 -0
- data/lib/files.com/models/history_export.rb +353 -0
- data/lib/files.com/models/image.rb +22 -0
- data/lib/files.com/models/invoice.rb +117 -0
- data/lib/files.com/models/invoice_line_item.rb +57 -0
- data/lib/files.com/models/ip_address.rb +66 -0
- data/lib/files.com/models/lock.rb +173 -0
- data/lib/files.com/models/message.rb +201 -0
- data/lib/files.com/models/message_comment.rb +165 -0
- data/lib/files.com/models/message_comment_reaction.rb +128 -0
- data/lib/files.com/models/message_reaction.rb +128 -0
- data/lib/files.com/models/notification.rb +263 -0
- data/lib/files.com/models/payment.rb +117 -0
- data/lib/files.com/models/payment_line_item.rb +37 -0
- data/lib/files.com/models/permission.rb +172 -0
- data/lib/files.com/models/preview.rb +37 -0
- data/lib/files.com/models/project.rb +140 -0
- data/lib/files.com/models/public_ip_address.rb +22 -0
- data/lib/files.com/models/public_key.rb +179 -0
- data/lib/files.com/models/remote_server.rb +680 -0
- data/lib/files.com/models/request.rb +179 -0
- data/lib/files.com/models/session.rb +247 -0
- data/lib/files.com/models/site.rb +733 -0
- data/lib/files.com/models/sso_strategy.rb +227 -0
- data/lib/files.com/models/status.rb +37 -0
- data/lib/files.com/models/style.rb +131 -0
- data/lib/files.com/models/usage_daily_snapshot.rb +66 -0
- data/lib/files.com/models/usage_snapshot.rb +96 -0
- data/lib/files.com/models/user.rb +876 -0
- data/lib/files.com/models/user_cipher_use.rb +63 -0
- data/lib/files.com/models/user_request.rb +127 -0
- data/lib/files.com/response.rb +25 -0
- data/lib/files.com/sizable_io.rb +32 -0
- data/lib/files.com/system_profiler.rb +56 -0
- data/lib/files.com/util.rb +106 -0
- data/lib/files.com/version.rb +5 -0
- data/spec/list_spec.rb +214 -0
- data/spec/models/file_spec.rb +68 -0
- data/spec/models/folder_spec.rb +40 -0
- data/spec/spec_helper.rb +36 -0
- data/test.sh +8 -0
- data/test/test.rb +75 -0
- metadata +235 -0
data/docs/app.md
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
# App
|
2
|
+
|
3
|
+
## Example App Object
|
4
|
+
|
5
|
+
```
|
6
|
+
{
|
7
|
+
"name": "",
|
8
|
+
"extended_description": "",
|
9
|
+
"documentation_links": "Important Info => http://files.test/learn-more",
|
10
|
+
"icon_url": "",
|
11
|
+
"logo_url": "",
|
12
|
+
"logo_thumbnail_url": "",
|
13
|
+
"sso_strategy_type": "",
|
14
|
+
"remote_server_type": "",
|
15
|
+
"folder_behavior_type": "",
|
16
|
+
"external_homepage_url": "",
|
17
|
+
"app_type": "",
|
18
|
+
"featured": true
|
19
|
+
}
|
20
|
+
```
|
21
|
+
|
22
|
+
* `name` (string): Name of the App
|
23
|
+
* `extended_description` (string): Long form description of the App
|
24
|
+
* `documentation_links` (string): Collection of named links to documentation
|
25
|
+
* `icon_url` (string): App icon
|
26
|
+
* `logo_url` (string): Full size logo for the App
|
27
|
+
* `logo_thumbnail_url` (string): Logo thumbnail for the App
|
28
|
+
* `sso_strategy_type` (string): Associated SSO Strategy type, if any
|
29
|
+
* `remote_server_type` (string): Associated Remote Server type, if any
|
30
|
+
* `folder_behavior_type` (string): Associated Folder Behavior type, if any
|
31
|
+
* `external_homepage_url` (string): Link to external homepage
|
32
|
+
* `app_type` (string): The type of the App
|
33
|
+
* `featured` (boolean): Is featured on the App listing?
|
34
|
+
|
35
|
+
|
36
|
+
---
|
37
|
+
|
38
|
+
## List Apps
|
39
|
+
|
40
|
+
```
|
41
|
+
Files::App.list(
|
42
|
+
page: 1,
|
43
|
+
per_page: 1
|
44
|
+
)
|
45
|
+
```
|
46
|
+
|
47
|
+
### Parameters
|
48
|
+
|
49
|
+
* `page` (int64): Current page number.
|
50
|
+
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
51
|
+
* `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
52
|
+
* `cursor` (string): Send cursor to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor-Next header.
|
53
|
+
* `sort_by` (object): If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `name` and `app_type`.
|
54
|
+
* `filter` (object): If set, return records where the specifiied field is equal to the supplied value. Valid fields are `name` and `app_type`.
|
55
|
+
* `filter_gt` (object): If set, return records where the specifiied field is greater than the supplied value. Valid fields are `name` and `app_type`.
|
56
|
+
* `filter_gteq` (object): If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `name` and `app_type`.
|
57
|
+
* `filter_like` (object): If set, return records where the specifiied field is equal to the supplied value. Valid fields are `name` and `app_type`.
|
58
|
+
* `filter_lt` (object): If set, return records where the specifiied field is less than the supplied value. Valid fields are `name` and `app_type`.
|
59
|
+
* `filter_lteq` (object): If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `name` and `app_type`.
|
data/docs/as2_key.md
ADDED
@@ -0,0 +1,133 @@
|
|
1
|
+
# As2Key
|
2
|
+
|
3
|
+
## Example As2Key Object
|
4
|
+
|
5
|
+
```
|
6
|
+
{
|
7
|
+
"id": 1,
|
8
|
+
"as2_partnership_name": "Test",
|
9
|
+
"created_at": "2000-01-01T01:00:00Z",
|
10
|
+
"fingerprint": "cf:cb:d3:26:52:6c:55:88:83:17:13:cf:e7:70:eb:1b:32:37:38:c0"
|
11
|
+
}
|
12
|
+
```
|
13
|
+
|
14
|
+
* `id` (int64): AS2 Key ID
|
15
|
+
* `as2_partnership_name` (string): AS2 Partnership Name
|
16
|
+
* `created_at` (date-time): AS2 Key created at date/time
|
17
|
+
* `fingerprint` (string): Public key fingerprint
|
18
|
+
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
|
19
|
+
* `public_key` (string): Actual contents of Public key.
|
20
|
+
|
21
|
+
|
22
|
+
---
|
23
|
+
|
24
|
+
## List As2 Keys
|
25
|
+
|
26
|
+
```
|
27
|
+
Files::As2Key.list(
|
28
|
+
user_id: 1,
|
29
|
+
page: 1,
|
30
|
+
per_page: 1
|
31
|
+
)
|
32
|
+
```
|
33
|
+
|
34
|
+
### Parameters
|
35
|
+
|
36
|
+
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
|
37
|
+
* `page` (int64): Current page number.
|
38
|
+
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
39
|
+
* `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
40
|
+
|
41
|
+
|
42
|
+
---
|
43
|
+
|
44
|
+
## Show As2 Key
|
45
|
+
|
46
|
+
```
|
47
|
+
Files::As2Key.find(id)
|
48
|
+
```
|
49
|
+
|
50
|
+
### Parameters
|
51
|
+
|
52
|
+
* `id` (int64): Required - As2 Key ID.
|
53
|
+
|
54
|
+
|
55
|
+
---
|
56
|
+
|
57
|
+
## Create As2 Key
|
58
|
+
|
59
|
+
```
|
60
|
+
Files::As2Key.create(
|
61
|
+
user_id: 1,
|
62
|
+
as2_partnership_name: "Test",
|
63
|
+
public_key: "public_key"
|
64
|
+
)
|
65
|
+
```
|
66
|
+
|
67
|
+
### Parameters
|
68
|
+
|
69
|
+
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
|
70
|
+
* `as2_partnership_name` (string): Required - AS2 Partnership Name
|
71
|
+
* `public_key` (string): Required - Actual contents of Public key.
|
72
|
+
|
73
|
+
|
74
|
+
---
|
75
|
+
|
76
|
+
## Update As2 Key
|
77
|
+
|
78
|
+
```
|
79
|
+
Files::As2Key.update(id,
|
80
|
+
as2_partnership_name: "Test"
|
81
|
+
)
|
82
|
+
```
|
83
|
+
|
84
|
+
### Parameters
|
85
|
+
|
86
|
+
* `id` (int64): Required - As2 Key ID.
|
87
|
+
* `as2_partnership_name` (string): Required - AS2 Partnership Name
|
88
|
+
|
89
|
+
|
90
|
+
---
|
91
|
+
|
92
|
+
## Delete As2 Key
|
93
|
+
|
94
|
+
```
|
95
|
+
Files::As2Key.delete(id)
|
96
|
+
```
|
97
|
+
|
98
|
+
### Parameters
|
99
|
+
|
100
|
+
* `id` (int64): Required - As2 Key ID.
|
101
|
+
|
102
|
+
|
103
|
+
---
|
104
|
+
|
105
|
+
## Update As2 Key
|
106
|
+
|
107
|
+
```
|
108
|
+
as2_key = Files::As2Key.list_for(path).first
|
109
|
+
|
110
|
+
as2_key.update(
|
111
|
+
as2_partnership_name: "Test"
|
112
|
+
)
|
113
|
+
```
|
114
|
+
|
115
|
+
### Parameters
|
116
|
+
|
117
|
+
* `id` (int64): Required - As2 Key ID.
|
118
|
+
* `as2_partnership_name` (string): Required - AS2 Partnership Name
|
119
|
+
|
120
|
+
|
121
|
+
---
|
122
|
+
|
123
|
+
## Delete As2 Key
|
124
|
+
|
125
|
+
```
|
126
|
+
as2_key = Files::As2Key.list_for(path).first
|
127
|
+
|
128
|
+
as2_key.delete
|
129
|
+
```
|
130
|
+
|
131
|
+
### Parameters
|
132
|
+
|
133
|
+
* `id` (int64): Required - As2 Key ID.
|
data/docs/auto.md
ADDED
data/docs/automation.md
ADDED
@@ -0,0 +1,190 @@
|
|
1
|
+
# Automation
|
2
|
+
|
3
|
+
## Example Automation Object
|
4
|
+
|
5
|
+
```
|
6
|
+
{
|
7
|
+
"id": 1,
|
8
|
+
"automation": "create_folder",
|
9
|
+
"source": "",
|
10
|
+
"destination": "",
|
11
|
+
"destination_replace_from": "",
|
12
|
+
"destination_replace_to": "",
|
13
|
+
"interval": "week",
|
14
|
+
"next_process_on": "2020-01-01",
|
15
|
+
"path": "",
|
16
|
+
"realtime": true,
|
17
|
+
"user_id": 1,
|
18
|
+
"user_ids": [
|
19
|
+
|
20
|
+
],
|
21
|
+
"group_ids": [
|
22
|
+
|
23
|
+
]
|
24
|
+
}
|
25
|
+
```
|
26
|
+
|
27
|
+
* `id` (int64): Automation ID
|
28
|
+
* `automation` (string): Automation type
|
29
|
+
* `source` (string): Source Path
|
30
|
+
* `destination` (string): Destination Path
|
31
|
+
* `destination_replace_from` (string): If set, this string in the destination path will be replaced with the value in `destination_replace_to`.
|
32
|
+
* `destination_replace_to` (string): If set, this string will replace the value `destination_replace_from` in the destination filename. You can use special patterns here.
|
33
|
+
* `interval` (string): How often to run this automation? One of: `day`, `week`, `week_end`, `month`, `month_end`, `quarter`, `quarter_end`, `year`, `year_end`
|
34
|
+
* `next_process_on` (string): Date this automation will next run.
|
35
|
+
* `path` (string): Path on which this Automation runs. Supports globs. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
36
|
+
* `realtime` (boolean): Does this automation run in real time? This is a read-only property based on automation type.
|
37
|
+
* `user_id` (int64): User ID of the Automation's creator.
|
38
|
+
* `user_ids` (array): IDs of Users for the Automation (i.e. who to Request File from)
|
39
|
+
* `group_ids` (array): IDs of Groups for the Automation (i.e. who to Request File from)
|
40
|
+
|
41
|
+
|
42
|
+
---
|
43
|
+
|
44
|
+
## List Automations
|
45
|
+
|
46
|
+
```
|
47
|
+
Files::Automation.list(
|
48
|
+
page: 1,
|
49
|
+
per_page: 1,
|
50
|
+
automation: "create_folder"
|
51
|
+
)
|
52
|
+
```
|
53
|
+
|
54
|
+
### Parameters
|
55
|
+
|
56
|
+
* `page` (int64): Current page number.
|
57
|
+
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
58
|
+
* `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
59
|
+
* `cursor` (string): Send cursor to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor-Next header.
|
60
|
+
* `sort_by` (object): If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `site_id` and `automation`.
|
61
|
+
* `filter` (object): If set, return records where the specifiied field is equal to the supplied value. Valid fields are `automation`.
|
62
|
+
* `filter_gt` (object): If set, return records where the specifiied field is greater than the supplied value. Valid fields are `automation`.
|
63
|
+
* `filter_gteq` (object): If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `automation`.
|
64
|
+
* `filter_like` (object): If set, return records where the specifiied field is equal to the supplied value. Valid fields are `automation`.
|
65
|
+
* `filter_lt` (object): If set, return records where the specifiied field is less than the supplied value. Valid fields are `automation`.
|
66
|
+
* `filter_lteq` (object): If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `automation`.
|
67
|
+
* `automation` (string): DEPRECATED: Type of automation to filter by. Use `filter[automation]` instead.
|
68
|
+
|
69
|
+
|
70
|
+
---
|
71
|
+
|
72
|
+
## Show Automation
|
73
|
+
|
74
|
+
```
|
75
|
+
Files::Automation.find(id)
|
76
|
+
```
|
77
|
+
|
78
|
+
### Parameters
|
79
|
+
|
80
|
+
* `id` (int64): Required - Automation ID.
|
81
|
+
|
82
|
+
|
83
|
+
---
|
84
|
+
|
85
|
+
## Create Automation
|
86
|
+
|
87
|
+
```
|
88
|
+
Files::Automation.create(
|
89
|
+
automation: "create_folder",
|
90
|
+
source: "source",
|
91
|
+
destination: "destination",
|
92
|
+
interval: "year"
|
93
|
+
)
|
94
|
+
```
|
95
|
+
|
96
|
+
### Parameters
|
97
|
+
|
98
|
+
* `automation` (string): Required - Type of automation. One of: `create_folder`, `request_file`, `request_move`
|
99
|
+
* `source` (string): Source Path
|
100
|
+
* `destination` (string): Destination Path
|
101
|
+
* `destination_replace_from` (string): If set, this string in the destination path will be replaced with the value in `destination_replace_to`.
|
102
|
+
* `destination_replace_to` (string): If set, this string will replace the value `destination_replace_from` in the destination filename. You can use special patterns here.
|
103
|
+
* `interval` (string): How often to run this automation? One of: `day`, `week`, `week_end`, `month`, `month_end`, `quarter`, `quarter_end`, `year`, `year_end`
|
104
|
+
* `path` (string): Path on which this Automation runs. Supports globs.
|
105
|
+
* `user_ids` (string): A list of user IDs the automation is associated with. If sent as a string, it should be comma-delimited.
|
106
|
+
* `group_ids` (string): A list of group IDs the automation is associated with. If sent as a string, it should be comma-delimited.
|
107
|
+
|
108
|
+
|
109
|
+
---
|
110
|
+
|
111
|
+
## Update Automation
|
112
|
+
|
113
|
+
```
|
114
|
+
Files::Automation.update(id,
|
115
|
+
automation: "create_folder",
|
116
|
+
source: "source",
|
117
|
+
destination: "destination",
|
118
|
+
interval: "year"
|
119
|
+
)
|
120
|
+
```
|
121
|
+
|
122
|
+
### Parameters
|
123
|
+
|
124
|
+
* `id` (int64): Required - Automation ID.
|
125
|
+
* `automation` (string): Required - Type of automation. One of: `create_folder`, `request_file`, `request_move`
|
126
|
+
* `source` (string): Source Path
|
127
|
+
* `destination` (string): Destination Path
|
128
|
+
* `destination_replace_from` (string): If set, this string in the destination path will be replaced with the value in `destination_replace_to`.
|
129
|
+
* `destination_replace_to` (string): If set, this string will replace the value `destination_replace_from` in the destination filename. You can use special patterns here.
|
130
|
+
* `interval` (string): How often to run this automation? One of: `day`, `week`, `week_end`, `month`, `month_end`, `quarter`, `quarter_end`, `year`, `year_end`
|
131
|
+
* `path` (string): Path on which this Automation runs. Supports globs.
|
132
|
+
* `user_ids` (string): A list of user IDs the automation is associated with. If sent as a string, it should be comma-delimited.
|
133
|
+
* `group_ids` (string): A list of group IDs the automation is associated with. If sent as a string, it should be comma-delimited.
|
134
|
+
|
135
|
+
|
136
|
+
---
|
137
|
+
|
138
|
+
## Delete Automation
|
139
|
+
|
140
|
+
```
|
141
|
+
Files::Automation.delete(id)
|
142
|
+
```
|
143
|
+
|
144
|
+
### Parameters
|
145
|
+
|
146
|
+
* `id` (int64): Required - Automation ID.
|
147
|
+
|
148
|
+
|
149
|
+
---
|
150
|
+
|
151
|
+
## Update Automation
|
152
|
+
|
153
|
+
```
|
154
|
+
automation = Files::Automation.list_for(path).first
|
155
|
+
|
156
|
+
automation.update(
|
157
|
+
automation: "create_folder",
|
158
|
+
source: "source",
|
159
|
+
destination: "destination",
|
160
|
+
interval: "year"
|
161
|
+
)
|
162
|
+
```
|
163
|
+
|
164
|
+
### Parameters
|
165
|
+
|
166
|
+
* `id` (int64): Required - Automation ID.
|
167
|
+
* `automation` (string): Required - Type of automation. One of: `create_folder`, `request_file`, `request_move`
|
168
|
+
* `source` (string): Source Path
|
169
|
+
* `destination` (string): Destination Path
|
170
|
+
* `destination_replace_from` (string): If set, this string in the destination path will be replaced with the value in `destination_replace_to`.
|
171
|
+
* `destination_replace_to` (string): If set, this string will replace the value `destination_replace_from` in the destination filename. You can use special patterns here.
|
172
|
+
* `interval` (string): How often to run this automation? One of: `day`, `week`, `week_end`, `month`, `month_end`, `quarter`, `quarter_end`, `year`, `year_end`
|
173
|
+
* `path` (string): Path on which this Automation runs. Supports globs.
|
174
|
+
* `user_ids` (string): A list of user IDs the automation is associated with. If sent as a string, it should be comma-delimited.
|
175
|
+
* `group_ids` (string): A list of group IDs the automation is associated with. If sent as a string, it should be comma-delimited.
|
176
|
+
|
177
|
+
|
178
|
+
---
|
179
|
+
|
180
|
+
## Delete Automation
|
181
|
+
|
182
|
+
```
|
183
|
+
automation = Files::Automation.list_for(path).first
|
184
|
+
|
185
|
+
automation.delete
|
186
|
+
```
|
187
|
+
|
188
|
+
### Parameters
|
189
|
+
|
190
|
+
* `id` (int64): Required - Automation ID.
|
data/docs/behavior.md
ADDED
@@ -0,0 +1,208 @@
|
|
1
|
+
# Behavior
|
2
|
+
|
3
|
+
## Example Behavior Object
|
4
|
+
|
5
|
+
```
|
6
|
+
{
|
7
|
+
"id": 1,
|
8
|
+
"path": "",
|
9
|
+
"attachment_url": "",
|
10
|
+
"behavior": "webhook",
|
11
|
+
"value": {
|
12
|
+
"method": "GET"
|
13
|
+
}
|
14
|
+
}
|
15
|
+
```
|
16
|
+
|
17
|
+
* `id` (int64): Folder behavior ID
|
18
|
+
* `path` (string): Folder path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
19
|
+
* `attachment_url` (string): URL for attached file
|
20
|
+
* `behavior` (string): Behavior type.
|
21
|
+
* `value` (object): Settings for this behavior. See the section above for an example value to provide here. Formatting is different for each Behavior type. May be sent as nested JSON or a single JSON-encoded string. If using XML encoding for the API call, this data must be sent as a JSON-encoded string.
|
22
|
+
* `attachment_file` (file): Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
|
23
|
+
|
24
|
+
|
25
|
+
---
|
26
|
+
|
27
|
+
## List Behaviors
|
28
|
+
|
29
|
+
```
|
30
|
+
Files::Behavior.list(
|
31
|
+
page: 1,
|
32
|
+
per_page: 1,
|
33
|
+
behavior: "webhook"
|
34
|
+
)
|
35
|
+
```
|
36
|
+
|
37
|
+
### Parameters
|
38
|
+
|
39
|
+
* `page` (int64): Current page number.
|
40
|
+
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
41
|
+
* `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
42
|
+
* `cursor` (string): Send cursor to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor-Next header.
|
43
|
+
* `sort_by` (object): If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `site_id` and `behavior`.
|
44
|
+
* `filter` (object): If set, return records where the specifiied field is equal to the supplied value. Valid fields are `behavior`.
|
45
|
+
* `filter_gt` (object): If set, return records where the specifiied field is greater than the supplied value. Valid fields are `behavior`.
|
46
|
+
* `filter_gteq` (object): If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `behavior`.
|
47
|
+
* `filter_like` (object): If set, return records where the specifiied field is equal to the supplied value. Valid fields are `behavior`.
|
48
|
+
* `filter_lt` (object): If set, return records where the specifiied field is less than the supplied value. Valid fields are `behavior`.
|
49
|
+
* `filter_lteq` (object): If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `behavior`.
|
50
|
+
* `behavior` (string): If set, only shows folder behaviors matching this behavior type.
|
51
|
+
|
52
|
+
|
53
|
+
---
|
54
|
+
|
55
|
+
## Show Behavior
|
56
|
+
|
57
|
+
```
|
58
|
+
Files::Behavior.find(id)
|
59
|
+
```
|
60
|
+
|
61
|
+
### Parameters
|
62
|
+
|
63
|
+
* `id` (int64): Required - Behavior ID.
|
64
|
+
|
65
|
+
|
66
|
+
---
|
67
|
+
|
68
|
+
## List Behaviors by path
|
69
|
+
|
70
|
+
```
|
71
|
+
Files::Behavior.list_for(path,
|
72
|
+
page: 1,
|
73
|
+
per_page: 1,
|
74
|
+
behavior: "webhook"
|
75
|
+
)
|
76
|
+
```
|
77
|
+
|
78
|
+
### Parameters
|
79
|
+
|
80
|
+
* `page` (int64): Current page number.
|
81
|
+
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
82
|
+
* `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
83
|
+
* `cursor` (string): Send cursor to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor-Next header.
|
84
|
+
* `sort_by` (object): If set, sort records by the specified field in either 'asc' or 'desc' direction (e.g. sort_by[last_login_at]=desc). Valid fields are `site_id` and `behavior`.
|
85
|
+
* `filter` (object): If set, return records where the specifiied field is equal to the supplied value. Valid fields are `behavior`.
|
86
|
+
* `filter_gt` (object): If set, return records where the specifiied field is greater than the supplied value. Valid fields are `behavior`.
|
87
|
+
* `filter_gteq` (object): If set, return records where the specifiied field is greater than or equal to the supplied value. Valid fields are `behavior`.
|
88
|
+
* `filter_like` (object): If set, return records where the specifiied field is equal to the supplied value. Valid fields are `behavior`.
|
89
|
+
* `filter_lt` (object): If set, return records where the specifiied field is less than the supplied value. Valid fields are `behavior`.
|
90
|
+
* `filter_lteq` (object): If set, return records where the specifiied field is less than or equal to the supplied value. Valid fields are `behavior`.
|
91
|
+
* `path` (string): Required - Path to operate on.
|
92
|
+
* `recursive` (string): Show behaviors above this path?
|
93
|
+
* `behavior` (string): DEPRECATED: If set only shows folder behaviors matching this behavior type. Use `filter[behavior]` instead.
|
94
|
+
|
95
|
+
|
96
|
+
---
|
97
|
+
|
98
|
+
## Create Behavior
|
99
|
+
|
100
|
+
```
|
101
|
+
Files::Behavior.create(
|
102
|
+
value: "{\"method\": \"GET\"}",
|
103
|
+
path: "path",
|
104
|
+
behavior: "webhook"
|
105
|
+
)
|
106
|
+
```
|
107
|
+
|
108
|
+
### Parameters
|
109
|
+
|
110
|
+
* `value` (string): The value of the folder behavior. Can be a integer, array, or hash depending on the type of folder behavior.
|
111
|
+
* `attachment_file` (file): Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
|
112
|
+
* `path` (string): Required - Folder behaviors path.
|
113
|
+
* `behavior` (string): Required - Behavior type.
|
114
|
+
|
115
|
+
|
116
|
+
---
|
117
|
+
|
118
|
+
## Test webhook
|
119
|
+
|
120
|
+
```
|
121
|
+
Files::Behavior.webhook_test(
|
122
|
+
url: "https://www.site.com/...",
|
123
|
+
method: "GET",
|
124
|
+
encoding: "RAW",
|
125
|
+
headers: "x-test-header => testvalue",
|
126
|
+
body: "test-param => testvalue",
|
127
|
+
action: "test"
|
128
|
+
)
|
129
|
+
```
|
130
|
+
|
131
|
+
### Parameters
|
132
|
+
|
133
|
+
* `url` (string): Required - URL for testing the webhook.
|
134
|
+
* `method` (string): HTTP method(GET or POST).
|
135
|
+
* `encoding` (string): HTTP encoding method. Can be JSON, XML, or RAW (form data).
|
136
|
+
* `headers` (object): Additional request headers.
|
137
|
+
* `body` (object): Additional body parameters.
|
138
|
+
* `action` (string): action for test body
|
139
|
+
|
140
|
+
|
141
|
+
---
|
142
|
+
|
143
|
+
## Update Behavior
|
144
|
+
|
145
|
+
```
|
146
|
+
Files::Behavior.update(id,
|
147
|
+
value: "{\"method\": \"GET\"}",
|
148
|
+
behavior: "webhook"
|
149
|
+
)
|
150
|
+
```
|
151
|
+
|
152
|
+
### Parameters
|
153
|
+
|
154
|
+
* `id` (int64): Required - Behavior ID.
|
155
|
+
* `value` (string): The value of the folder behavior. Can be a integer, array, or hash depending on the type of folder behavior.
|
156
|
+
* `attachment_file` (file): Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
|
157
|
+
* `behavior` (string): Behavior type.
|
158
|
+
* `path` (string): Folder behaviors path.
|
159
|
+
|
160
|
+
|
161
|
+
---
|
162
|
+
|
163
|
+
## Delete Behavior
|
164
|
+
|
165
|
+
```
|
166
|
+
Files::Behavior.delete(id)
|
167
|
+
```
|
168
|
+
|
169
|
+
### Parameters
|
170
|
+
|
171
|
+
* `id` (int64): Required - Behavior ID.
|
172
|
+
|
173
|
+
|
174
|
+
---
|
175
|
+
|
176
|
+
## Update Behavior
|
177
|
+
|
178
|
+
```
|
179
|
+
behavior = Files::Behavior.list_for(path).first
|
180
|
+
|
181
|
+
behavior.update(
|
182
|
+
value: "{\"method\": \"GET\"}",
|
183
|
+
behavior: "webhook"
|
184
|
+
)
|
185
|
+
```
|
186
|
+
|
187
|
+
### Parameters
|
188
|
+
|
189
|
+
* `id` (int64): Required - Behavior ID.
|
190
|
+
* `value` (string): The value of the folder behavior. Can be a integer, array, or hash depending on the type of folder behavior.
|
191
|
+
* `attachment_file` (file): Certain behaviors may require a file, for instance, the "watermark" behavior requires a watermark image
|
192
|
+
* `behavior` (string): Behavior type.
|
193
|
+
* `path` (string): Folder behaviors path.
|
194
|
+
|
195
|
+
|
196
|
+
---
|
197
|
+
|
198
|
+
## Delete Behavior
|
199
|
+
|
200
|
+
```
|
201
|
+
behavior = Files::Behavior.list_for(path).first
|
202
|
+
|
203
|
+
behavior.delete
|
204
|
+
```
|
205
|
+
|
206
|
+
### Parameters
|
207
|
+
|
208
|
+
* `id` (int64): Required - Behavior ID.
|