Using the CLI to Perform Administrator Actions
If you have administrator privileges for your Files.com account, you can use the CLI App to perform administrator actions.
For example, you can create a user account with this command:
files-cli users create --username="amy" --password="S0meRea11yLongP@ssw0rd" --authentication-method="password" --name="Amy Anybody" --company="Amy’s Company Name" --notes="Some notes about Amy." --user-root="/users/amy"
You can also configure various items, such as Folder Settings, using the CLI App.
For example, you can configure automatic new user folders using the following command:
files-cli behaviors create --path="/path/to/folder" --behavior="create_user_folders" --value='{ "permission":"full", "additional_permission":"bundle", "existing_users":false, "group_id":1, "new_folder_name":"username", "subfolders":[]}'
As an administrator, you can manage user accounts within your Files.com site using the CLI App.
files-cli users list
files-cli users list --ids="1111,2222,3333"
files-cli users create --username="amy" --password="S0meRea11yLongP@ssw0rd" --authentication-method="password" --name="Amy Anybody" --company="Amy’s Company Name" --notes="Some notes about Amy." --user-root="/users/amy"
files-cli users update --id=12345 --password="NewP@ssw0rd" --email="my_new_email@company.com"
Indicate the hour of the day, from 0
to 23
, when notifications should be sent (in the user's timezone).
files-cli users update --id=12345 --notification-daily-send-time=16
files-cli users update --id=12345 --disabled=true
files-cli users update --id=12345 --disabled=false
files-cli users delete --id=12345
As an administrator, you can manage the Groups within your Files.com site using the CLI App.
files-cli groups list
files-cli groups list --ids="1111,2222,3333"
files-cli groups create --name="External Partners" --notes="Some notes about this group."
files-cli groups update --id=1111 --name="Updated Group Name" --notes="Updated notes about this group."
files-cli groups delete --id=1111
files-cli group-users create --group-id=1111 --user-id=12345
files-cli group-users delete --id=1111 --group-id=1111 --user-id=12345
Notifications for both users and groups can be managed using the CLI app
You can use either the username or the ID to create a new notification for a user
files-cli notifications create "path/to/Folder" --username="my_username"
files-cli notifications create "path/to/Folder" --user_id=12345
files-cli notifications create "path/to/Folder" --group_id=1111
files-cli notifications delete --id=2222
The GPG Keys within the GPG Key Manager can be managed using the CLI App.
files-cli gpg-keys list
files-cli gpg-keys create --user-id=12345 --name="MY FULL KEY NAME" --public-key="PUBLIC_KEY_TEXT" --private-key="PRIVATE_KEY_TEXT" --private-key-password="PASSWORD"
When using the CLI with a user session (your username and password), or an API Key that belongs to a user, you can specify 0
(zero) for the --user-id
option and it will automatically determine the user id of your username.
When using the CLI with a site-wide API Key, you must enter a valid user id. You can find a user id by using the files-cli users list
command.
Here is an example of importing a Public Key:
files-cli gpg-keys create --user-id=521581 --name="Acme Corp. Public Key" --public-key="-----BEGIN PGP PUBLIC KEY BLOCK-----
mQENBGUA5egBCADJCOH3Jng1QTHI+7ETosi80BwPh+p7AC+id7l1ibximJYzwlOW
wuR7+xgr0474MYOKvKTI3iLCPDEWonY4IV8rUhiww/n4mzdobqz+bOU1cZM657vm
xoINa+VpB00NOTYKHHqnkoKUJpBNzS7SjliQ8j07rcEsJaaijuaa7a6LqXR8vJPZ
8f+c6mHmMYosoG45IcBElY9oKApKMARm9ZZ3hRe5Squ3FtuXA9PrBaQwHU+JFS4c
1iqZZeUHKi258xZ4dHrZN4p//eQgCnSY7lumwnfvO6Hm2UgSG+eRosbe+7fRc7+Z
91TaDZr0ced9SpIvb26jYVnHcEaVFpa3p2GjABEBAAG0U0FjbWUgQ29ycC4gKFRo
aXMgaXMgZm9yIEZpbGVzLmNvbSBkZW1vbnN0cmF0aW9uIHB1cnBvc2VzIG9ubHku
KSA8YWNtZUBtb29ubGlmZS5jb20+iQFOBBMBCAA4FiEEi3/UZ0g0e0uZ0ioqNiIQ
h29xRo0FAmUA5egCGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQNiIQh29x
Ro3LIgf+PUCaMnVSFuJ0vdC6HjgIuJ27ThEd2NhoqAhy6Y5TrtOoz5IWDwqcQwiM
5a1vbt14hOfgXz73TvEvN5djsrwkVHsjzpdGslezRGsq3fkC2+RkuVmKPzrmdvba
HqOp2FNQU5y4W99wWBnudqD1HlzY7BfADsHZ1L4MY0Ehf4E5ZZFqfpn07egLlH8v
JwZUL2hsyS8yKPmr9y0lp8goiqBdm74pHCyFtrPXSOsVYqpiUQ9jeNYju8KLBcsT
sG13akn9j+x7e8RMQjAogtdURBz2Q69SqcvW2vJ+y9gBRoFNzttwSrslJW0Z5tUn
aVgkknP0m6OBFffZcMUUUyb721OIHLkBDQRlAOXoAQgAy3QhrwaSaWC3nE2dAcwJ
0PxZLK0B2OUe8DZ/XlgcJblUaIbQDSLpTockQYlqJFV6ho5RCueUT42/HIsVfpnN
4dOYYUDXtSBw6xDgYGWHcJ/Au0f06qPUQY84zfMydBm5f6bY2Y9L1q4OISp85ekp
pGGSSDWqE4PanICmMTZV/kaqIhgwoRwOpKdDVW4upJIKSP9/rBCnxtArDf3OIkT/
Jf97+/4Fvt6fQtIRhzuiTdBglmiKZLNhvu3b/47cTtkuNwe/6viMcyh45PmlKFMP
mngMoZ9qO0BkqfytdO1XcnPfpJhyFYpljYyq9g2LIW5JlnXqIwddKo7txgb+XNEQ
owARAQABiQE2BBgBCAAgFiEEi3/UZ0g0e0uZ0ioqNiIQh29xRo0FAmUA5egCGwwA
CgkQNiIQh29xRo09wwf/SpM/g/gsAhgr4nWVXP2q6IaKy/iaX/BARkpDRgbptO9/
pBWmt/R8p8TxWD1itKR+gVO1TCQXig1gwyhr3cVWvM5+1ezTi1R08wcczyaXpItp
GjouWcS/z5Awr/XePpO7GIsfGE+HspsmXFDwOAIiKsmqGHF/NDwascxKhHsrhlSt
CZi9iI0LR6V9waAGomJ7qsd9kG6BrLPZFLXsFcLF3STrZSZqAhMRO0CAxanIt0JA
mq92THGN42lnu/HM7J15Z/FxAqE/srarMy3Qpfb54YHQHzVeI9hIoW+qRMFzqHJx
sTR7e//Sqk6HH+xzklRi/gYQz4KBLp7A9iVo9CZ3Vg==
=1DlG
-----END PGP PUBLIC KEY BLOCK-----"
files-cli gpg-keys update --id=1 --name="MY FULL KEY NAME" --public-key="PUBLIC_KEY_TEXT" --private-key="PRIVATE_KEY_TEXT" --private-key-password="PASSWORD"
Replace the --id
value with the id that corresponds to the stored key that you wish to update.
You can find a stored key's id by using the files-cli gpg-keys list
command.
Here is an example of updating a Public Key:
files-cli gpg-keys update --id=4 --name="Acme Corp. Updated Public Key" --public-key="-----BEGIN PGP PUBLIC KEY BLOCK-----
mQENBGUA5egBCADJCOH3Jng1QTHI+7ETosi80BwPh+p7AC+id7l1ibximJYzwlOW
wuR7+xgr0474MYOKvKTI3iLCPDEWonY4IV8rUhiww/n4mzdobqz+bOU1cZM657vm
xoINa+VpB00NOTYKHHqnkoKUJpBNzS7SjliQ8j07rcEsJaaijuaa7a6LqXR8vJPZ
8f+c6mHmMYosoG45IcBElY9oKApKMARm9ZZ3hRe5Squ3FtuXA9PrBaQwHU+JFS4c
1iqZZeUHKi258xZ4dHrZN4p//eQgCnSY7lumwnfvO6Hm2UgSG+eRosbe+7fRc7+Z
91TaDZr0ced9SpIvb26jYVnHcEaVFpa3p2GjABEBAAG0U0FjbWUgQ29ycC4gKFRo
aXMgaXMgZm9yIEZpbGVzLmNvbSBkZW1vbnN0cmF0aW9uIHB1cnBvc2VzIG9ubHku
KSA8YWNtZUBtb29ubGlmZS5jb20+iQFOBBMBCAA4FiEEi3/UZ0g0e0uZ0ioqNiIQ
h29xRo0FAmUA5egCGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQNiIQh29x
Ro3LIgf+PUCaMnVSFuJ0vdC6HjgIuJ27ThEd2NhoqAhy6Y5TrtOoz5IWDwqcQwiM
5a1vbt14hOfgXz73TvEvN5djsrwkVHsjzpdGslezRGsq3fkC2+RkuVmKPzrmdvba
HqOp2FNQU5y4W99wWBnudqD1HlzY7BfADsHZ1L4MY0Ehf4E5ZZFqfpn07egLlH8v
JwZUL2hsyS8yKPmr9y0lp8goiqBdm74pHCyFtrPXSOsVYqpiUQ9jeNYju8KLBcsT
sG13akn9j+x7e8RMQjAogtdURBz2Q69SqcvW2vJ+y9gBRoFNzttwSrslJW0Z5tUn
aVgkknP0m6OBFffZcMUUUyb721OIHLkBDQRlAOXoAQgAy3QhrwaSaWC3nE2dAcwJ
0PxZLK0B2OUe8DZ/XlgcJblUaIbQDSLpTockQYlqJFV6ho5RCueUT42/HIsVfpnN
4dOYYUDXtSBw6xDgYGWHcJ/Au0f06qPUQY84zfMydBm5f6bY2Y9L1q4OISp85ekp
pGGSSDWqE4PanICmMTZV/kaqIhgwoRwOpKdDVW4upJIKSP9/rBCnxtArDf3OIkT/
Jf97+/4Fvt6fQtIRhzuiTdBglmiKZLNhvu3b/47cTtkuNwe/6viMcyh45PmlKFMP
mngMoZ9qO0BkqfytdO1XcnPfpJhyFYpljYyq9g2LIW5JlnXqIwddKo7txgb+XNEQ
owARAQABiQE2BBgBCAAgFiEEi3/UZ0g0e0uZ0ioqNiIQh29xRo0FAmUA5egCGwwA
CgkQNiIQh29xRo09wwf/SpM/g/gsAhgr4nWVXP2q6IaKy/iaX/BARkpDRgbptO9/
pBWmt/R8p8TxWD1itKR+gVO1TCQXig1gwyhr3cVWvM5+1ezTi1R08wcczyaXpItp
GjouWcS/z5Awr/XePpO7GIsfGE+HspsmXFDwOAIiKsmqGHF/NDwascxKhHsrhlSt
CZi9iI0LR6V9waAGomJ7qsd9kG6BrLPZFLXsFcLF3STrZSZqAhMRO0CAxanIt0JA
mq92THGN42lnu/HM7J15Z/FxAqE/srarMy3Qpfb54YHQHzVeI9hIoW+qRMFzqHJx
sTR7e//Sqk6HH+xzklRi/gYQz4KBLp7A9iVo9CZ3Vg==
=1DlG
-----END PGP PUBLIC KEY BLOCK-----"
Keys that are in use for encryption or decryption cannot be deleted. Remove the key from use prior to attempting to delete it.
files-cli gpg-keys delete --id=1
Replace the --id
value with the id that corresponds to the stored key that you wish to update.
You can find a stored key's id by using the files-cli gpg-keys list
command.
Snapshots provide site administrators a way to create convenient backups of data from any portion of their site.
Snapshots can accept multiple paths, so you can repeat the paths flag for each path after the first. Specifying a folder for the path will include the contents of the folder.
files-cli snapshots create --paths="path1" --expires_at="2023-11-02T11:59:00-04:00" --name="reason for snapshot"
To add more paths to a snapshot after it has been created, but before it has been finalized, you can use the --paths flag when updating the snapshot. You don't need to repeat any paths that were already added to the snapshot.
files-cli snapshots update --id=23452 --name="new name" --paths="another/path"
Finalizing a snapshot will make the contents of the snapshot read-only, so you can no longer add new paths or remove items from the snapshot's directory.
files-cli snapshots finalize --id=23452
Deleting a snapshot will immediately remove the files stored in the snapshot. You cannot un-delete a deleted snapshot.
files-cli snapshots delete --id=23452
Get Instant Access to Files.com
The button below will take you to our Free Trial signup page. Click on the white "Start My Free Trial" button, then fill out the short form on the next page. Your account will be activated instantly. You can dive in and start yourself or let us help. The choice is yours.
Start My Free Trial