behaviors
Behaviors

Update Behavior

patch/behaviors/{id}

Request

  • Base URL
    https://app.files.com/api/rest/v1
  • URL
    https://app.files.com/api/rest/v1/behaviors/{id}
  • Auth
    none declared

Path parameters

idinteger required

Behavior ID.

Request body multipart/form-data

valueobject

This field stores data specific to the type of behavior. See The Behavior Types section for the accepted value for each type of behavior.

attachment_filestring binary

Certain behaviors may require a file, for instance, the watermark behavior requires a watermark image. Attach that file here.

disable_parent_folder_behaviorboolean

If true, disables the inherited behavior for this folder and its children. Valid only for behavior types that child folders may override, and requires recursive to be true. Rejected for all other behavior types.

recursiveboolean

Whether the behavior should apply to child folders. This is only configurable for behavior types whose recursion mode is sometimes; always behaviors stay recursive and never behaviors stay non-recursive.

namestring

Name for this behavior.

descriptionstring

Description for this behavior.

attachment_deleteboolean

If true, delete the file stored in attachment.

Example request

{
  "disable_parent_folder_behavior": true,
  "name": "example",
  "description": "example"
}

Response

The Behaviors object.

idinteger

Folder behavior ID

pathstring

Folder path. Note that Behavior paths cannot be updated once initially set. You will need to remove and re-create the behavior on the new path.

attachment_urlstring

URL for attached file

behavior'webhook' | 'file_expiration' | 'auto_encrypt' | 'lock_subfolders' | 'storage_region' | 'serve_publicly' | 'create_user_folders' | 'inbox' | 'limit_file_extensions' | 'limit_file_regex' | 'amazon_sns' | 'watermark' | 'remote_server_mount' | 'slack_webhook' | 'auto_decrypt' | 'override_upload_filename' | 'permission_fence' | 'limit_filename_length' | 'organize_files_into_subfolders' | 'teams_webhook' | 'google_pub_sub' | 'archive_overwritten_or_deleted_files' | 'auto_recrypt' | 'metadata_category' | 'auto_unzip' | 'remote_server_metadata_index' | 'malware_scanning'

Behavior type.

namestring

Name for this behavior.

descriptionstring

Description for this behavior.

valueobject

Settings for this behavior. See the section above for an example value to provide here. Formatting is different for each Behavior type. May be sent as nested JSON or a single JSON-encoded string. If using XML encoding for the API call, this data must be sent as a JSON-encoded string.

public_hosting_urlstring

Public URL for this publicly hosted folder when the Serve Publicly behavior has a key configured. When a Custom Domain with public_hosting destination is attached to this behavior, the URL uses that domain. Otherwise it uses the site's subdomain.hosted-by-files.com host, unless custom_domain_only is enabled, in which case no URL is returned.

disable_parent_folder_behaviorboolean

If true, disables the inherited behavior for this folder and its children. Valid only for behavior types that child folders may override, and requires recursive to be true. Rejected for all other behavior types.

recursiveboolean

Whether this behavior is recursive for this record. always behaviors are always true, never behaviors are always false, and sometimes behaviors may be either value.

inheritedboolean

If true, this behavior is inherited from a higher scope rather than owned by the requested workspace.

managedboolean

If true, this behavior is controlled by a parent-site policy and cannot be modified locally.

root_behavior_site_admin_onlyboolean

If true, this behavior may only be modified by a site admin because it is at the site root or disables a root behavior.

Example response

{
  "id": 1,
  "path": "example",
  "attachment_url": "example",
  "behavior": "webhook",
  "name": "example",
  "description": "example",
  "public_hosting_url": "example",
  "disable_parent_folder_behavior": true,
  "recursive": true,
  "inherited": true,
  "managed": true,
  "root_behavior_site_admin_only": true
}

Changes