Skip to main content

Delete Group API

POST /deleteGroup

Description

This API endpoint allows users to delete an existing group by providing its unique identifier. Deleting a group will remove it and its associated attributes such as name, description, tag, duration, price, and user access settings.

Request Body

The request utilizes GraphQL to perform the deleteGroup mutation.

Mutation:

mutation deleteGroup ($id: Int!) {
deleteGroup (id: $id) {
id
name
description
tagName
duration
price
usernamePostfix
usernamePostfixId
dailyBandwidth
multiLoginCount
downloadUpload
ip
}
}

Variables:

{
"id": 0
}
  • id (Int): The unique identifier of the group to be deleted.

Response:

  • Success (200 OK):

    {
    "data": {
    "deleteGroup": {
    "id": "<Group_ID>",
    "name": "<Group_Name>",
    "description": "<Group_Description>",
    "tagName": "<Tag_Name>",
    "duration": <Duration>,
    "price": "<Price>",
    "usernamePostfix": "<Username_Postfix>",
    "usernamePostfixId": "<Username_Postfix_ID>",
    "dailyBandwidth": "<Daily_Bandwidth>",
    "multiLoginCount": <Multi_Login_Count>,
    "downloadUpload": "<Download_Upload_Limits>",
    "ip": "<IP_Address>"
    }
    }
    }
    • id (Int): The unique identifier of the deleted group.
    • name (String): The name of the deleted group.
    • description (String): The description of the deleted group.
    • tagName (String): The tag name associated with the deleted group.
    • duration (Int): The duration the group was valid for.
    • price (String): The price associated with the deleted group.
    • usernamePostfix (String): The postfix that was added to usernames within the group.
    • usernamePostfixId (String): The ID associated with the username postfix.
    • dailyBandwidth (String): The daily bandwidth limit for the group.
    • multiLoginCount (Int): The number of simultaneous logins allowed for users in the group.
    • downloadUpload (String): The download and upload limits for the group.
    • ip (String): The IP address associated with the group.
  • Error (4XX/5XX):

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

Note:

Ensure that the id corresponds to an existing group that needs to be deleted. Once deleted, the group and its settings cannot be recovered. Make sure to back up any necessary data before performing this action.