پرش به مطلب اصلی

Reseller Delete User by Email API

POST /resellerDeleteUserByEmail

Description

This API endpoint allows a reseller to delete an existing user from their assigned group by specifying the user's email address. Deleting a user will remove the user and all associated data from the system.

Request Body

The request utilizes GraphQL to perform the resellerDeleteUserByEmail mutation.

Mutation:

mutation resellerDeleteUserByEmail ($email: String!) {
resellerDeleteUserByEmail (email: $email) {
id
email
username
resellerId
role
enabled
radAccess
radAccessClear
createdAt
updatedAt
}
}

Variables:

{
"email": "<User_Email>"
}
  • email (String): The email address of the user to be deleted.

Response:

  • Success (200 OK):

    • If the deletion is successful, the response will return the details of the deleted user, confirming that the user has been removed from the system.
    {
    "data": {
    "resellerDeleteUserByEmail": {
    "id": "<User_ID>",
    "email": "<User_Email>",
    "username": "<Username>",
    "resellerId": "<Reseller_ID>",
    "role": "<User_Role>",
    "enabled": "<Enabled_Status>",
    "radAccess": "<Rad_Access>",
    "radAccessClear": "<Rad_Access_Clear>",
    "createdAt": "<Creation_Timestamp>",
    "updatedAt": "<Update_Timestamp>"
    }
    }
    }
  • Error (4XX/5XX):

    • Appropriate error messages and status codes will be returned in cases of invalid email, missing required fields, or server errors.

Note:

Ensure that the email corresponds to an existing user within the reseller's group. Once deleted, the user's data cannot be recovered. This API should be used by resellers with the necessary permissions to manage and delete user accounts within their assigned groups.