HFS 3
  1. accounts
HFS 3
  • Introduction
  • Front-end
    • List files
      GET
    • Upload
      PUT
    • Upload
      POST
    • Delete
      DELETE
    • Create folder
      POST
  • Admin
    • misc
      • get config
      • set config
    • accounts
      • add account
        POST
      • update account
        POST
      • list accounts
        GET
      • delete account
        POST
      • list usernames
        GET
      • get account
        GET
      • list admins
        GET
      • safer update of the password
        POST
    • VFS
    • plugins
      • get plugin config
      • set plugin config
    • monitoring
    • log
  1. accounts

update account

POST
/~/api/set_account

Request

Header Params
x-hfs-anti-csrf
string 
optional
necessary only for POST requests
Default:
1
Body Params application/json
username
string 
required
changes
object (Account) 
required
username
string 
required
password
string 
optional
belongs
array[string]
optional
ignore_limits
boolean 
optional
disable_password_change
boolean 
optional
admin
boolean 
optional
redirect
string 
optional
disabled
boolean 
optional
expire
string <date-time>
optional
days_to_live
number 
optional
Example
{
    "username": "account3",
    "changes": {
        "admin": true
    }
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://localhost/~/api/set_account' \
--header 'x-hfs-anti-csrf: 1' \
--header 'Content-Type: application/json' \
--data-raw '{
    "username": "account3",
    "changes": {
        "admin": true
    }
}'

Responses

🟢200Success
application/json
Body
username
string 
required
returned because it is normalized
Example
{
    "username": "string"
}
Modified at 2025-05-30 14:11:36
Previous
add account
Next
list accounts
Built with