---
title: "Update folder"
method: PUT
path: "/folders/{name}"
tags: ["folders"]
---

# Update folder

`PUT /folders/{name}`

Updates an existing folder

## Request body

- BaseVirtualFolder — Defines the filesystem for the virtual folder and the used quota limits. The same folder can be shared among multiple users and each user can have different quota limits or a different virtual path.
  - `id` integer
  - `name` string — unique name for this virtual folder
  - `mapped_path` string — absolute filesystem path to use as virtual folder
  - `description` string — optional description
  - `used_quota_size` integer
  - `used_quota_files` integer
  - `last_quota_update` integer — Last quota update as unix timestamp in milliseconds
  - `users` string[] — list of usernames associated with this virtual folder
  - `filesystem` FilesystemConfig — Storage filesystem details
    - `provider` 0 | 1 | 2 | 3 | 4 | 5 | 6 — Filesystem providers: * `0` - Local filesystem * `1` - S3 Compatible Object Storage * `2` - Google Cloud Storage * `3` - Azure Blob Storage * `4` - Local filesystem encrypted * `5` - SFTP * `6` - HTTP filesystem
    - `osconfig` OSFsConfig
      - `read_buffer_size` integer — The read buffer size, as MB, to use for downloads. 0 means no buffering, that's fine in most use cases.
      - `write_buffer_size` integer — The write buffer size, as MB, to use for uploads. 0 means no buffering, that's fine in most use cases.
    - `s3config` S3Config — S3 Compatible Object Storage configuration details
      - `bucket` string
      - `region` string
      - `access_key` string
      - `access_secret` Secret — The secret is encrypted before saving, so to set a new secret you must provide a payload and set the status to "Plain". The encryption key and additional data will be generated automatically. If you set the status to "Redacted" the existing secret will be preserved
        - `status` 'Plain' | 'AES-256-GCM' | 'Secretbox' | 'GCP' | 'AWS' | 'VaultTransit' | 'AzureKeyVault' | 'Redacted' — Set to "Plain" to add or update an existing secret, set to "Redacted" to preserve the existing value
        - `payload` string
        - `key` string
        - `additional_data` string
        - `mode` integer — 1 means encrypted using a master key
      - `role_arn` string — Optional IAM Role ARN to assume
      - `session_token` string — Optional Session token that is a part of temporary security credentials provisioned by AWS STS
      - `endpoint` string — optional endpoint
      - `storage_class` string
      - `acl` string — The canned ACL to apply to uploaded objects. Leave empty to use the default ACL. For more information and available ACLs, see here: https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl
      - `upload_part_size` integer — the buffer size (in MB) to use for multipart uploads. The minimum allowed part size is 5MB, and if this value is set to zero, the default value (5MB) for the AWS SDK will be used. The minimum allowed value is 5.
      - `upload_concurrency` integer — the number of parts to upload in parallel. If this value is set to zero, the default value (5) will be used
      - `upload_part_max_time` integer — the maximum time allowed, in seconds, to upload a single chunk (the chunk size is defined via "upload_part_size"). 0 means no timeout
      - `download_part_size` integer — the buffer size (in MB) to use for multipart downloads. The minimum allowed part size is 5MB, and if this value is set to zero, the default value (5MB) for the AWS SDK will be used. The minimum allowed value is 5. Ignored for partial downloads
      - `download_concurrency` integer — the number of parts to download in parallel. If this value is set to zero, the default value (5) will be used. Ignored for partial downloads
      - `download_part_max_time` integer — the maximum time allowed, in seconds, to download a single chunk (the chunk size is defined via "download_part_size"). 0 means no timeout. Ignored for partial downloads.
      - `force_path_style` boolean — Set this to "true" to force the request to use path-style addressing, i.e., "http://s3.amazonaws.com/BUCKET/KEY". By default, the S3 client will use virtual hosted bucket addressing when possible ("http://BUCKET.s3.amazonaws.com/KEY")
      - `key_prefix` string — key_prefix is similar to a chroot directory for a local filesystem. If specified the user will only see contents that starts with this prefix and so you can restrict access to a specific virtual folder. The prefix, if not empty, must not start with "/" and must end with "/". If empty the whole bucket contents will be available
    - `gcsconfig` GCSConfig — Google Cloud Storage configuration details. The "credentials" field must be populated only when adding/updating a user. It will be always omitted, since there are sensitive data, when you search/get users
      - `bucket` string
      - `credentials` Secret — The secret is encrypted before saving, so to set a new secret you must provide a payload and set the status to "Plain". The encryption key and additional data will be generated automatically. If you set the status to "Redacted" the existing secret will be preserved
        - `status` 'Plain' | 'AES-256-GCM' | 'Secretbox' | 'GCP' | 'AWS' | 'VaultTransit' | 'AzureKeyVault' | 'Redacted' — Set to "Plain" to add or update an existing secret, set to "Redacted" to preserve the existing value
        - `payload` string
        - `key` string
        - `additional_data` string
        - `mode` integer — 1 means encrypted using a master key
      - `automatic_credentials` 0 | 1 — Automatic credentials: * `0` - disabled, explicit credentials, using a JSON credentials file, must be provided. This is the default value if the field is null * `1` - enabled, we try to use the Application Default Credentials (ADC) strategy to find your application's credentials
      - `storage_class` string
      - `acl` string — The ACL to apply to uploaded objects. Leave empty to use the default ACL. For more information and available ACLs, refer to the JSON API here: https://cloud.google.com/storage/docs/access-control/lists#predefined-acl
      - `key_prefix` string — key_prefix is similar to a chroot directory for a local filesystem. If specified the user will only see contents that starts with this prefix and so you can restrict access to a specific virtual folder. The prefix, if not empty, must not start with "/" and must end with "/". If empty the whole bucket contents will be available
      - `upload_part_size` integer — The buffer size (in MB) to use for multipart uploads. The default value is 16MB. 0 means use the default
      - `upload_part_max_time` integer — The maximum time allowed, in seconds, to upload a single chunk. The default value is 32. 0 means use the default
    - `azblobconfig` AzureBlobFsConfig — Azure Blob Storage configuration details
      - `container` string
      - `account_name` string — Storage Account Name, leave blank to use SAS URL
      - `account_key` Secret — The secret is encrypted before saving, so to set a new secret you must provide a payload and set the status to "Plain". The encryption key and additional data will be generated automatically. If you set the status to "Redacted" the existing secret will be preserved
        - `status` 'Plain' | 'AES-256-GCM' | 'Secretbox' | 'GCP' | 'AWS' | 'VaultTransit' | 'AzureKeyVault' | 'Redacted' — Set to "Plain" to add or update an existing secret, set to "Redacted" to preserve the existing value
        - `payload` string
        - `key` string
        - `additional_data` string
        - `mode` integer — 1 means encrypted using a master key
      - `sas_url` Secret — The secret is encrypted before saving, so to set a new secret you must provide a payload and set the status to "Plain". The encryption key and additional data will be generated automatically. If you set the status to "Redacted" the existing secret will be preserved
        - `status` 'Plain' | 'AES-256-GCM' | 'Secretbox' | 'GCP' | 'AWS' | 'VaultTransit' | 'AzureKeyVault' | 'Redacted' — Set to "Plain" to add or update an existing secret, set to "Redacted" to preserve the existing value
        - `payload` string
        - `key` string
        - `additional_data` string
        - `mode` integer — 1 means encrypted using a master key
      - `endpoint` string — optional endpoint. Default is "blob.core.windows.net". If you use the emulator the endpoint must include the protocol, for example "http://127.0.0.1:10000"
      - `upload_part_size` integer — the buffer size (in MB) to use for multipart uploads. If this value is set to zero, the default value (5MB) will be used.
      - `upload_concurrency` integer — the number of parts to upload in parallel. If this value is set to zero, the default value (5) will be used
      - `download_part_size` integer — the buffer size (in MB) to use for multipart downloads. If this value is set to zero, the default value (5MB) will be used.
      - `download_concurrency` integer — the number of parts to download in parallel. If this value is set to zero, the default value (5) will be used
      - `access_tier` '' | 'Archive' | 'Hot' | 'Cool'
      - `key_prefix` string — key_prefix is similar to a chroot directory for a local filesystem. If specified the user will only see contents that starts with this prefix and so you can restrict access to a specific virtual folder. The prefix, if not empty, must not start with "/" and must end with "/". If empty the whole container contents will be available
      - `use_emulator` boolean
    - `cryptconfig` CryptFsConfig — Crypt filesystem configuration details
      - `passphrase` Secret — The secret is encrypted before saving, so to set a new secret you must provide a payload and set the status to "Plain". The encryption key and additional data will be generated automatically. If you set the status to "Redacted" the existing secret will be preserved
        - `status` 'Plain' | 'AES-256-GCM' | 'Secretbox' | 'GCP' | 'AWS' | 'VaultTransit' | 'AzureKeyVault' | 'Redacted' — Set to "Plain" to add or update an existing secret, set to "Redacted" to preserve the existing value
        - `payload` string
        - `key` string
        - `additional_data` string
        - `mode` integer — 1 means encrypted using a master key
      - `read_buffer_size` integer — The read buffer size, as MB, to use for downloads. 0 means no buffering, that's fine in most use cases.
      - `write_buffer_size` integer — The write buffer size, as MB, to use for uploads. 0 means no buffering, that's fine in most use cases.
    - `sftpconfig` SFTPFsConfig
      - `endpoint` string — remote SFTP endpoint as host:port
      - `username` string — you can specify a password or private key or both. In the latter case the private key will be tried first.
      - `password` Secret — The secret is encrypted before saving, so to set a new secret you must provide a payload and set the status to "Plain". The encryption key and additional data will be generated automatically. If you set the status to "Redacted" the existing secret will be preserved
        - `status` 'Plain' | 'AES-256-GCM' | 'Secretbox' | 'GCP' | 'AWS' | 'VaultTransit' | 'AzureKeyVault' | 'Redacted' — Set to "Plain" to add or update an existing secret, set to "Redacted" to preserve the existing value
        - `payload` string
        - `key` string
        - `additional_data` string
        - `mode` integer — 1 means encrypted using a master key
      - `private_key` Secret — The secret is encrypted before saving, so to set a new secret you must provide a payload and set the status to "Plain". The encryption key and additional data will be generated automatically. If you set the status to "Redacted" the existing secret will be preserved
        - `status` 'Plain' | 'AES-256-GCM' | 'Secretbox' | 'GCP' | 'AWS' | 'VaultTransit' | 'AzureKeyVault' | 'Redacted' — Set to "Plain" to add or update an existing secret, set to "Redacted" to preserve the existing value
        - `payload` string
        - `key` string
        - `additional_data` string
        - `mode` integer — 1 means encrypted using a master key
      - `key_passphrase` Secret — The secret is encrypted before saving, so to set a new secret you must provide a payload and set the status to "Plain". The encryption key and additional data will be generated automatically. If you set the status to "Redacted" the existing secret will be preserved
        - `status` 'Plain' | 'AES-256-GCM' | 'Secretbox' | 'GCP' | 'AWS' | 'VaultTransit' | 'AzureKeyVault' | 'Redacted' — Set to "Plain" to add or update an existing secret, set to "Redacted" to preserve the existing value
        - `payload` string
        - `key` string
        - `additional_data` string
        - `mode` integer — 1 means encrypted using a master key
      - `fingerprints` string[] — SHA256 fingerprints to use for host key verification. If you don't provide any fingerprint the remote host key will not be verified, this is a security risk
      - `prefix` string — Specifying a prefix you can restrict all operations to a given path within the remote SFTP server.
      - `disable_concurrent_reads` boolean — Concurrent reads are safe to use and disabling them will degrade performance. Some servers automatically delete files once they are downloaded. Using concurrent reads is problematic with such servers.
      - `buffer_size` integer — The size of the buffer (in MB) to use for transfers. By enabling buffering, the reads and writes, from/to the remote SFTP server, are split in multiple concurrent requests and this allows data to be transferred at a faster rate, over high latency networks, by overlapping round-trip times. With buffering enabled, resuming uploads is not supported and a file cannot be opened for both reading and writing at the same time. 0 means disabled.
      - `equality_check_mode` 0 | 1 — Defines how to check if this config points to the same server as another config. If different configs point to the same server the renaming between the fs configs is allowed: * `0` username and endpoint must match. This is the default * `1` only the endpoint must match
    - `httpconfig` HTTPFsConfig
      - `endpoint` string — HTTP/S endpoint URL. SFTPGo will use this URL as base, for example for the `stat` API, SFTPGo will add `/stat/{name}`
      - `username` string
      - `password` Secret — The secret is encrypted before saving, so to set a new secret you must provide a payload and set the status to "Plain". The encryption key and additional data will be generated automatically. If you set the status to "Redacted" the existing secret will be preserved
        - `status` 'Plain' | 'AES-256-GCM' | 'Secretbox' | 'GCP' | 'AWS' | 'VaultTransit' | 'AzureKeyVault' | 'Redacted' — Set to "Plain" to add or update an existing secret, set to "Redacted" to preserve the existing value
        - `payload` string
        - `key` string
        - `additional_data` string
        - `mode` integer — 1 means encrypted using a master key
      - `api_key` Secret — The secret is encrypted before saving, so to set a new secret you must provide a payload and set the status to "Plain". The encryption key and additional data will be generated automatically. If you set the status to "Redacted" the existing secret will be preserved
        - `status` 'Plain' | 'AES-256-GCM' | 'Secretbox' | 'GCP' | 'AWS' | 'VaultTransit' | 'AzureKeyVault' | 'Redacted' — Set to "Plain" to add or update an existing secret, set to "Redacted" to preserve the existing value
        - `payload` string
        - `key` string
        - `additional_data` string
        - `mode` integer — 1 means encrypted using a master key
      - `skip_tls_verify` boolean
      - `equality_check_mode` 0 | 1 — Defines how to check if this config points to the same server as another config. If different configs point to the same server the renaming between the fs configs is allowed: * `0` username and endpoint must match. This is the default * `1` only the endpoint must match

## Response `200`

successful operation

- ApiResponse
  - `message` string — message, can be empty
  - `error` string — error description if any

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error
- `default` — Unexpected Error

---

[API](https://skmtc.net/kanton-bern/apis/sftpgo.md) · [All operations](https://skmtc.net/kanton-bern/apis/sftpgo/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kanton-bern/sftpgo/revisions/d8d616a479b0/schema)
