User Admin API
Available Attributes
The following attributes are available when you're accessing a user:
id # String. The users unique ID. email # String. The users email address. name # String. The users name. group # String. The users group ID. max_file_size # Integer. The max file size the user can send with. filedrop # String. The users random Filedrop URL if enabled. "disabled" if not. filedrop_email # String. The users email Filedrop URL if enabled. "disabled" if not. api_key # String. The users api key if enabled. "disabled" if not. ldap_authentication # Boolean. True if the user is authenticated with LDAP. locale # String. The users locale if set. time_zone # String. The users time zone if set. strong_auth_type # String. Possible values: no value/blank: Inherit settings from the Users Group disabled: Don't require strong authentication duo: Require DUO strong authentication otp_enable: Permit the User to use OTP Two Factor Authentication otp_require: Require the User to use OTP Two Factor Authentication strong_auth_username # String. The users Duo auth username if different from the email address. last_login_at # Datetime The date and time when the user last logged in. last_login_ip # String. The ip address the user last used to login with. created_at # Datetime The date and time when the user was created.
List Users
Request
Request URL: /admin/users
Request VERB: GET
As a response, you will get an array of users with the attributes as listed in the available attributes section above.
Example using curl:
curl -s -X GET --user "37DeYIkmDoQcsl3eEl2lE2:x" -H "Accept: application/json" -H "Content-Type: application/json" https://liquidfiles.company.com/admin/users [ {"user": { "id": "admin-company-com", "email": "admin@company.com", "name": "Admin User", "group": "sysadmins", "max_file_size": 0, "filedrop": "https://liquidfiles.company.com/filedrop/~4fggiU", "filedrop_email": "https://liquidfiles.company.com/filedrop/admin@company.com", "api_key": "37DeYIkmDoQcsl3eEl2lE2", "ldap_authentication": "false", "locale": "", "time_zone": "", "strong_auth_type": "disabled", "strong_auth_username": "", "last_login_at": "2014-09-01 03:27:40 UTC", "last_login_ip": "127.0.0.1", "created_at": "2013-11-11 02:15:44 UTC" } }, {"user": { "id": "user1-company.com", "email": "user1@company.com", "name": "User 1", "group": "local-users", "max_file_size": 1000, "filedrop": "disabled", "filedrop_email": "disabled", "api_key": "disabled", "ldap_authentication": "false", "locale": "", "time_zone": "", "strong_auth_type": "", "strong_auth_username": "", "last_login_at": "2014-06-20 04:58:28 UTC", "last_login_ip": "127.0.0.1", "created_at": "2014-02-18 05:37:30 UTC" } } ]
View User
To view an individual user, please use the following Request:
Request
Request URL: /admin/users/_the_users_ID_
Request VERB: GET
Example using curl:
curl -s -X GET --user "37DeYIkmDoQcsl3eEl2lE2:x" -H "Accept: application/json" -H "Content-Type: application/json" https://liquidfiles.company.com/admin/users/user1-company.com {"user": { "id": "user1-company-com", "email": "user1@company.com", "name": "User 1", "group": "local-users", "max_file_size": 0, "filedrop": "https://liquidfiles.company.com/filedrop/~sX9oZU", "filedrop_email": "https://liquidfiles.company.com/filedrop/user1@company.com", "api_key": "disabled", "ldap_authentication": "false", "locale": "", "time_zone": "", "strong_auth_type": "", "strong_auth_username": "", "last_login_at": "", "last_login_ip": "", "created_at": "2014-09-01 03:54:10 UTC" } }
Create User
Request
Request URL: /admin/users Request VERB: POST Parameters: user: email # String. The users email address (needs to be unique). name # String. The name of the user. password # String. (optional) The password for the user (not used if # authenticated with LDAP). group # String. (optional) The ID of the group to add the users to # (ex: "local-users"). # If omitted the user will be added to the group in # accordance with the configuration in Admin → Groups. max_file_size # Integer. (optional) The maximum file size for this user. ldap_authentication # Boolean. (optional) Set to True if the user is authenticated with # LDAP. strong_auth_type # String. (optional) Possible values: # no value/blank: Inherit settings from the Users Group # disabled: Don't require strong authentication # duo: Require DUO strong authentication # otp_enable: Permit the User to use OTP Two Factor Auth # otp_require: Require the User to use OTP Two Factor Auth strong_auth_username # String. (optional) If you need to set a DUO strong auth username # different from the users email address. locale # String. (optional) Set the users Locale. Default to auto detect # if not set. time_zone # String. (optional) Set the users time zone. Default to auto detect # if not set. send_password_request # Boolean. (optional) If set the True the user will receive an email # requesting them to set their password.
As a reponse, you will receive the user object with the attributes as listed in the users attribute section above.
Example using curl:
cat <<EOF | curl -s -X POST --user "37DeYIkmDoQcsl3eEl2lE2:x" -H "Accept: application/json" -H "Content-Type: application/json" -d @- https://liquidfiles.company.com/admin/users {"user": { "email": "user1@company.com", "name": "User 1", "group": "local-users" } } EOF {"user": { "id": "user1-company-com", "email": "user1@company.com", "name": "User 1", "group": "local-users", "max_file_size": 0, "filedrop": "https://liquidfiles.company.com/filedrop/~sX9oZU", "filedrop_email": "https://liquidfiles.company.com/filedrop/user1@company.com", "api_key": "disabled", "ldap_authentication": "false", "locale": "", "time_zone": "", "strong_auth_type": "", "strong_auth_username": "", "last_login_at": "", "last_login_ip": "", "created_at": "2014-09-01 03:54:10 UTC" } }
Update User
When updating the user, you need to send the users ID that you wish to update, followed by the user attributes you want to update.
Request
Request URL: /admin/users/_the_users_ID_ Request VERB: PUT Parameters: user: email # String. (optional) The users email address (needs to be unique). name # String. (optional) The name of the user. password # String. (optional) The password for the user (not used if # authenticated with LDAP). group # String. (optional) The ID of the group to add the users to # (ex: "local-users"). If omitted the user will be added # to the group in accordance with the configuration in # Admin → Groups. max_file_size # Integer. (optional) The maximum file size for this user. ldap_authentication # Boolean. (optional) Set to True if the user is authenticated # with LDAP. strong_auth_type # String. (optional) Possible values: # no value/blank: Inherit settings from the Users Group # disabled: Don't require strong authentication # duo: Require DUO strong authentication # otp_enable: Permit the User to use OTP Two Factor Auth # otp_require: Require the User to use OTP Two Factor Auth strong_auth_username # String. (optional) If you need to set a DUO strong auth username # different from the users email address. locale # String. (optional) Set the users Locale. Default to auto detect # if not set. time_zone # String. (optional) Set the users time zone. Default to auto detect # if not set. send_password_request # Boolean. (optional) If set the True the user will receive an email # requesting them to set their password.
The response back will be the updated user attributes.
Example using curl:
cat <<EOF | curl -s -X PUT --user "ayFlT3BNx1OXxiZcM4h5Tl:x" -H "Accept: application/json" -H "Content-Type: application/json" -d @- https://liquidfiles.company.com/admin/users/user1-company-com {"user": { "name": "User 1 new", "group": "local-users-receive-only", "max_file_size": 1000 } } EOF {"user": { "id": "user1-company-com", "email": "user1@company.com", "name": "User 1 new", "group": "local-users-receive-only", "max_file_size": 1000, "filedrop": "https://liquidfiles.company.com/filedrop/~oly9Ch", "filedrop_email": "https://liquidfiles.company.com/filedrop/user1-new@company.com", "api_key": "disabled", "ldap_authentication": "false", "locale": "", "time_zone": "", "strong_auth_type": "", "strong_auth_username": "", "last_login_at": "", "last_login_ip": "", "created_at": "2014-09-01 07:09:12 UTC" } }
Delete User
Request
Request URL: /admin/users/_the_users_ID_
Request VERB: DELETE
The response will be blank, with a http status code of 200 if the user was deleted.
Example using curl:
curl -s -X DELETE --user "ayFlT3BNx1OXxiZcM4h5Tl:x" -H "Accept: application/json" -H "Content-Type: application/json" https://liquidfiles.company.com/admin/users/user1-company-com