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":[]}'

Managing User Accounts

As an administrator, you can manage user accounts within your Files.com site using the CLI App.

List All User Accounts

files-cli users list

List Specific User Accounts

files-cli users list --ids="1111,2222,3333"

Create a User Account

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"

Update a User Account

files-cli users update --id=12345 --password="NewP@ssw0rd" --email="my_new_email@company.com"

Disable a User Account

files-cli users update --id=12345 --disabled=true

Enable a User Account

files-cli users update --id=12345 --disabled=false

Delete a User Account

files-cli users delete --id=12345

Managing Groups

As an administrator, you can manage the Groups within your Files.com site using the CLI App.

List All Groups

files-cli groups list

List Specific Groups

files-cli groups list --ids="1111,2222,3333"

Create a Group

files-cli groups create --name="External Partners" --notes="Some notes about this group."

Update a Group

files-cli groups update --id=1111 --name="Updated Group Name" --notes="Updated notes about this group."

Delete a Group

files-cli groups delete --id=1111

Add a User to a Group

files-cli group-users create --group-id=1111 --user-id=12345

Remove a User From a Group

files-cli group-users delete --id=1111 --group-id=1111 --user-id=12345

Managing GPG Keys

The GPG Keys within the GPG Key Manager can be managed using the CLI App.

List All GPG Keys

files-cli gpg-keys list

Import a GPG Key

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-----"

Update a GPG Key

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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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-----"

Delete a GPG Key

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.

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

©2024 Files.com. All right reserved

FILES.COM

  • Start My Free Trial
  • Pricing
  • Docs
  • API and SDKs
  • Contact

CONTACT & SUPPORT

support@files.com

(800) 286-8372

Monday–Friday

9am–8pm Eastern