files-com 1.6.208__py3-none-any.whl
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.
Potentially problematic release.
This version of files-com might be problematic. Click here for more details.
- README.md +758 -0
- _VERSION +1 -0
- files_com-1.6.208.dist-info/METADATA +770 -0
- files_com-1.6.208.dist-info/RECORD +126 -0
- files_com-1.6.208.dist-info/WHEEL +5 -0
- files_com-1.6.208.dist-info/licenses/LICENSE +21 -0
- files_com-1.6.208.dist-info/top_level.txt +1 -0
- files_sdk/__init__.py +309 -0
- files_sdk/api.py +63 -0
- files_sdk/api_client.py +336 -0
- files_sdk/error.py +2981 -0
- files_sdk/list_obj.py +42 -0
- files_sdk/models/__init__.py +119 -0
- files_sdk/models/account_line_item.py +51 -0
- files_sdk/models/action.py +49 -0
- files_sdk/models/action_notification_export.py +153 -0
- files_sdk/models/action_notification_export_result.py +88 -0
- files_sdk/models/agent_push_update.py +44 -0
- files_sdk/models/api_key.py +318 -0
- files_sdk/models/api_request_log.py +105 -0
- files_sdk/models/app.py +89 -0
- files_sdk/models/as2_incoming_message.py +117 -0
- files_sdk/models/as2_outgoing_message.py +113 -0
- files_sdk/models/as2_partner.py +415 -0
- files_sdk/models/as2_station.py +282 -0
- files_sdk/models/auto.py +36 -0
- files_sdk/models/automation.py +823 -0
- files_sdk/models/automation_log.py +94 -0
- files_sdk/models/automation_run.py +112 -0
- files_sdk/models/bandwidth_snapshot.py +91 -0
- files_sdk/models/behavior.py +340 -0
- files_sdk/models/bundle.py +686 -0
- files_sdk/models/bundle_action.py +93 -0
- files_sdk/models/bundle_download.py +94 -0
- files_sdk/models/bundle_notification.py +252 -0
- files_sdk/models/bundle_path.py +37 -0
- files_sdk/models/bundle_recipient.py +133 -0
- files_sdk/models/bundle_registration.py +82 -0
- files_sdk/models/child_site_management_policy.py +278 -0
- files_sdk/models/clickwrap.py +268 -0
- files_sdk/models/dns_record.py +59 -0
- files_sdk/models/email_incoming_message.py +102 -0
- files_sdk/models/email_log.py +84 -0
- files_sdk/models/errors.py +37 -0
- files_sdk/models/exavault_api_request_log.py +102 -0
- files_sdk/models/external_event.py +148 -0
- files_sdk/models/file.py +851 -0
- files_sdk/models/file_action.py +39 -0
- files_sdk/models/file_comment.py +191 -0
- files_sdk/models/file_comment_reaction.py +125 -0
- files_sdk/models/file_migration.py +69 -0
- files_sdk/models/file_migration_log.py +88 -0
- files_sdk/models/file_upload_part.py +54 -0
- files_sdk/models/folder.py +186 -0
- files_sdk/models/form_field.py +43 -0
- files_sdk/models/form_field_set.py +265 -0
- files_sdk/models/ftp_action_log.py +104 -0
- files_sdk/models/gpg_key.py +333 -0
- files_sdk/models/group.py +338 -0
- files_sdk/models/group_user.py +235 -0
- files_sdk/models/history.py +236 -0
- files_sdk/models/history_export.py +238 -0
- files_sdk/models/history_export_result.py +98 -0
- files_sdk/models/holiday_region.py +58 -0
- files_sdk/models/image.py +37 -0
- files_sdk/models/inbound_s3_log.py +95 -0
- files_sdk/models/inbox_recipient.py +124 -0
- files_sdk/models/inbox_registration.py +79 -0
- files_sdk/models/inbox_upload.py +80 -0
- files_sdk/models/invoice.py +91 -0
- files_sdk/models/invoice_line_item.py +51 -0
- files_sdk/models/ip_address.py +119 -0
- files_sdk/models/key_lifecycle_rule.py +243 -0
- files_sdk/models/lock.py +174 -0
- files_sdk/models/message.py +244 -0
- files_sdk/models/message_comment.py +223 -0
- files_sdk/models/message_comment_reaction.py +181 -0
- files_sdk/models/message_reaction.py +170 -0
- files_sdk/models/notification.py +451 -0
- files_sdk/models/outbound_connection_log.py +105 -0
- files_sdk/models/partner.py +307 -0
- files_sdk/models/payment.py +91 -0
- files_sdk/models/payment_line_item.py +42 -0
- files_sdk/models/permission.py +190 -0
- files_sdk/models/preview.py +40 -0
- files_sdk/models/priority.py +63 -0
- files_sdk/models/project.py +205 -0
- files_sdk/models/public_hosting_request_log.py +101 -0
- files_sdk/models/public_ip_address.py +42 -0
- files_sdk/models/public_key.py +269 -0
- files_sdk/models/remote_bandwidth_snapshot.py +91 -0
- files_sdk/models/remote_mount_backend.py +438 -0
- files_sdk/models/remote_server.py +1854 -0
- files_sdk/models/remote_server_configuration_file.py +73 -0
- files_sdk/models/remote_server_credential.py +855 -0
- files_sdk/models/request.py +184 -0
- files_sdk/models/restore.py +142 -0
- files_sdk/models/scim_log.py +88 -0
- files_sdk/models/session.py +100 -0
- files_sdk/models/settings_change.py +71 -0
- files_sdk/models/sftp_action_log.py +108 -0
- files_sdk/models/sftp_host_key.py +215 -0
- files_sdk/models/share_group.py +228 -0
- files_sdk/models/share_group_member.py +41 -0
- files_sdk/models/siem_http_destination.py +1074 -0
- files_sdk/models/site.py +1289 -0
- files_sdk/models/snapshot.py +255 -0
- files_sdk/models/sso_strategy.py +168 -0
- files_sdk/models/status.py +42 -0
- files_sdk/models/style.py +152 -0
- files_sdk/models/sync.py +588 -0
- files_sdk/models/sync_log.py +86 -0
- files_sdk/models/sync_run.py +124 -0
- files_sdk/models/usage_by_top_level_dir.py +41 -0
- files_sdk/models/usage_daily_snapshot.py +93 -0
- files_sdk/models/usage_snapshot.py +73 -0
- files_sdk/models/user.py +1232 -0
- files_sdk/models/user_cipher_use.py +91 -0
- files_sdk/models/user_lifecycle_rule.py +355 -0
- files_sdk/models/user_request.py +166 -0
- files_sdk/models/user_sftp_client_use.py +68 -0
- files_sdk/models/web_dav_action_log.py +104 -0
- files_sdk/models/webhook_test.py +116 -0
- files_sdk/models/workspace.py +202 -0
- files_sdk/path_util.py +42 -0
- files_sdk/util.py +34 -0
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import builtins # noqa: F401
|
|
2
|
+
from files_sdk.api import Api # noqa: F401
|
|
3
|
+
from files_sdk.error import ( # noqa: F401
|
|
4
|
+
InvalidParameterError,
|
|
5
|
+
MissingParameterError,
|
|
6
|
+
NotImplementedError,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class HistoryExport:
|
|
11
|
+
default_attributes = {
|
|
12
|
+
"id": None, # int64 - History Export ID
|
|
13
|
+
"history_version": None, # string - Version of the history for the export.
|
|
14
|
+
"start_at": None, # date-time - Start date/time of export range.
|
|
15
|
+
"end_at": None, # date-time - End date/time of export range.
|
|
16
|
+
"status": None, # string - Status of export. Will be: `building`, `ready`, or `failed`
|
|
17
|
+
"query_action": None, # 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`, `archived_delete`
|
|
18
|
+
"query_interface": None, # string - Filter results by this this interface type. Valid values: `web`, `ftp`, `robot`, `jsapi`, `webdesktopapi`, `sftp`, `dav`, `desktop`, `restapi`, `scim`, `office`, `mobile`, `as2`, `inbound_email`, `remote`, `inbound_s3`
|
|
19
|
+
"query_user_id": None, # string - Return results that are actions performed by the user indicated by this User ID
|
|
20
|
+
"query_file_id": None, # string - Return results that are file actions related to the file indicated by this File ID
|
|
21
|
+
"query_parent_id": None, # string - Return results that are file actions inside the parent folder specified by this folder ID
|
|
22
|
+
"query_path": None, # string - Return results that are file actions related to paths matching this pattern.
|
|
23
|
+
"query_folder": None, # string - Return results that are file actions related to files or folders inside folder paths matching this pattern.
|
|
24
|
+
"query_src": None, # string - Return results that are file moves originating from paths matching this pattern.
|
|
25
|
+
"query_destination": None, # string - Return results that are file moves with paths matching this pattern as destination.
|
|
26
|
+
"query_ip": None, # string - Filter results by this IP address.
|
|
27
|
+
"query_username": None, # string - Filter results by this username.
|
|
28
|
+
"query_failure_type": None, # 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`, `country_mismatch`, `insecure_ftp`, `insecure_cipher`, `rate_limited`
|
|
29
|
+
"query_target_id": None, # string - If searching for Histories about specific objects (such as Users, or API Keys), this parameter restricts results to objects that match this ID.
|
|
30
|
+
"query_target_name": None, # string - If searching for Histories about Users, Groups or other objects with names, this parameter restricts results to objects with this name/username.
|
|
31
|
+
"query_target_permission": None, # string - If searching for Histories about Permissions, this parameter restricts results to permissions of this level.
|
|
32
|
+
"query_target_user_id": None, # string - If searching for Histories about API keys, this parameter restricts results to API keys created by/for this user ID.
|
|
33
|
+
"query_target_username": None, # string - If searching for Histories about API keys, this parameter restricts results to API keys created by/for this username.
|
|
34
|
+
"query_target_platform": None, # string - If searching for Histories about API keys, this parameter restricts results to API keys associated with this platform.
|
|
35
|
+
"query_target_permission_set": None, # string - If searching for Histories about API keys, this parameter restricts results to API keys with this permission set.
|
|
36
|
+
"results_url": None, # string - If `status` is `ready`, this will be a URL where all the results can be downloaded at once as a CSV.
|
|
37
|
+
"user_id": None, # int64 - User ID. Provide a value of `0` to operate the current session's user.
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
def __init__(self, attributes=None, options=None):
|
|
41
|
+
if not isinstance(attributes, dict):
|
|
42
|
+
attributes = {}
|
|
43
|
+
if not isinstance(options, dict):
|
|
44
|
+
options = {}
|
|
45
|
+
self.set_attributes(attributes)
|
|
46
|
+
self.options = options
|
|
47
|
+
|
|
48
|
+
def set_attributes(self, attributes):
|
|
49
|
+
for (
|
|
50
|
+
attribute,
|
|
51
|
+
default_value,
|
|
52
|
+
) in HistoryExport.default_attributes.items():
|
|
53
|
+
setattr(self, attribute, attributes.get(attribute, default_value))
|
|
54
|
+
|
|
55
|
+
def get_attributes(self):
|
|
56
|
+
return {
|
|
57
|
+
k: getattr(self, k, None)
|
|
58
|
+
for k in HistoryExport.default_attributes
|
|
59
|
+
if getattr(self, k, None) is not None
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
def save(self):
|
|
63
|
+
if hasattr(self, "id") and self.id:
|
|
64
|
+
raise NotImplementedError(
|
|
65
|
+
"The HistoryExport object doesn't support updates."
|
|
66
|
+
)
|
|
67
|
+
else:
|
|
68
|
+
new_obj = create(self.get_attributes(), self.options)
|
|
69
|
+
self.set_attributes(new_obj.get_attributes())
|
|
70
|
+
return True
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
# Parameters:
|
|
74
|
+
# id (required) - int64 - History Export ID.
|
|
75
|
+
def find(id, params=None, options=None):
|
|
76
|
+
if not isinstance(params, dict):
|
|
77
|
+
params = {}
|
|
78
|
+
if not isinstance(options, dict):
|
|
79
|
+
options = {}
|
|
80
|
+
params["id"] = id
|
|
81
|
+
if "id" in params and not isinstance(params["id"], int):
|
|
82
|
+
raise InvalidParameterError("Bad parameter: id must be an int")
|
|
83
|
+
if "id" not in params:
|
|
84
|
+
raise MissingParameterError("Parameter missing: id")
|
|
85
|
+
response, options = Api.send_request(
|
|
86
|
+
"GET", "/history_exports/{id}".format(id=params["id"]), params, options
|
|
87
|
+
)
|
|
88
|
+
return HistoryExport(response.data, options)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def get(id, params=None, options=None):
|
|
92
|
+
find(id, params, options)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
# Parameters:
|
|
96
|
+
# user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
|
97
|
+
# start_at - string - Start date/time of export range.
|
|
98
|
+
# end_at - string - End date/time of export range.
|
|
99
|
+
# 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`, `archived_delete`
|
|
100
|
+
# query_interface - string - Filter results by this this interface type. Valid values: `web`, `ftp`, `robot`, `jsapi`, `webdesktopapi`, `sftp`, `dav`, `desktop`, `restapi`, `scim`, `office`, `mobile`, `as2`, `inbound_email`, `remote`, `inbound_s3`
|
|
101
|
+
# query_user_id - string - Return results that are actions performed by the user indicated by this User ID
|
|
102
|
+
# query_file_id - string - Return results that are file actions related to the file indicated by this File ID
|
|
103
|
+
# query_parent_id - string - Return results that are file actions inside the parent folder specified by this folder ID
|
|
104
|
+
# query_path - string - Return results that are file actions related to paths matching this pattern.
|
|
105
|
+
# query_folder - string - Return results that are file actions related to files or folders inside folder paths matching this pattern.
|
|
106
|
+
# query_src - string - Return results that are file moves originating from paths matching this pattern.
|
|
107
|
+
# query_destination - string - Return results that are file moves with paths matching this pattern as destination.
|
|
108
|
+
# query_ip - string - Filter results by this IP address.
|
|
109
|
+
# query_username - string - Filter results by this username.
|
|
110
|
+
# query_failure_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`, `country_mismatch`, `insecure_ftp`, `insecure_cipher`, `rate_limited`
|
|
111
|
+
# query_target_id - string - If searching for Histories about specific objects (such as Users, or API Keys), this parameter restricts results to objects that match this ID.
|
|
112
|
+
# 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.
|
|
113
|
+
# query_target_permission - string - If searching for Histories about Permissions, this parameter restricts results to permissions of this level.
|
|
114
|
+
# query_target_user_id - string - If searching for Histories about API keys, this parameter restricts results to API keys created by/for this user ID.
|
|
115
|
+
# query_target_username - string - If searching for Histories about API keys, this parameter restricts results to API keys created by/for this username.
|
|
116
|
+
# query_target_platform - string - If searching for Histories about API keys, this parameter restricts results to API keys associated with this platform.
|
|
117
|
+
# query_target_permission_set - string - If searching for Histories about API keys, this parameter restricts results to API keys with this permission set.
|
|
118
|
+
def create(params=None, options=None):
|
|
119
|
+
if not isinstance(params, dict):
|
|
120
|
+
params = {}
|
|
121
|
+
if not isinstance(options, dict):
|
|
122
|
+
options = {}
|
|
123
|
+
if "user_id" in params and not isinstance(params["user_id"], int):
|
|
124
|
+
raise InvalidParameterError("Bad parameter: user_id must be an int")
|
|
125
|
+
if "start_at" in params and not isinstance(params["start_at"], str):
|
|
126
|
+
raise InvalidParameterError("Bad parameter: start_at must be an str")
|
|
127
|
+
if "end_at" in params and not isinstance(params["end_at"], str):
|
|
128
|
+
raise InvalidParameterError("Bad parameter: end_at must be an str")
|
|
129
|
+
if "query_action" in params and not isinstance(
|
|
130
|
+
params["query_action"], str
|
|
131
|
+
):
|
|
132
|
+
raise InvalidParameterError(
|
|
133
|
+
"Bad parameter: query_action must be an str"
|
|
134
|
+
)
|
|
135
|
+
if "query_interface" in params and not isinstance(
|
|
136
|
+
params["query_interface"], str
|
|
137
|
+
):
|
|
138
|
+
raise InvalidParameterError(
|
|
139
|
+
"Bad parameter: query_interface must be an str"
|
|
140
|
+
)
|
|
141
|
+
if "query_user_id" in params and not isinstance(
|
|
142
|
+
params["query_user_id"], str
|
|
143
|
+
):
|
|
144
|
+
raise InvalidParameterError(
|
|
145
|
+
"Bad parameter: query_user_id must be an str"
|
|
146
|
+
)
|
|
147
|
+
if "query_file_id" in params and not isinstance(
|
|
148
|
+
params["query_file_id"], str
|
|
149
|
+
):
|
|
150
|
+
raise InvalidParameterError(
|
|
151
|
+
"Bad parameter: query_file_id must be an str"
|
|
152
|
+
)
|
|
153
|
+
if "query_parent_id" in params and not isinstance(
|
|
154
|
+
params["query_parent_id"], str
|
|
155
|
+
):
|
|
156
|
+
raise InvalidParameterError(
|
|
157
|
+
"Bad parameter: query_parent_id must be an str"
|
|
158
|
+
)
|
|
159
|
+
if "query_path" in params and not isinstance(params["query_path"], str):
|
|
160
|
+
raise InvalidParameterError("Bad parameter: query_path must be an str")
|
|
161
|
+
if "query_folder" in params and not isinstance(
|
|
162
|
+
params["query_folder"], str
|
|
163
|
+
):
|
|
164
|
+
raise InvalidParameterError(
|
|
165
|
+
"Bad parameter: query_folder must be an str"
|
|
166
|
+
)
|
|
167
|
+
if "query_src" in params and not isinstance(params["query_src"], str):
|
|
168
|
+
raise InvalidParameterError("Bad parameter: query_src must be an str")
|
|
169
|
+
if "query_destination" in params and not isinstance(
|
|
170
|
+
params["query_destination"], str
|
|
171
|
+
):
|
|
172
|
+
raise InvalidParameterError(
|
|
173
|
+
"Bad parameter: query_destination must be an str"
|
|
174
|
+
)
|
|
175
|
+
if "query_ip" in params and not isinstance(params["query_ip"], str):
|
|
176
|
+
raise InvalidParameterError("Bad parameter: query_ip must be an str")
|
|
177
|
+
if "query_username" in params and not isinstance(
|
|
178
|
+
params["query_username"], str
|
|
179
|
+
):
|
|
180
|
+
raise InvalidParameterError(
|
|
181
|
+
"Bad parameter: query_username must be an str"
|
|
182
|
+
)
|
|
183
|
+
if "query_failure_type" in params and not isinstance(
|
|
184
|
+
params["query_failure_type"], str
|
|
185
|
+
):
|
|
186
|
+
raise InvalidParameterError(
|
|
187
|
+
"Bad parameter: query_failure_type must be an str"
|
|
188
|
+
)
|
|
189
|
+
if "query_target_id" in params and not isinstance(
|
|
190
|
+
params["query_target_id"], str
|
|
191
|
+
):
|
|
192
|
+
raise InvalidParameterError(
|
|
193
|
+
"Bad parameter: query_target_id must be an str"
|
|
194
|
+
)
|
|
195
|
+
if "query_target_name" in params and not isinstance(
|
|
196
|
+
params["query_target_name"], str
|
|
197
|
+
):
|
|
198
|
+
raise InvalidParameterError(
|
|
199
|
+
"Bad parameter: query_target_name must be an str"
|
|
200
|
+
)
|
|
201
|
+
if "query_target_permission" in params and not isinstance(
|
|
202
|
+
params["query_target_permission"], str
|
|
203
|
+
):
|
|
204
|
+
raise InvalidParameterError(
|
|
205
|
+
"Bad parameter: query_target_permission must be an str"
|
|
206
|
+
)
|
|
207
|
+
if "query_target_user_id" in params and not isinstance(
|
|
208
|
+
params["query_target_user_id"], str
|
|
209
|
+
):
|
|
210
|
+
raise InvalidParameterError(
|
|
211
|
+
"Bad parameter: query_target_user_id must be an str"
|
|
212
|
+
)
|
|
213
|
+
if "query_target_username" in params and not isinstance(
|
|
214
|
+
params["query_target_username"], str
|
|
215
|
+
):
|
|
216
|
+
raise InvalidParameterError(
|
|
217
|
+
"Bad parameter: query_target_username must be an str"
|
|
218
|
+
)
|
|
219
|
+
if "query_target_platform" in params and not isinstance(
|
|
220
|
+
params["query_target_platform"], str
|
|
221
|
+
):
|
|
222
|
+
raise InvalidParameterError(
|
|
223
|
+
"Bad parameter: query_target_platform must be an str"
|
|
224
|
+
)
|
|
225
|
+
if "query_target_permission_set" in params and not isinstance(
|
|
226
|
+
params["query_target_permission_set"], str
|
|
227
|
+
):
|
|
228
|
+
raise InvalidParameterError(
|
|
229
|
+
"Bad parameter: query_target_permission_set must be an str"
|
|
230
|
+
)
|
|
231
|
+
response, options = Api.send_request(
|
|
232
|
+
"POST", "/history_exports", params, options
|
|
233
|
+
)
|
|
234
|
+
return HistoryExport(response.data, options)
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
def new(*args, **kwargs):
|
|
238
|
+
return HistoryExport(*args, **kwargs)
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import builtins # noqa: F401
|
|
2
|
+
from files_sdk.api import Api # noqa: F401
|
|
3
|
+
from files_sdk.list_obj import ListObj
|
|
4
|
+
from files_sdk.error import ( # noqa: F401
|
|
5
|
+
InvalidParameterError,
|
|
6
|
+
MissingParameterError,
|
|
7
|
+
NotImplementedError,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class HistoryExportResult:
|
|
12
|
+
default_attributes = {
|
|
13
|
+
"id": None, # int64 - Action ID
|
|
14
|
+
"created_at": None, # int64 - When the action happened
|
|
15
|
+
"created_at_iso8601": None, # string - When the action happened, in ISO8601 format.
|
|
16
|
+
"user_id": None, # int64 - User ID
|
|
17
|
+
"file_id": None, # int64 - File ID related to the action
|
|
18
|
+
"parent_id": None, # int64 - ID of the parent folder
|
|
19
|
+
"path": None, # string - Path of the related action. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
|
20
|
+
"folder": None, # string - Folder in which the action occurred
|
|
21
|
+
"src": None, # string - File move originated from this path
|
|
22
|
+
"destination": None, # string - File moved to this destination folder
|
|
23
|
+
"ip": None, # string - Client IP that performed the action
|
|
24
|
+
"username": None, # string - Username of the user that performed the action
|
|
25
|
+
"user_is_from_parent_site": None, # boolean - true if this change was performed by a user on a parent site.
|
|
26
|
+
"action": None, # string - What action was taken. 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`, `archived_delete`
|
|
27
|
+
"failure_type": None, # string - The type of login failure, if applicable. 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`, `country_mismatch`, `insecure_ftp`, `insecure_cipher`, `rate_limited`
|
|
28
|
+
"interface": None, # string - Interface through which the action was taken. Valid values: `web`, `ftp`, `robot`, `jsapi`, `webdesktopapi`, `sftp`, `dav`, `desktop`, `restapi`, `scim`, `office`, `mobile`, `as2`, `inbound_email`, `remote`, `inbound_s3`
|
|
29
|
+
"target_id": None, # int64 - ID of the object (such as Users, or API Keys) on which the action was taken
|
|
30
|
+
"target_name": None, # string - Name of the User, Group or other object with a name related to this action
|
|
31
|
+
"target_permission": None, # string - Permission level of the action
|
|
32
|
+
"target_recursive": None, # boolean - Whether or not the action was recursive
|
|
33
|
+
"target_expires_at": None, # int64 - If searching for Histories about API keys, this is when the API key will expire. Represented as a Unix timestamp.
|
|
34
|
+
"target_expires_at_iso8601": None, # string - If searching for Histories about API keys, this is when the API key will expire. Represented in ISO8601 format.
|
|
35
|
+
"target_permission_set": None, # string - If searching for Histories about API keys, this represents the permission set of the associated API key
|
|
36
|
+
"target_platform": None, # string - If searching for Histories about API keys, this is the platform on which the action was taken
|
|
37
|
+
"target_username": None, # string - If searching for Histories about API keys, this is the username on which the action was taken
|
|
38
|
+
"target_user_id": None, # int64 - If searching for Histories about API keys, this is the User ID on which the action was taken
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
def __init__(self, attributes=None, options=None):
|
|
42
|
+
if not isinstance(attributes, dict):
|
|
43
|
+
attributes = {}
|
|
44
|
+
if not isinstance(options, dict):
|
|
45
|
+
options = {}
|
|
46
|
+
self.set_attributes(attributes)
|
|
47
|
+
self.options = options
|
|
48
|
+
|
|
49
|
+
def set_attributes(self, attributes):
|
|
50
|
+
for (
|
|
51
|
+
attribute,
|
|
52
|
+
default_value,
|
|
53
|
+
) in HistoryExportResult.default_attributes.items():
|
|
54
|
+
setattr(self, attribute, attributes.get(attribute, default_value))
|
|
55
|
+
|
|
56
|
+
def get_attributes(self):
|
|
57
|
+
return {
|
|
58
|
+
k: getattr(self, k, None)
|
|
59
|
+
for k in HistoryExportResult.default_attributes
|
|
60
|
+
if getattr(self, k, None) is not None
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
# Parameters:
|
|
65
|
+
# user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
|
|
66
|
+
# cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
|
67
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
68
|
+
# history_export_id (required) - int64 - ID of the associated history export.
|
|
69
|
+
def list(params=None, options=None):
|
|
70
|
+
if not isinstance(params, dict):
|
|
71
|
+
params = {}
|
|
72
|
+
if not isinstance(options, dict):
|
|
73
|
+
options = {}
|
|
74
|
+
if "user_id" in params and not isinstance(params["user_id"], int):
|
|
75
|
+
raise InvalidParameterError("Bad parameter: user_id must be an int")
|
|
76
|
+
if "cursor" in params and not isinstance(params["cursor"], str):
|
|
77
|
+
raise InvalidParameterError("Bad parameter: cursor must be an str")
|
|
78
|
+
if "per_page" in params and not isinstance(params["per_page"], int):
|
|
79
|
+
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
80
|
+
if "history_export_id" in params and not isinstance(
|
|
81
|
+
params["history_export_id"], int
|
|
82
|
+
):
|
|
83
|
+
raise InvalidParameterError(
|
|
84
|
+
"Bad parameter: history_export_id must be an int"
|
|
85
|
+
)
|
|
86
|
+
if "history_export_id" not in params:
|
|
87
|
+
raise MissingParameterError("Parameter missing: history_export_id")
|
|
88
|
+
return ListObj(
|
|
89
|
+
HistoryExportResult, "GET", "/history_export_results", params, options
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def all(params=None, options=None):
|
|
94
|
+
list(params, options)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def new(*args, **kwargs):
|
|
98
|
+
return HistoryExportResult(*args, **kwargs)
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import builtins # noqa: F401
|
|
2
|
+
from files_sdk.api import Api # noqa: F401
|
|
3
|
+
from files_sdk.list_obj import ListObj
|
|
4
|
+
from files_sdk.error import ( # noqa: F401
|
|
5
|
+
InvalidParameterError,
|
|
6
|
+
MissingParameterError,
|
|
7
|
+
NotImplementedError,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class HolidayRegion:
|
|
12
|
+
default_attributes = {
|
|
13
|
+
"code": None, # string - The code representing a region
|
|
14
|
+
"name": None, # string - The name of the region
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
def __init__(self, attributes=None, options=None):
|
|
18
|
+
if not isinstance(attributes, dict):
|
|
19
|
+
attributes = {}
|
|
20
|
+
if not isinstance(options, dict):
|
|
21
|
+
options = {}
|
|
22
|
+
self.set_attributes(attributes)
|
|
23
|
+
self.options = options
|
|
24
|
+
|
|
25
|
+
def set_attributes(self, attributes):
|
|
26
|
+
for (
|
|
27
|
+
attribute,
|
|
28
|
+
default_value,
|
|
29
|
+
) in HolidayRegion.default_attributes.items():
|
|
30
|
+
setattr(self, attribute, attributes.get(attribute, default_value))
|
|
31
|
+
|
|
32
|
+
def get_attributes(self):
|
|
33
|
+
return {
|
|
34
|
+
k: getattr(self, k, None)
|
|
35
|
+
for k in HolidayRegion.default_attributes
|
|
36
|
+
if getattr(self, k, None) is not None
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
# Parameters:
|
|
41
|
+
# cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
|
42
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
43
|
+
def get_supported(params=None, options=None):
|
|
44
|
+
if not isinstance(params, dict):
|
|
45
|
+
params = {}
|
|
46
|
+
if not isinstance(options, dict):
|
|
47
|
+
options = {}
|
|
48
|
+
if "cursor" in params and not isinstance(params["cursor"], str):
|
|
49
|
+
raise InvalidParameterError("Bad parameter: cursor must be an str")
|
|
50
|
+
if "per_page" in params and not isinstance(params["per_page"], int):
|
|
51
|
+
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
52
|
+
return ListObj(
|
|
53
|
+
HolidayRegion, "GET", "/holiday_regions/supported", params, options
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def new(*args, **kwargs):
|
|
58
|
+
return HolidayRegion(*args, **kwargs)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import builtins # noqa: F401
|
|
2
|
+
from files_sdk.api import Api # noqa: F401
|
|
3
|
+
from files_sdk.error import ( # noqa: F401
|
|
4
|
+
InvalidParameterError,
|
|
5
|
+
MissingParameterError,
|
|
6
|
+
NotImplementedError,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Image:
|
|
11
|
+
default_attributes = {
|
|
12
|
+
"name": None, # string - Image name
|
|
13
|
+
"uri": None, # string - Image URI
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
def __init__(self, attributes=None, options=None):
|
|
17
|
+
if not isinstance(attributes, dict):
|
|
18
|
+
attributes = {}
|
|
19
|
+
if not isinstance(options, dict):
|
|
20
|
+
options = {}
|
|
21
|
+
self.set_attributes(attributes)
|
|
22
|
+
self.options = options
|
|
23
|
+
|
|
24
|
+
def set_attributes(self, attributes):
|
|
25
|
+
for attribute, default_value in Image.default_attributes.items():
|
|
26
|
+
setattr(self, attribute, attributes.get(attribute, default_value))
|
|
27
|
+
|
|
28
|
+
def get_attributes(self):
|
|
29
|
+
return {
|
|
30
|
+
k: getattr(self, k, None)
|
|
31
|
+
for k in Image.default_attributes
|
|
32
|
+
if getattr(self, k, None) is not None
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def new(*args, **kwargs):
|
|
37
|
+
return Image(*args, **kwargs)
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import builtins # noqa: F401
|
|
2
|
+
from files_sdk.api import Api # noqa: F401
|
|
3
|
+
from files_sdk.list_obj import ListObj
|
|
4
|
+
from files_sdk.error import ( # noqa: F401
|
|
5
|
+
InvalidParameterError,
|
|
6
|
+
MissingParameterError,
|
|
7
|
+
NotImplementedError,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class InboundS3Log:
|
|
12
|
+
default_attributes = {
|
|
13
|
+
"path": None, # string - Request Path. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
|
|
14
|
+
"client_ip": None, # string - Client IP
|
|
15
|
+
"operation": None, # string - S3 Operation Type
|
|
16
|
+
"status": None, # string - HTTP Status Code
|
|
17
|
+
"aws_access_key": None, # string - AWS Access Key ID
|
|
18
|
+
"error_message": None, # string - Error message, if applicable
|
|
19
|
+
"error_type": None, # string - Error type, if applicable
|
|
20
|
+
"duration_ms": None, # int64 - Duration (in milliseconds)
|
|
21
|
+
"request_id": None, # string - Request ID
|
|
22
|
+
"user_agent": None, # string - User Agent
|
|
23
|
+
"created_at": None, # date-time - Start Time of Request
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
def __init__(self, attributes=None, options=None):
|
|
27
|
+
if not isinstance(attributes, dict):
|
|
28
|
+
attributes = {}
|
|
29
|
+
if not isinstance(options, dict):
|
|
30
|
+
options = {}
|
|
31
|
+
self.set_attributes(attributes)
|
|
32
|
+
self.options = options
|
|
33
|
+
|
|
34
|
+
def set_attributes(self, attributes):
|
|
35
|
+
for (
|
|
36
|
+
attribute,
|
|
37
|
+
default_value,
|
|
38
|
+
) in InboundS3Log.default_attributes.items():
|
|
39
|
+
setattr(self, attribute, attributes.get(attribute, default_value))
|
|
40
|
+
|
|
41
|
+
def get_attributes(self):
|
|
42
|
+
return {
|
|
43
|
+
k: getattr(self, k, None)
|
|
44
|
+
for k in InboundS3Log.default_attributes
|
|
45
|
+
if getattr(self, k, None) is not None
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
# Parameters:
|
|
50
|
+
# cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
|
51
|
+
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
|
52
|
+
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `operation`, `status`, `path`, `client_ip` or `created_at`. Valid field combinations are `[ operation ]`, `[ status ]`, `[ path ]`, `[ client_ip ]`, `[ created_at ]`, `[ operation, status ]`, `[ operation, path ]`, `[ operation, client_ip ]`, `[ operation, created_at ]`, `[ status, path ]`, `[ status, client_ip ]`, `[ status, created_at ]`, `[ path, client_ip ]`, `[ path, created_at ]`, `[ client_ip, created_at ]`, `[ operation, status, path ]`, `[ operation, status, client_ip ]`, `[ operation, status, created_at ]`, `[ operation, path, client_ip ]`, `[ operation, path, created_at ]`, `[ operation, client_ip, created_at ]`, `[ status, path, client_ip ]`, `[ status, path, created_at ]`, `[ status, client_ip, created_at ]`, `[ path, client_ip, created_at ]`, `[ operation, status, path, client_ip ]`, `[ operation, status, path, created_at ]`, `[ operation, status, client_ip, created_at ]`, `[ operation, path, client_ip, created_at ]` or `[ status, path, client_ip, created_at ]`.
|
|
53
|
+
# filter_gt - object - If set, return records where the specified field is greater than the supplied value. Valid fields are `created_at`. Valid field combinations are `[ operation ]`, `[ status ]`, `[ path ]`, `[ client_ip ]`, `[ created_at ]`, `[ operation, status ]`, `[ operation, path ]`, `[ operation, client_ip ]`, `[ operation, created_at ]`, `[ status, path ]`, `[ status, client_ip ]`, `[ status, created_at ]`, `[ path, client_ip ]`, `[ path, created_at ]`, `[ client_ip, created_at ]`, `[ operation, status, path ]`, `[ operation, status, client_ip ]`, `[ operation, status, created_at ]`, `[ operation, path, client_ip ]`, `[ operation, path, created_at ]`, `[ operation, client_ip, created_at ]`, `[ status, path, client_ip ]`, `[ status, path, created_at ]`, `[ status, client_ip, created_at ]`, `[ path, client_ip, created_at ]`, `[ operation, status, path, client_ip ]`, `[ operation, status, path, created_at ]`, `[ operation, status, client_ip, created_at ]`, `[ operation, path, client_ip, created_at ]` or `[ status, path, client_ip, created_at ]`.
|
|
54
|
+
# filter_gteq - object - If set, return records where the specified field is greater than or equal the supplied value. Valid fields are `created_at`. Valid field combinations are `[ operation ]`, `[ status ]`, `[ path ]`, `[ client_ip ]`, `[ created_at ]`, `[ operation, status ]`, `[ operation, path ]`, `[ operation, client_ip ]`, `[ operation, created_at ]`, `[ status, path ]`, `[ status, client_ip ]`, `[ status, created_at ]`, `[ path, client_ip ]`, `[ path, created_at ]`, `[ client_ip, created_at ]`, `[ operation, status, path ]`, `[ operation, status, client_ip ]`, `[ operation, status, created_at ]`, `[ operation, path, client_ip ]`, `[ operation, path, created_at ]`, `[ operation, client_ip, created_at ]`, `[ status, path, client_ip ]`, `[ status, path, created_at ]`, `[ status, client_ip, created_at ]`, `[ path, client_ip, created_at ]`, `[ operation, status, path, client_ip ]`, `[ operation, status, path, created_at ]`, `[ operation, status, client_ip, created_at ]`, `[ operation, path, client_ip, created_at ]` or `[ status, path, client_ip, created_at ]`.
|
|
55
|
+
# filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `operation`, `status`, `path` or `client_ip`. Valid field combinations are `[ operation ]`, `[ status ]`, `[ path ]`, `[ client_ip ]`, `[ created_at ]`, `[ operation, status ]`, `[ operation, path ]`, `[ operation, client_ip ]`, `[ operation, created_at ]`, `[ status, path ]`, `[ status, client_ip ]`, `[ status, created_at ]`, `[ path, client_ip ]`, `[ path, created_at ]`, `[ client_ip, created_at ]`, `[ operation, status, path ]`, `[ operation, status, client_ip ]`, `[ operation, status, created_at ]`, `[ operation, path, client_ip ]`, `[ operation, path, created_at ]`, `[ operation, client_ip, created_at ]`, `[ status, path, client_ip ]`, `[ status, path, created_at ]`, `[ status, client_ip, created_at ]`, `[ path, client_ip, created_at ]`, `[ operation, status, path, client_ip ]`, `[ operation, status, path, created_at ]`, `[ operation, status, client_ip, created_at ]`, `[ operation, path, client_ip, created_at ]` or `[ status, path, client_ip, created_at ]`.
|
|
56
|
+
# filter_lt - object - If set, return records where the specified field is less than the supplied value. Valid fields are `created_at`. Valid field combinations are `[ operation ]`, `[ status ]`, `[ path ]`, `[ client_ip ]`, `[ created_at ]`, `[ operation, status ]`, `[ operation, path ]`, `[ operation, client_ip ]`, `[ operation, created_at ]`, `[ status, path ]`, `[ status, client_ip ]`, `[ status, created_at ]`, `[ path, client_ip ]`, `[ path, created_at ]`, `[ client_ip, created_at ]`, `[ operation, status, path ]`, `[ operation, status, client_ip ]`, `[ operation, status, created_at ]`, `[ operation, path, client_ip ]`, `[ operation, path, created_at ]`, `[ operation, client_ip, created_at ]`, `[ status, path, client_ip ]`, `[ status, path, created_at ]`, `[ status, client_ip, created_at ]`, `[ path, client_ip, created_at ]`, `[ operation, status, path, client_ip ]`, `[ operation, status, path, created_at ]`, `[ operation, status, client_ip, created_at ]`, `[ operation, path, client_ip, created_at ]` or `[ status, path, client_ip, created_at ]`.
|
|
57
|
+
# filter_lteq - object - If set, return records where the specified field is less than or equal the supplied value. Valid fields are `created_at`. Valid field combinations are `[ operation ]`, `[ status ]`, `[ path ]`, `[ client_ip ]`, `[ created_at ]`, `[ operation, status ]`, `[ operation, path ]`, `[ operation, client_ip ]`, `[ operation, created_at ]`, `[ status, path ]`, `[ status, client_ip ]`, `[ status, created_at ]`, `[ path, client_ip ]`, `[ path, created_at ]`, `[ client_ip, created_at ]`, `[ operation, status, path ]`, `[ operation, status, client_ip ]`, `[ operation, status, created_at ]`, `[ operation, path, client_ip ]`, `[ operation, path, created_at ]`, `[ operation, client_ip, created_at ]`, `[ status, path, client_ip ]`, `[ status, path, created_at ]`, `[ status, client_ip, created_at ]`, `[ path, client_ip, created_at ]`, `[ operation, status, path, client_ip ]`, `[ operation, status, path, created_at ]`, `[ operation, status, client_ip, created_at ]`, `[ operation, path, client_ip, created_at ]` or `[ status, path, client_ip, created_at ]`.
|
|
58
|
+
def list(params=None, options=None):
|
|
59
|
+
if not isinstance(params, dict):
|
|
60
|
+
params = {}
|
|
61
|
+
if not isinstance(options, dict):
|
|
62
|
+
options = {}
|
|
63
|
+
if "cursor" in params and not isinstance(params["cursor"], str):
|
|
64
|
+
raise InvalidParameterError("Bad parameter: cursor must be an str")
|
|
65
|
+
if "per_page" in params and not isinstance(params["per_page"], int):
|
|
66
|
+
raise InvalidParameterError("Bad parameter: per_page must be an int")
|
|
67
|
+
if "filter" in params and not isinstance(params["filter"], dict):
|
|
68
|
+
raise InvalidParameterError("Bad parameter: filter must be an dict")
|
|
69
|
+
if "filter_gt" in params and not isinstance(params["filter_gt"], dict):
|
|
70
|
+
raise InvalidParameterError("Bad parameter: filter_gt must be an dict")
|
|
71
|
+
if "filter_gteq" in params and not isinstance(params["filter_gteq"], dict):
|
|
72
|
+
raise InvalidParameterError(
|
|
73
|
+
"Bad parameter: filter_gteq must be an dict"
|
|
74
|
+
)
|
|
75
|
+
if "filter_prefix" in params and not isinstance(
|
|
76
|
+
params["filter_prefix"], dict
|
|
77
|
+
):
|
|
78
|
+
raise InvalidParameterError(
|
|
79
|
+
"Bad parameter: filter_prefix must be an dict"
|
|
80
|
+
)
|
|
81
|
+
if "filter_lt" in params and not isinstance(params["filter_lt"], dict):
|
|
82
|
+
raise InvalidParameterError("Bad parameter: filter_lt must be an dict")
|
|
83
|
+
if "filter_lteq" in params and not isinstance(params["filter_lteq"], dict):
|
|
84
|
+
raise InvalidParameterError(
|
|
85
|
+
"Bad parameter: filter_lteq must be an dict"
|
|
86
|
+
)
|
|
87
|
+
return ListObj(InboundS3Log, "GET", "/inbound_s3_logs", params, options)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def all(params=None, options=None):
|
|
91
|
+
list(params, options)
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
def new(*args, **kwargs):
|
|
95
|
+
return InboundS3Log(*args, **kwargs)
|