files.com 1.0.18 → 1.0.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_VERSION +1 -1
- data/docs/history_export.md +173 -0
- data/lib/files.com/models/history_export.rb +351 -0
- data/lib/files.com.rb +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59924162340fe2fe73ed4b7166beae86bb05c52c4bbabe0a18fb2628d1bf2f99
|
4
|
+
data.tar.gz: be7bade57853e1a4842017fc123a472381ab5ea8bd751dc93ce0d25164ea1230
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2aefcf4534ccc93969d7987cc071390599ebf80f770a2e14758bdcaeb4c6a1dcc1ef74b0e90909e007a32057aad0e505608480eda691e606c3171468a1125f7
|
7
|
+
data.tar.gz: 3e7931bc71f5e8033ac8f4d63da0eecae996968582b2471aa3b150ad6bde954315dbe2c79ced76b55a7a44a4e2a2d1c54bb432ed3854dd138e2dea5cae1eb15a
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.19
|
@@ -0,0 +1,173 @@
|
|
1
|
+
# HistoryExport
|
2
|
+
|
3
|
+
## Example HistoryExport Object
|
4
|
+
|
5
|
+
```
|
6
|
+
{
|
7
|
+
"id": 1,
|
8
|
+
"start_at": "2000-01-01T01:00:00Z",
|
9
|
+
"end_at": "2000-01-01T01:00:00Z",
|
10
|
+
"status": "ready",
|
11
|
+
"query_action": "read",
|
12
|
+
"query_interface": "ftp",
|
13
|
+
"query_user_id": 1,
|
14
|
+
"query_file_id": 1,
|
15
|
+
"query_parent_id": 1,
|
16
|
+
"query_path": "MyFile.txt",
|
17
|
+
"query_folder": "Folder",
|
18
|
+
"query_src": "SrcFolder",
|
19
|
+
"query_destination": "DestFolder",
|
20
|
+
"query_ip": "127.0.0.1",
|
21
|
+
"query_username": "jerry",
|
22
|
+
"query_faillure_type": "bad_password",
|
23
|
+
"query_target_id": 1,
|
24
|
+
"query_target_name": "full",
|
25
|
+
"query_target_permission": "full",
|
26
|
+
"query_target_user_id": 1,
|
27
|
+
"query_target_username": "jerry",
|
28
|
+
"query_target_platform": "windows",
|
29
|
+
"query_target_permission_set": "desktop_app"
|
30
|
+
}
|
31
|
+
```
|
32
|
+
|
33
|
+
* `id` (int64): History Export ID
|
34
|
+
* `start_at` (date-time): Start date/time of export range.
|
35
|
+
* `end_at` (date-time): End date/time of export range.
|
36
|
+
* `status` (string): Status of export. Will be: `building` or `ready`
|
37
|
+
* `query_action` (string): Filter results by this this action type. Valid values: `create`, `read`, `update`, `destroy`, `move`, `login`, `failedlogin`, `copy`, `user_create`, `user_update`, `user_destroy`, `group_create`, `group_update`, `group_destroy`, `permission_create`, `permission_destroy`, `api_key_create`, `api_key_update`, `api_key_destroy`
|
38
|
+
* `query_interface` (string): Filter results by this this interface type. Valid values: `web`, `ftp`, `robot`, `jsapi`, `webdesktopapi`, `sftp`, `dav`, `desktop`, `restapi`, `scim`
|
39
|
+
* `query_user_id` (int64): Return results that are actions performed by the user indiciated by this User ID
|
40
|
+
* `query_file_id` (int64): Return results that are file actions related to the file indicated by this File ID
|
41
|
+
* `query_parent_id` (int64): Return results that are file actions inside the parent folder specified by this folder ID
|
42
|
+
* `query_path` (string): Return results that are file actions related to this path.
|
43
|
+
* `query_folder` (string): Return results that are file actions related to files or folders inside this folder path.
|
44
|
+
* `query_src` (string): Return results that are file moves originating from this path.
|
45
|
+
* `query_destination` (string): Return results that are file moves with this path as destination.
|
46
|
+
* `query_ip` (string): Filter results by this IP address.
|
47
|
+
* `query_username` (string): Filter results by this username.
|
48
|
+
* `query_faillure_type` (string): If searching for Histories about login failures, this parameter restricts results to failures of this specific type. Valid values: `expired_trial`, `account_overdue`, `locked_out`, `ip_mismatch`, `password_mismatch`, `site_mismatch`, `username_not_found`, `none`, `no_ftp_permission`, `no_web_permission`, `no_directory`, `errno_enoent`, `no_sftp_permission`, `no_dav_permission`, `no_restapi_permission`, `key_mismatch`, `region_mismatch`, `expired_access`, `desktop_ip_mismatch`, `desktop_api_key_not_used_quickly_enough`, `disabled`
|
49
|
+
* `query_target_id` (int64): If searching for Histories about specific objects (such as Users, or API Keys), this paremeter restricts results to objects that match this ID.
|
50
|
+
* `query_target_name` (string): If searching for Histories about Users, Groups or other objects with names, this parameter restricts results to objects with this name/username.
|
51
|
+
* `query_target_permission` (string): If searching for Histories about Permisisons, this parameter restricts results to permissions of this level.
|
52
|
+
* `query_target_user_id` (int64): If searching for Histories about API keys, this parameter restricts results to API keys created by/for this user ID.
|
53
|
+
* `query_target_username` (string): If searching for Histories about API keys, this parameter restricts results to API keys created by/for this username.
|
54
|
+
* `query_target_platform` (string): If searching for Histories about API keys, this parameter restricts results to API keys associated with this platform.
|
55
|
+
* `query_target_permission_set` (string): If searching for Histories about API keys, this parameter restricts results to API keys with this permission set.
|
56
|
+
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
|
57
|
+
|
58
|
+
|
59
|
+
---
|
60
|
+
|
61
|
+
## List History Exports
|
62
|
+
|
63
|
+
```
|
64
|
+
Files::HistoryExport.list(
|
65
|
+
user_id: 1,
|
66
|
+
page: 1,
|
67
|
+
per_page: 1
|
68
|
+
)
|
69
|
+
```
|
70
|
+
|
71
|
+
### Parameters
|
72
|
+
|
73
|
+
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
|
74
|
+
* `page` (int64): Current page number.
|
75
|
+
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
76
|
+
* `action` (string): Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
77
|
+
|
78
|
+
|
79
|
+
---
|
80
|
+
|
81
|
+
## Show History Export
|
82
|
+
|
83
|
+
```
|
84
|
+
Files::HistoryExport.find(id)
|
85
|
+
```
|
86
|
+
|
87
|
+
### Parameters
|
88
|
+
|
89
|
+
* `id` (int64): Required - History Export ID.
|
90
|
+
|
91
|
+
|
92
|
+
---
|
93
|
+
|
94
|
+
## Create History Export
|
95
|
+
|
96
|
+
```
|
97
|
+
Files::HistoryExport.create(
|
98
|
+
user_id: 1,
|
99
|
+
start_at: "2000-01-01T01:00:00Z",
|
100
|
+
end_at: "2000-01-01T01:00:00Z",
|
101
|
+
query_action: "read",
|
102
|
+
query_interface: "ftp",
|
103
|
+
query_user_id: 1,
|
104
|
+
query_file_id: 1,
|
105
|
+
query_parent_id: 1,
|
106
|
+
query_path: "MyFile.txt",
|
107
|
+
query_folder: "Folder",
|
108
|
+
query_src: "SrcFolder",
|
109
|
+
query_destination: "DestFolder",
|
110
|
+
query_ip: "127.0.0.1",
|
111
|
+
query_username: "jerry",
|
112
|
+
query_faillure_type: "bad_password",
|
113
|
+
query_target_id: 1,
|
114
|
+
query_target_name: "full",
|
115
|
+
query_target_permission: "full",
|
116
|
+
query_target_user_id: 1,
|
117
|
+
query_target_username: "jerry",
|
118
|
+
query_target_platform: "windows",
|
119
|
+
query_target_permission_set: "desktop_app"
|
120
|
+
)
|
121
|
+
```
|
122
|
+
|
123
|
+
### Parameters
|
124
|
+
|
125
|
+
* `user_id` (int64): User ID. Provide a value of `0` to operate the current session's user.
|
126
|
+
* `start_at` (string): Start date/time of export range.
|
127
|
+
* `end_at` (string): End date/time of export range.
|
128
|
+
* `query_action` (string): Filter results by this this action type. Valid values: `create`, `read`, `update`, `destroy`, `move`, `login`, `failedlogin`, `copy`, `user_create`, `user_update`, `user_destroy`, `group_create`, `group_update`, `group_destroy`, `permission_create`, `permission_destroy`, `api_key_create`, `api_key_update`, `api_key_destroy`
|
129
|
+
* `query_interface` (string): Filter results by this this interface type. Valid values: `web`, `ftp`, `robot`, `jsapi`, `webdesktopapi`, `sftp`, `dav`, `desktop`, `restapi`, `scim`
|
130
|
+
* `query_user_id` (int64): Return results that are actions performed by the user indiciated by this User ID
|
131
|
+
* `query_file_id` (int64): Return results that are file actions related to the file indicated by this File ID
|
132
|
+
* `query_parent_id` (int64): Return results that are file actions inside the parent folder specified by this folder ID
|
133
|
+
* `query_path` (string): Return results that are file actions related to this path.
|
134
|
+
* `query_folder` (string): Return results that are file actions related to files or folders inside this folder path.
|
135
|
+
* `query_src` (string): Return results that are file moves originating from this path.
|
136
|
+
* `query_destination` (string): Return results that are file moves with this path as destination.
|
137
|
+
* `query_ip` (string): Filter results by this IP address.
|
138
|
+
* `query_username` (string): Filter results by this username.
|
139
|
+
* `query_faillure_type` (string): If searching for Histories about login failures, this parameter restricts results to failures of this specific type. Valid values: `expired_trial`, `account_overdue`, `locked_out`, `ip_mismatch`, `password_mismatch`, `site_mismatch`, `username_not_found`, `none`, `no_ftp_permission`, `no_web_permission`, `no_directory`, `errno_enoent`, `no_sftp_permission`, `no_dav_permission`, `no_restapi_permission`, `key_mismatch`, `region_mismatch`, `expired_access`, `desktop_ip_mismatch`, `desktop_api_key_not_used_quickly_enough`, `disabled`
|
140
|
+
* `query_target_id` (int64): If searching for Histories about specific objects (such as Users, or API Keys), this paremeter restricts results to objects that match this ID.
|
141
|
+
* `query_target_name` (string): If searching for Histories about Users, Groups or other objects with names, this parameter restricts results to objects with this name/username.
|
142
|
+
* `query_target_permission` (string): If searching for Histories about Permisisons, this parameter restricts results to permissions of this level.
|
143
|
+
* `query_target_user_id` (int64): If searching for Histories about API keys, this parameter restricts results to API keys created by/for this user ID.
|
144
|
+
* `query_target_username` (string): If searching for Histories about API keys, this parameter restricts results to API keys created by/for this username.
|
145
|
+
* `query_target_platform` (string): If searching for Histories about API keys, this parameter restricts results to API keys associated with this platform.
|
146
|
+
* `query_target_permission_set` (string): If searching for Histories about API keys, this parameter restricts results to API keys with this permission set.
|
147
|
+
|
148
|
+
|
149
|
+
---
|
150
|
+
|
151
|
+
## Delete History Export
|
152
|
+
|
153
|
+
```
|
154
|
+
Files::HistoryExport.delete(id)
|
155
|
+
```
|
156
|
+
|
157
|
+
### Parameters
|
158
|
+
|
159
|
+
* `id` (int64): Required - History Export ID.
|
160
|
+
|
161
|
+
|
162
|
+
---
|
163
|
+
|
164
|
+
## Delete History Export
|
165
|
+
|
166
|
+
```
|
167
|
+
history_export = Files::HistoryExport.find(1)
|
168
|
+
history_export.delete
|
169
|
+
```
|
170
|
+
|
171
|
+
### Parameters
|
172
|
+
|
173
|
+
* `id` (int64): Required - History Export ID.
|
@@ -0,0 +1,351 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Files
|
4
|
+
class HistoryExport
|
5
|
+
attr_reader :options, :attributes
|
6
|
+
|
7
|
+
def initialize(attributes = {}, options = {})
|
8
|
+
@attributes = attributes || {}
|
9
|
+
@options = options || {}
|
10
|
+
end
|
11
|
+
|
12
|
+
# int64 - History Export ID
|
13
|
+
def id
|
14
|
+
@attributes[:id]
|
15
|
+
end
|
16
|
+
|
17
|
+
def id=(value)
|
18
|
+
@attributes[:id] = value
|
19
|
+
end
|
20
|
+
|
21
|
+
# date-time - Start date/time of export range.
|
22
|
+
def start_at
|
23
|
+
@attributes[:start_at]
|
24
|
+
end
|
25
|
+
|
26
|
+
def start_at=(value)
|
27
|
+
@attributes[:start_at] = value
|
28
|
+
end
|
29
|
+
|
30
|
+
# date-time - End date/time of export range.
|
31
|
+
def end_at
|
32
|
+
@attributes[:end_at]
|
33
|
+
end
|
34
|
+
|
35
|
+
def end_at=(value)
|
36
|
+
@attributes[:end_at] = value
|
37
|
+
end
|
38
|
+
|
39
|
+
# string - Status of export. Will be: `building` or `ready`
|
40
|
+
def status
|
41
|
+
@attributes[:status]
|
42
|
+
end
|
43
|
+
|
44
|
+
def status=(value)
|
45
|
+
@attributes[:status] = value
|
46
|
+
end
|
47
|
+
|
48
|
+
# string - Filter results by this this action type. Valid values: `create`, `read`, `update`, `destroy`, `move`, `login`, `failedlogin`, `copy`, `user_create`, `user_update`, `user_destroy`, `group_create`, `group_update`, `group_destroy`, `permission_create`, `permission_destroy`, `api_key_create`, `api_key_update`, `api_key_destroy`
|
49
|
+
def query_action
|
50
|
+
@attributes[:query_action]
|
51
|
+
end
|
52
|
+
|
53
|
+
def query_action=(value)
|
54
|
+
@attributes[:query_action] = value
|
55
|
+
end
|
56
|
+
|
57
|
+
# string - Filter results by this this interface type. Valid values: `web`, `ftp`, `robot`, `jsapi`, `webdesktopapi`, `sftp`, `dav`, `desktop`, `restapi`, `scim`
|
58
|
+
def query_interface
|
59
|
+
@attributes[:query_interface]
|
60
|
+
end
|
61
|
+
|
62
|
+
def query_interface=(value)
|
63
|
+
@attributes[:query_interface] = value
|
64
|
+
end
|
65
|
+
|
66
|
+
# int64 - Return results that are actions performed by the user indiciated by this User ID
|
67
|
+
def query_user_id
|
68
|
+
@attributes[:query_user_id]
|
69
|
+
end
|
70
|
+
|
71
|
+
def query_user_id=(value)
|
72
|
+
@attributes[:query_user_id] = value
|
73
|
+
end
|
74
|
+
|
75
|
+
# int64 - Return results that are file actions related to the file indicated by this File ID
|
76
|
+
def query_file_id
|
77
|
+
@attributes[:query_file_id]
|
78
|
+
end
|
79
|
+
|
80
|
+
def query_file_id=(value)
|
81
|
+
@attributes[:query_file_id] = value
|
82
|
+
end
|
83
|
+
|
84
|
+
# int64 - Return results that are file actions inside the parent folder specified by this folder ID
|
85
|
+
def query_parent_id
|
86
|
+
@attributes[:query_parent_id]
|
87
|
+
end
|
88
|
+
|
89
|
+
def query_parent_id=(value)
|
90
|
+
@attributes[:query_parent_id] = value
|
91
|
+
end
|
92
|
+
|
93
|
+
# string - Return results that are file actions related to this path.
|
94
|
+
def query_path
|
95
|
+
@attributes[:query_path]
|
96
|
+
end
|
97
|
+
|
98
|
+
def query_path=(value)
|
99
|
+
@attributes[:query_path] = value
|
100
|
+
end
|
101
|
+
|
102
|
+
# string - Return results that are file actions related to files or folders inside this folder path.
|
103
|
+
def query_folder
|
104
|
+
@attributes[:query_folder]
|
105
|
+
end
|
106
|
+
|
107
|
+
def query_folder=(value)
|
108
|
+
@attributes[:query_folder] = value
|
109
|
+
end
|
110
|
+
|
111
|
+
# string - Return results that are file moves originating from this path.
|
112
|
+
def query_src
|
113
|
+
@attributes[:query_src]
|
114
|
+
end
|
115
|
+
|
116
|
+
def query_src=(value)
|
117
|
+
@attributes[:query_src] = value
|
118
|
+
end
|
119
|
+
|
120
|
+
# string - Return results that are file moves with this path as destination.
|
121
|
+
def query_destination
|
122
|
+
@attributes[:query_destination]
|
123
|
+
end
|
124
|
+
|
125
|
+
def query_destination=(value)
|
126
|
+
@attributes[:query_destination] = value
|
127
|
+
end
|
128
|
+
|
129
|
+
# string - Filter results by this IP address.
|
130
|
+
def query_ip
|
131
|
+
@attributes[:query_ip]
|
132
|
+
end
|
133
|
+
|
134
|
+
def query_ip=(value)
|
135
|
+
@attributes[:query_ip] = value
|
136
|
+
end
|
137
|
+
|
138
|
+
# string - Filter results by this username.
|
139
|
+
def query_username
|
140
|
+
@attributes[:query_username]
|
141
|
+
end
|
142
|
+
|
143
|
+
def query_username=(value)
|
144
|
+
@attributes[:query_username] = value
|
145
|
+
end
|
146
|
+
|
147
|
+
# string - If searching for Histories about login failures, this parameter restricts results to failures of this specific type. Valid values: `expired_trial`, `account_overdue`, `locked_out`, `ip_mismatch`, `password_mismatch`, `site_mismatch`, `username_not_found`, `none`, `no_ftp_permission`, `no_web_permission`, `no_directory`, `errno_enoent`, `no_sftp_permission`, `no_dav_permission`, `no_restapi_permission`, `key_mismatch`, `region_mismatch`, `expired_access`, `desktop_ip_mismatch`, `desktop_api_key_not_used_quickly_enough`, `disabled`
|
148
|
+
def query_faillure_type
|
149
|
+
@attributes[:query_faillure_type]
|
150
|
+
end
|
151
|
+
|
152
|
+
def query_faillure_type=(value)
|
153
|
+
@attributes[:query_faillure_type] = value
|
154
|
+
end
|
155
|
+
|
156
|
+
# int64 - If searching for Histories about specific objects (such as Users, or API Keys), this paremeter restricts results to objects that match this ID.
|
157
|
+
def query_target_id
|
158
|
+
@attributes[:query_target_id]
|
159
|
+
end
|
160
|
+
|
161
|
+
def query_target_id=(value)
|
162
|
+
@attributes[:query_target_id] = value
|
163
|
+
end
|
164
|
+
|
165
|
+
# string - If searching for Histories about Users, Groups or other objects with names, this parameter restricts results to objects with this name/username.
|
166
|
+
def query_target_name
|
167
|
+
@attributes[:query_target_name]
|
168
|
+
end
|
169
|
+
|
170
|
+
def query_target_name=(value)
|
171
|
+
@attributes[:query_target_name] = value
|
172
|
+
end
|
173
|
+
|
174
|
+
# string - If searching for Histories about Permisisons, this parameter restricts results to permissions of this level.
|
175
|
+
def query_target_permission
|
176
|
+
@attributes[:query_target_permission]
|
177
|
+
end
|
178
|
+
|
179
|
+
def query_target_permission=(value)
|
180
|
+
@attributes[:query_target_permission] = value
|
181
|
+
end
|
182
|
+
|
183
|
+
# int64 - If searching for Histories about API keys, this parameter restricts results to API keys created by/for this user ID.
|
184
|
+
def query_target_user_id
|
185
|
+
@attributes[:query_target_user_id]
|
186
|
+
end
|
187
|
+
|
188
|
+
def query_target_user_id=(value)
|
189
|
+
@attributes[:query_target_user_id] = value
|
190
|
+
end
|
191
|
+
|
192
|
+
# string - If searching for Histories about API keys, this parameter restricts results to API keys created by/for this username.
|
193
|
+
def query_target_username
|
194
|
+
@attributes[:query_target_username]
|
195
|
+
end
|
196
|
+
|
197
|
+
def query_target_username=(value)
|
198
|
+
@attributes[:query_target_username] = value
|
199
|
+
end
|
200
|
+
|
201
|
+
# string - If searching for Histories about API keys, this parameter restricts results to API keys associated with this platform.
|
202
|
+
def query_target_platform
|
203
|
+
@attributes[:query_target_platform]
|
204
|
+
end
|
205
|
+
|
206
|
+
def query_target_platform=(value)
|
207
|
+
@attributes[:query_target_platform] = value
|
208
|
+
end
|
209
|
+
|
210
|
+
# string - If searching for Histories about API keys, this parameter restricts results to API keys with this permission set.
|
211
|
+
def query_target_permission_set
|
212
|
+
@attributes[:query_target_permission_set]
|
213
|
+
end
|
214
|
+
|
215
|
+
def query_target_permission_set=(value)
|
216
|
+
@attributes[:query_target_permission_set] = value
|
217
|
+
end
|
218
|
+
|
219
|
+
# int64 - User ID. Provide a value of `0` to operate the current session's user.
|
220
|
+
def user_id
|
221
|
+
@attributes[:user_id]
|
222
|
+
end
|
223
|
+
|
224
|
+
def user_id=(value)
|
225
|
+
@attributes[:user_id] = value
|
226
|
+
end
|
227
|
+
|
228
|
+
def delete(params = {})
|
229
|
+
params ||= {}
|
230
|
+
params[:id] = @attributes[:id]
|
231
|
+
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
232
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
233
|
+
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
234
|
+
|
235
|
+
Api.send_request("/history_exports/#{@attributes[:id]}", :delete, params, @options)
|
236
|
+
end
|
237
|
+
|
238
|
+
def destroy(params = {})
|
239
|
+
delete(params)
|
240
|
+
end
|
241
|
+
|
242
|
+
def save
|
243
|
+
if @attributes[:id]
|
244
|
+
raise NotImplementedError.new("The HistoryExport object doesn't support updates.")
|
245
|
+
else
|
246
|
+
new_obj = HistoryExport.create(@attributes, @options)
|
247
|
+
@attributes = new_obj.attributes
|
248
|
+
end
|
249
|
+
end
|
250
|
+
|
251
|
+
# Parameters:
|
252
|
+
# user_id - integer - User ID. Provide a value of `0` to operate the current session's user.
|
253
|
+
# page - integer - Current page number.
|
254
|
+
# per_page - integer - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
255
|
+
# action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
|
256
|
+
def self.list(params = {}, options = {})
|
257
|
+
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
|
258
|
+
raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
|
259
|
+
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
|
260
|
+
raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
|
261
|
+
|
262
|
+
response, options = Api.send_request("/history_exports", :get, params, options)
|
263
|
+
response.data.map { |object| HistoryExport.new(object, options) }
|
264
|
+
end
|
265
|
+
|
266
|
+
def self.all(params = {}, options = {})
|
267
|
+
list(params, options)
|
268
|
+
end
|
269
|
+
|
270
|
+
# Parameters:
|
271
|
+
# id (required) - integer - History Export ID.
|
272
|
+
def self.find(id, params = {}, options = {})
|
273
|
+
params ||= {}
|
274
|
+
params[:id] = id
|
275
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
276
|
+
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
277
|
+
|
278
|
+
response, options = Api.send_request("/history_exports/#{params[:id]}", :get, params, options)
|
279
|
+
HistoryExport.new(response.data, options)
|
280
|
+
end
|
281
|
+
|
282
|
+
def self.get(id, params = {}, options = {})
|
283
|
+
find(id, params, options)
|
284
|
+
end
|
285
|
+
|
286
|
+
# Parameters:
|
287
|
+
# user_id - integer - User ID. Provide a value of `0` to operate the current session's user.
|
288
|
+
# start_at - string - Start date/time of export range.
|
289
|
+
# end_at - string - End date/time of export range.
|
290
|
+
# query_action - string - Filter results by this this action type. Valid values: `create`, `read`, `update`, `destroy`, `move`, `login`, `failedlogin`, `copy`, `user_create`, `user_update`, `user_destroy`, `group_create`, `group_update`, `group_destroy`, `permission_create`, `permission_destroy`, `api_key_create`, `api_key_update`, `api_key_destroy`
|
291
|
+
# query_interface - string - Filter results by this this interface type. Valid values: `web`, `ftp`, `robot`, `jsapi`, `webdesktopapi`, `sftp`, `dav`, `desktop`, `restapi`, `scim`
|
292
|
+
# query_user_id - integer - Return results that are actions performed by the user indiciated by this User ID
|
293
|
+
# query_file_id - integer - Return results that are file actions related to the file indicated by this File ID
|
294
|
+
# query_parent_id - integer - Return results that are file actions inside the parent folder specified by this folder ID
|
295
|
+
# query_path - string - Return results that are file actions related to this path.
|
296
|
+
# query_folder - string - Return results that are file actions related to files or folders inside this folder path.
|
297
|
+
# query_src - string - Return results that are file moves originating from this path.
|
298
|
+
# query_destination - string - Return results that are file moves with this path as destination.
|
299
|
+
# query_ip - string - Filter results by this IP address.
|
300
|
+
# query_username - string - Filter results by this username.
|
301
|
+
# query_faillure_type - string - If searching for Histories about login failures, this parameter restricts results to failures of this specific type. Valid values: `expired_trial`, `account_overdue`, `locked_out`, `ip_mismatch`, `password_mismatch`, `site_mismatch`, `username_not_found`, `none`, `no_ftp_permission`, `no_web_permission`, `no_directory`, `errno_enoent`, `no_sftp_permission`, `no_dav_permission`, `no_restapi_permission`, `key_mismatch`, `region_mismatch`, `expired_access`, `desktop_ip_mismatch`, `desktop_api_key_not_used_quickly_enough`, `disabled`
|
302
|
+
# query_target_id - integer - If searching for Histories about specific objects (such as Users, or API Keys), this paremeter restricts results to objects that match this ID.
|
303
|
+
# query_target_name - string - If searching for Histories about Users, Groups or other objects with names, this parameter restricts results to objects with this name/username.
|
304
|
+
# query_target_permission - string - If searching for Histories about Permisisons, this parameter restricts results to permissions of this level.
|
305
|
+
# query_target_user_id - integer - If searching for Histories about API keys, this parameter restricts results to API keys created by/for this user ID.
|
306
|
+
# query_target_username - string - If searching for Histories about API keys, this parameter restricts results to API keys created by/for this username.
|
307
|
+
# query_target_platform - string - If searching for Histories about API keys, this parameter restricts results to API keys associated with this platform.
|
308
|
+
# query_target_permission_set - string - If searching for Histories about API keys, this parameter restricts results to API keys with this permission set.
|
309
|
+
def self.create(params = {}, options = {})
|
310
|
+
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
|
311
|
+
raise InvalidParameterError.new("Bad parameter: start_at must be an String") if params.dig(:start_at) and !params.dig(:start_at).is_a?(String)
|
312
|
+
raise InvalidParameterError.new("Bad parameter: end_at must be an String") if params.dig(:end_at) and !params.dig(:end_at).is_a?(String)
|
313
|
+
raise InvalidParameterError.new("Bad parameter: query_action must be an String") if params.dig(:query_action) and !params.dig(:query_action).is_a?(String)
|
314
|
+
raise InvalidParameterError.new("Bad parameter: query_interface must be an String") if params.dig(:query_interface) and !params.dig(:query_interface).is_a?(String)
|
315
|
+
raise InvalidParameterError.new("Bad parameter: query_user_id must be an Integer") if params.dig(:query_user_id) and !params.dig(:query_user_id).is_a?(Integer)
|
316
|
+
raise InvalidParameterError.new("Bad parameter: query_file_id must be an Integer") if params.dig(:query_file_id) and !params.dig(:query_file_id).is_a?(Integer)
|
317
|
+
raise InvalidParameterError.new("Bad parameter: query_parent_id must be an Integer") if params.dig(:query_parent_id) and !params.dig(:query_parent_id).is_a?(Integer)
|
318
|
+
raise InvalidParameterError.new("Bad parameter: query_path must be an String") if params.dig(:query_path) and !params.dig(:query_path).is_a?(String)
|
319
|
+
raise InvalidParameterError.new("Bad parameter: query_folder must be an String") if params.dig(:query_folder) and !params.dig(:query_folder).is_a?(String)
|
320
|
+
raise InvalidParameterError.new("Bad parameter: query_src must be an String") if params.dig(:query_src) and !params.dig(:query_src).is_a?(String)
|
321
|
+
raise InvalidParameterError.new("Bad parameter: query_destination must be an String") if params.dig(:query_destination) and !params.dig(:query_destination).is_a?(String)
|
322
|
+
raise InvalidParameterError.new("Bad parameter: query_ip must be an String") if params.dig(:query_ip) and !params.dig(:query_ip).is_a?(String)
|
323
|
+
raise InvalidParameterError.new("Bad parameter: query_username must be an String") if params.dig(:query_username) and !params.dig(:query_username).is_a?(String)
|
324
|
+
raise InvalidParameterError.new("Bad parameter: query_faillure_type must be an String") if params.dig(:query_faillure_type) and !params.dig(:query_faillure_type).is_a?(String)
|
325
|
+
raise InvalidParameterError.new("Bad parameter: query_target_id must be an Integer") if params.dig(:query_target_id) and !params.dig(:query_target_id).is_a?(Integer)
|
326
|
+
raise InvalidParameterError.new("Bad parameter: query_target_name must be an String") if params.dig(:query_target_name) and !params.dig(:query_target_name).is_a?(String)
|
327
|
+
raise InvalidParameterError.new("Bad parameter: query_target_permission must be an String") if params.dig(:query_target_permission) and !params.dig(:query_target_permission).is_a?(String)
|
328
|
+
raise InvalidParameterError.new("Bad parameter: query_target_user_id must be an Integer") if params.dig(:query_target_user_id) and !params.dig(:query_target_user_id).is_a?(Integer)
|
329
|
+
raise InvalidParameterError.new("Bad parameter: query_target_username must be an String") if params.dig(:query_target_username) and !params.dig(:query_target_username).is_a?(String)
|
330
|
+
raise InvalidParameterError.new("Bad parameter: query_target_platform must be an String") if params.dig(:query_target_platform) and !params.dig(:query_target_platform).is_a?(String)
|
331
|
+
raise InvalidParameterError.new("Bad parameter: query_target_permission_set must be an String") if params.dig(:query_target_permission_set) and !params.dig(:query_target_permission_set).is_a?(String)
|
332
|
+
|
333
|
+
response, options = Api.send_request("/history_exports", :post, params, options)
|
334
|
+
HistoryExport.new(response.data, options)
|
335
|
+
end
|
336
|
+
|
337
|
+
def self.delete(id, params = {}, options = {})
|
338
|
+
params ||= {}
|
339
|
+
params[:id] = id
|
340
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
|
341
|
+
raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
|
342
|
+
|
343
|
+
response, _options = Api.send_request("/history_exports/#{params[:id]}", :delete, params, options)
|
344
|
+
response.data
|
345
|
+
end
|
346
|
+
|
347
|
+
def self.destroy(id, params = {}, options = {})
|
348
|
+
delete(id, params, options)
|
349
|
+
end
|
350
|
+
end
|
351
|
+
end
|
data/lib/files.com.rb
CHANGED
@@ -40,6 +40,7 @@ require "files.com/models/folder"
|
|
40
40
|
require "files.com/models/group"
|
41
41
|
require "files.com/models/group_user"
|
42
42
|
require "files.com/models/history"
|
43
|
+
require "files.com/models/history_export"
|
43
44
|
require "files.com/models/image"
|
44
45
|
require "files.com/models/invoice"
|
45
46
|
require "files.com/models/invoice_line_item"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: files.com
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- files.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -71,6 +71,7 @@ files:
|
|
71
71
|
- docs/group.md
|
72
72
|
- docs/group_user.md
|
73
73
|
- docs/history.md
|
74
|
+
- docs/history_export.md
|
74
75
|
- docs/image.md
|
75
76
|
- docs/inbox.md
|
76
77
|
- docs/invoice.md
|
@@ -153,6 +154,7 @@ files:
|
|
153
154
|
- lib/files.com/models/group.rb
|
154
155
|
- lib/files.com/models/group_user.rb
|
155
156
|
- lib/files.com/models/history.rb
|
157
|
+
- lib/files.com/models/history_export.rb
|
156
158
|
- lib/files.com/models/image.rb
|
157
159
|
- lib/files.com/models/inbox.rb
|
158
160
|
- lib/files.com/models/invoice.rb
|