Перейти к основному содержимому

All Groups API

POST /allGroups

Description

This API endpoint retrieves a comprehensive list of all available groups with their respective details.

Request Body

The request uses GraphQL to perform the allGroups query, which does not require any variables.

Query:

query allGroups {
allGroups {
id
name
description
tagName
duration
price
usernamePostfix
usernamePostfixId
dailyBandwidth
multiLoginCount
downloadUpload
ip
}
}

GraphQL Variables:

{}

Example Request:

curl --location '' \
--header 'Content-Type: application/json' \
--data '{"query":"query allGroups {\n allGroups {\n id\n name\n description\n tagName\n duration\n price\n usernamePostfix\n usernamePostfixId\n dailyBandwidth\n multiLoginCount\n downloadUpload\n ip\n }\n}","variables":{}}'

Response:

  • Success (200 OK):

    • The response includes a list of all groups with detailed information about each group.
    {
    "data": {
    "allGroups": [
    {
    "id": 1,
    "name": "Basic Group",
    "description": "Basic group with standard features",
    "tagName": "Basic",
    "duration": 30,
    "price": 29.99,
    "usernamePostfix": "BasicUser",
    "usernamePostfixId": 301,
    "dailyBandwidth": 500,
    "multiLoginCount": 1,
    "downloadUpload": "Limited",
    "ip": "192.168.1.50"
    },
    {
    "id": 2,
    "name": "Advanced Group",
    "description": "Advanced group with additional features",
    "tagName": "Advanced",
    "duration": 90,
    "price": 79.99,
    "usernamePostfix": "AdvUser",
    "usernamePostfixId": 302,
    "dailyBandwidth": 1000,
    "multiLoginCount": 3,
    "downloadUpload": "High",
    "ip": "192.168.1.60"
    }
    ]
    }
    }
  • Error (4XX/5XX):

    • If there is an issue retrieving the groups, such as a server error or invalid query, the response will include an error message and status code.

Note:

No variables are required for this query. Ensure that the GraphQL server is properly configured to handle the allGroups query for accurate results.