Delete authorized user for protected directory

This function deletes a user who can access a protected directory on the cPanel account.

SecurityBasicAuth
Request
query Parameters
dir
required
string <path>

The absolute directory path on the cPanel account from which to remove a user.

Example: dir=/home/example/example.com
user
required
string <username>

The username to remove from the directory.

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