Update directory indexing settings

This function configures the directory indexing settings for a directory on the cPanel account.

SecurityBasicAuth
Request
query Parameters
dir
required
string <path>

The directory for which to manage directory indexing.

Example: dir=/home/example/example.com
type
required
string

The type of directory indexing.

  • standard — The directory uses directory indexing with standard formatting.
  • disabled — The directory doesn't use directory indexing.
  • inherit — The directory uses the system's default settings.
  • fancy — The directory uses directory indexing with Apache FancyIndexing directive. The directory will include additional information such as file size and the date of the file's last update.
Enum: "standard" "disabled" "inherit" "fancy"
Example: type=inherit
Responses
200

HTTP Request was successful.

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
get/DirectoryIndexes/set_indexing
Request samples
uapi --output=jsonpretty \
  --user=username \
  DirectoryIndexes \
  set_indexing \
  dir='/home/example/example.com' \
  type='inherit'
Response samples
application/json
{
  • "apiversion": 3,
  • "func": "set_indexing",
  • "module": "DirectoryIndexes",
  • "result": {
    • "data": "disabled",
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}