Edit Group API
POST /editGroup
Description
This API endpoint allows users to edit and update an existing group within a service group. Users can modify various attributes of the group such as the name, description, tag, duration, price, and user access settings.
Request Body
The request utilizes GraphQL to perform the editGroup
mutation.
Mutation:
mutation editGroup ($id: Int!, $group: GroupEdit) {
editGroup (id: $id, group: $group) {
id
name
description
tagName
duration
price
usernamePostfix
usernamePostfixId
dailyBandwidth
multiLoginCount
downloadUpload
ip
}
}
Variables:
{
"id": 0,
"group": {
"serviceGroupId": 0,
"name": "<Group_Name>",
"description": "<Group_Description>",
"tagName": "<Tag_Name>",
"duration": 0,
"price": "<Price>",
"usernamePostfix": "<Username_Postfix>",
"usernamePostfixId": "<Username_Postfix_ID>",
"dailyBandwidth": "<Daily_Bandwidth>",
"multiLoginCount": 0,
"downloadUpload": "<Download_Upload_Limits>",
"ip": "<IP_Address>"
}
}
- id (Int): The unique identifier of the group to be edited.
- group (GroupEdit Object): An object containing the updated group's details.
- serviceGroupId (Int): The ID of the service group this group belongs to.
- name (String): The new name for the group.
- description (String): The updated description for the group.
- tagName (String): The updated tag name associated with the group.
- duration (Int): The updated duration (e.g., in days or months) that the group is valid for.
- price (String): The updated price associated with the group.
- usernamePostfix (String): The updated postfix to be added to usernames within the group.
- usernamePostfixId (String): The updated ID associated with the username postfix.
- dailyBandwidth (String): The updated daily bandwidth limit for users in the group.
- multiLoginCount (Int): The updated number of simultaneous logins allowed for users in the group.
- downloadUpload (String): The updated download and upload limits for the group.
- ip (String): The updated IP address associated with the group.
Response:
-
Success (200 OK):
{
"data": {
"editGroup": {
"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 edited group.name
(String): The name of the group.description
(String): The description of the group.tagName
(String): The tag name associated with the group.duration
(Int): The duration the group is valid for.price
(String): The price associated with the group.usernamePostfix
(String): The postfix 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 edited. All required fields should be provided and correctly formatted according to the platform's specifications. The group configuration should align with the platform's specifications, particularly in terms of service group association and access settings.