Skip to content

Group Tree List

  • Endpoint Path: /api/v2/group/tree
  • Method: GET

Headers Optional Parameter

Parameter NamePublic Mode (Required)Private Mode (Required)
X-Fresns-Aidoptionalrequired
X-Fresns-Aid-Tokenoptionalrequired
X-Fresns-Uidoptionalrequired
X-Fresns-Uid-Tokenoptionalrequired

Query Params

Parameter NameTypeRequiredDescription
whitelistKeysStringoptionalWhitelist key names, only returns key-value pairs for the given key names
Multiple separated by English commas, supports "dot notation" for multi-dimensional arrays
blacklistKeysStringoptionalBlacklist key names, removes specified key-value pairs from the returned data
Multiple separated by English commas, supports "dot notation" for multi-dimensional arrays

Request Description

  • This interface will fetch all groups and then assemble them into a tree structure for output.
  • The use case of this interface is similar to traditional BBS sections, where all groups (sections) are displayed in a tree structure.

Return

json
{
    "code": 0,
    "message": "ok",
    "data": [
        {
            "gid": "String / Group ID",
            "gname": "String / Group name",
            "description": "String / Group description",
            "cover": "String / Group cover image URL",
            "banner": "String / Group banner image URL",
            "groups": [
                {
                    // Common Data Structure -> Group Info
                }
            ]
        }
    ]
}

Released under the Apache-2.0 License