Return Directory Protection settings

This function returns the leech protection settings of the subdirectories in a directory.

Authorizations:
query Parameters
dir
required
string <path>

The absolute or relative file path in the user's home directory for which to return leech protection information.

Example: dir=/home/example/example.com

Responses

Response Schema: application/json
apiversion
integer

The version of the API.

func
string

The name of the method called.

module
string

The name of the module called.

object

Request samples

uapi --user=username DirectoryProtection list_directories dir='/home/example/example.com'

Response samples

Content type
application/json
{
  • "apiversion": 3,
  • "func": "list_directories",
  • "module": "DirectoryProtection",
  • "result": {
    • "data": {
      • "children": [
        • {
          • "path": "/home/example/example.com/cgi-bin",
          • "state": {
            • "has_leech_protection": 1
            }
          }
        ],
      • "current": {
        • "path": "/home/example/example.com",
        • "state": {
          • "has_leech_protection": 1
          }
        },
      • "home": {
        • "path": "/home/example",
        • "state": {
          • "has_leech_protection": 1
          }
        },
      • "parent": {
        • "path": "/home/example",
        • "state": {
          • "has_leech_protection": 1
          }
        }
      },
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}