module BrickFTP::Types
Constants
- Behavior
## The behavior object
@see developers.files.com/#the-behavior-object The behavior object
ATTRIBUTE | TYPE | DESCRIPTION ———- | ——– | ———– id | integer | Globally unique identifier of each behavior. path | string | Folder path for behaviors. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters. behavior | string | The behavior type. Can be one of the following: webhook, file_expiration, auto_encrypt, lock_subfolders. value | array | Array of values associated with the behavior.
- Bundle
The bundle object
@see developers.files.com/#the-bundle-object The bundle object
ATTRIBUTE | TYPE | DESCRIPTION ———- | ——– | ———– id | integer | Globally unique identifier of each bundle. code | string | Unique code string identifier for the bundle. url | string | Public sharing URL for the bundle. user_id | integer | ID of the user that created the bundle. created_at | datetime | Creation date of the bundle. paths | array | List of the paths associated with the bundle. password | string | Optional password to password-protect the bundle. This property is write-only. It cannot be retrieved via the API.
- BundleContent
An element of bundle contents
@see developers.files.com/#list-bundle-contents List bundle contents
ATTRIBUTE | TYPE | DESCRIPTION ——— | ——- | ———– path | string | undocumented type | string | undocumented size | integer | undocumented
- BundleZip
@see developers.files.com/#download-entire-bundle-as-zip Download entire bundle as ZIP
ATTRIBUTE | TYPE | DESCRIPTION ———— | ——– | ———– download_uri | string | undocumented
- File
The file/folder object
@see developers.files.com/#the-file-folder-object The file/folder object
ATTRIBUTE | TYPE | DESCRIPTION —————— | ——– | ———– id | integer | Globally unique identifier of each file. path | string | Full path of the file or folder. Maximum of 550 characters. display_name | string | Name of the file or folder without path. type | enum | Either `file` or `directory` (meaning folder). size | integer | Size of the file in bytes. Will be 0 for a folder. mtime | datetime | Date of the file/folder's last modification. provided_mtime | datetime | Client-provided date of the file/folder's last modification. crc32 | string | CRC32 for the file, if available. md5 | string | MD5 hash for the file, if available. region | string | The geographic region that a file is stored in. permissions | string | Your permissions on the file/folder. Will be one of the following:
`p` (list/preview only), `r` (read-only), `w` (write-only), `rw` (read/write), `rwd` (read/write/delete). download_uri | string | URL to download the file, if requested. subfolders_locked? | integer | A value of `1` indicates that the Lock-subfolders setting is enabled on a folder.- FileInBundle
@see developers.files.com/#download-one-file-in-a-bundle Download one file in a bundle
ATTRIBUTE | TYPE | DESCRIPTION ———— | ——– | ———– path | string | undocumented type | string | undocumented size | integer | undocumented download_uri | string | undocumented
- FolderContentsCount
@see developers.files.com/#count-folder-contents-recursively Count folder contents recursively @see developers.files.com/#count-folder-contents-non-recursively Count folder contents non-recursively
ATTRIBUTE | TYPE | DESCRIPTION ———- | ——- | ———– total | integer | undocumented files | integer | undocumented folders | integer | undocumented
- Group
The group object
@see developers.files.com/#the-group-object The group object
ATTRIBUTE | TYPE | DESCRIPTION ——— | ———————— | ———– id | integer | Globally unique identifier of each group. Each group is given an ID automatically upon creation. name | string | Name of the group. This is how the group will be displayed on the site. Maximum of 50 characters. notes | text | You may use this property to store any additional information you require. There are no restrictions on its formatting. user_ids | comma-separated integers | IDs of the users that are in this group. usernames | string | Usernames of the users that are in this group. admin_ids | comma-separated integers | IDs of the users that are in this group and are administrators of this group.
- GroupMembership
membership object
@see developers.files.com/#add-a-member membership object
ATTRIBUTE | TYPE | DESCRIPTION ——— | ——- | ———– id | integer | Globally unique identifier for the membership. group_id | integer | ID of the group the membership is associated with. user_id | integer | ID of the user the membership is associated with. admin | boolean | Indicates whether the user is an administrator of the group.
- History
The notification object
@see developers.files.com/#the-notification-object The notification object
ATTRIBUTE | TYPE | DESCRIPTION ————- | ——– | ———– id | integer | Globally unique identifier of each history entry. when | datetime | Date of the history entry. user_id | integer | ID of the user associated with the history entry. username | string | Username of the user associated with the history entry. action | string | Type of action that occurred. Will be one of the following:
`create`, `read`, `update`, `destroy`, `move`, `login`, `failedlogin`, `copy`, `user_create`, `user_destroy`, `group_create`, `group_destroy`, `permission_create`, `permission_destroy`. failure_type | string | Type of failure that occurred, if any. path | string | Path of the file or folder associated with the history entry. source | string | Source path associated with the history entry. destination | string | Destination path associated with the history entry. targets | object | Object containing the target object(s) for `user_create`, `user_destroy`, `group_create`, `group_destroy`, `permission_create`, and `permission_destroy` actions.
A `user` target will include an `id` and `username`. A `group` target will include an `id` and `name`. A `permission` target will include an `id`, `permission`, and a `recursive` parameter. ip | string | IP address associated with the history entry. interface | string | Interface associated with the history entry. Will be one of the following: web, ftp, robot, jsapi, restapi, sftp, dav.- Notification
The notification object
@see developers.files.com/#the-notification-object The notification object
ATTRIBUTE | TYPE | DESCRIPTION ————- | ——- | ———– id | integer | Globally unique identifier of each notification. Each notification is given an ID automatically upon creation. path | string | Folder path for notifications. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters. user_id | integer | Unique identifier for the user being notified. Each user is given an ID automatically upon creation. You can look up user IDs by using the
User
resource of this REST API. username | string | Username for the user given by user_id. If this value is set during creation and user_id is not set, the user_id is looked up from the username and set. Maximum of 50 characters. send_interval | string | The send interval for notifications. Can be one of the following: five_minutes (default), fifteen_minutes, hourly, daily. unsubscribed | boolean | If true, the user has unsubscribed from receiving this notification. This property is read-only.- Permission
The permission object
@see developers.files.com/#the-permission-object The permission object
ATTRIBUTE | TYPE | DESCRIPTION ———- | ——- | ———– id | integer | Globally unique identifier of each permission. Each permission is given an ID automatically upon creation. user_id | integer | Unique identifier for the user being granted a permission. Each user is given an ID automatically upon creation. The user_id and group_id fields cannot both be set. username | string | Username for the user, if user_id is set. If this value is set during creation and user_id is not set, the user_id is looked up from the username and set. Maximum of 50 characters. group_id | integer | Unique identifier for the group being granted a permission. Each group is given an ID automatically upon creation. The user_id and group_id fields cannot both be set. group_name | string | Name of the group, if group_id is set. This property is read-only. path | string | Folder path for the permission to apply to. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters. permission | enum | Value must be set to full, readonly, writeonly, previewonly, or history, depending on the type of access to be granted by the
Permission
. recursive | boolean | If set to false, the permission will be non-recursive, and will not apply to subfolders of the folder specified by the path property. Default is true.- SiteUsage
- Upload
The upload object
@see developers.files.com/#the-upload-object The upload object
ATTRIBUTE | TYPE | DESCRIPTION ——————– | ————— | ———– ref | string | Unique identifier to reference this file upload. This identifier is needed for subsequent requests to the REST API to complete the upload or request more upload URLs. http_method | string | Value is PUT or POST, and is the HTTP method used when uploading the file to S3 at the upload_uri. upload_uri | string | The URL where the file is uploaded to. partsize | integer | Recommended size of upload. When uploading file pieces, the piece sizes are required to be between 5 MB and 5 GB (except the last part). This value provides a recommended size to upload for this part without adding another part. part_number | integer | Number of this part, which is always between 1 and 10,000, and will always be 1 for the first upload URL at the beginning of uploading a new file. available_parts | integer | Number of parts available for this upload. For new file uploads this value is always 10,000, but it may be smaller for other uploads. When requesting more upload URLs from the REST API, the part numbers must be between 1 and this number. headers | key-value pairs | A list of required headers and their exact values to send in the file upload. It may be empty if no headers with fixed values are required. parameters | key-value pairs | A list of required parameters and their exact values to send in the file upload. If any values are in this array, it is implied that the upload request is formatted appropriately to send form data parameters. It will always be empty if the body of the request is specified to be where the file upload data goes (see send below). send | key-value pairs | This is an array of values to be sent in the file upload request. Possible sub-values are partsize, partdata, file, and Content-Type:
`file`: where to put the file data for the entire file upload
`partdata`: where to put the file data for this part
`partsize`: where to put the size of the upload for this file part
`Content-Type`: where to put the Content-Type of the file (which can have no bearing on the file's actual type)
Possible values for these parameters:
`body`: this information is the body of the PUT or POST request
`required-header <header name>`: this information goes in the named header
`required-parameter <parameter name>`: this information goes in the named parameter, and implies this request is formatted appropriately to send form data parameters path | string | Intended destination path of the file upload. Path may change upon finalization, depending on existance of another upload to the same location and the site's overwrite setting. action | string | Value is always write or put for this action. ask_about_overwrites | boolean | If true, a file by this name already exists and will be overwritten when this upload completes if it continues.- User
The user object
@see developers.files.com/#the-user-object The user object
ATTRIBUTE | TYPE | DESCRIPTION ———————– | ———————— | ———– id | integer | Globally unique identifier of each user. Each user is given an ID automatically upon creation. username | string | Username for the user. This is how the user will be displayed on the site. Maximum of 50 characters. authentication_method | enum | Authentication method for this user. Can be one of the following: password, ldap, or oauth_google. Default is password. last_login_at | datetime | The date and time of the most recent login for this user. This property is read-only. password | string | Password for the user. This property is write-only. It cannot be retrieved via the API. password_confirmation | string | Confirms the new password provided in the password field. This field is optional but will be validated if provided. authenticate_until | datetime | If set, the user will be blocked from logging in after this date. name | string | Real name of the user. For your reference. Maximum of 50 characters. email | string | E-Mail address of the user. Maximum of 50 characters. notes | text | You may use this property to store any additional information you require. There are no restrictions on its formatting. group_ids | comma-separated integers | IDs of the Groups that this user is in. ftp_permission | boolean | Allow user access via FTP/FTPS (port 21 or 990) interface. Default is true. sftp_permission | boolean | Allow user access via SFTP (port 22) interface. Default is true. dav_permission | boolean | Allow user access via WebDAV (port 443) interface. Default is true. restapi_permission | boolean | Allow user access the REST API, via HTTP/HTTPS (port 80 or 443), and the desktop application. Default is true. attachments_permission | boolean | Allow user to use Sharing tab in web interface to share files with anonymous users via a unique URL. Default is false. self_managed | boolean | Allow user to change their password and user information via the web interface. Default is true. require_password_change | boolean | Require user to change their password at their next login. Note: requires restapi_permission to be true, as password changes can only occur via the web interface. Default is false. allowed_ips | text | List allowed IPs, one per line. You may specify a range in CIDR format, such as 192.168.1.0/27. Leave blank to allow all IPs. If you are also restricting IP addresses on the Site tab, users matching in either place will be allowed to log in. user_root | string | Folder to show as the root when this user logs in via the FTP interface. Make sure this folder exists, as it will not be automatically created. Does not apply to the web interface! This should not contain a leading slash, but must contain a trailing slash. Example: Users/jenny/. Limit of 250 characters. time_zone | string |
File
modification times will be displayed in this time zone. Default is Eastern Time (US & Canada). language | string | The language thatBrickFTP
will be displayed in, if the translation is available. Leave as default (null) to auto-detect or use the site setting. grant_permission | enum | Value must be set to full, read, write, preview, read+write, or preview+write. The user will be granted that permission on their FTP root folder as defined by the user_root. This property is write-only. It cannot be retrieved via theUser
resource of the REST API, though may be obtained with the Permissions resource of the REST API. ssl_required | enum | Whether or not SSL encryption is required on all connections for this user. Can be one of the following: use_system_setting, always_require, or never_require. Default is use_system_setting. site_admin | boolean | If set to true, this user will be treated as a site-wide administrator. Default is false. receive_admin_alerts | boolean | Enable this user to receive alerts sent to site administrators. This property will only be accepted/returned if site_admin is true. Default is false. subscribe_to_newsletter | boolean | Add this user to theBrickFTP
newsletter and our mailing list for notices about product updates. This property will only be accepted/returned if site_admin is true. Default is false. can_create_new_users | boolean | If true, this user will be able to create other users within groups where they have administrator privileges. Default is false. last_protocol_cipher | string | The encryption protocol (for HTTPS or FTPS) or ciphers (for SFTP) that this user last connected with. This property is read-only. lockout_expires | datetime | If the user has been locked out by Brute Force Login Protection, this will indicate when the lock expires. Otherwise this will be null. This property is read-only. admin_group_ids | comma-separated integers | IDs of the Groups that this user is an administrator of.- UserAPIKey
The API key object
@see developers.files.com/#the-api-key-object The API key object
ATTRIBUTE | TYPE | DESCRIPTION ————– | ——– | ———– id | integer | Globally unique identifier of each user API key. Each user API key is given an ID automatically upon creation. key | string | The API key itself. This property is read-only. name | string | Name to identify the user API key. For your reference. Maximum of 100 characters. permission_set | string | The permission set for the user API key. Can be desktop_app or full. platform | string | The platform for the user API key. Can be win32, macos, linux, or none. Applies only to API keys with a permission_set of desktop_app. expires_at | datetime | The date that this API key is valid through. created_at | datetime | Creation date of the user API key. This property is read-only.
- UserPublicKey
The public key object
@see developers.files.com/#the-public-key-object The public key object
ATTRIBUTE | TYPE | DESCRIPTION ———– | ——– | ———– id | integer | Globally unique identifier of each public key. Each public key is given an ID automatically upon creation. title | string | Title to identify the public key. For your reference. Maximum of 50 characters. fingerprint | string | RSA fingerprint of the public key. This property is read-only. public_key | string | The public key itself. This property is write-only. It cannot be retrieved via the API. created_at | datetime | Creation date of the public key. This property is read-only.