# listgroups_extended

Returns the bot's groups list, with additional details. (For another avatar’s groups, use the [avatar_groups](/doc/8a79b7d7-5212-42fe-a950-05e69fa09d33) command.)

```csharp
// See "LSL Helper Functions" page for this function
smartbotsAPI("listgroups_extended", []);
```

```snippet http-api-variables-OmJyUigTgO
```

```snippet http-api-input-basic-parameters-5FcVlaJbq0 action="listgroups_extended"
```

```snippet http-api-output-JAwUcmg7i7
groups | The **JSON-array** (only JSON!) containing bot's groups (see below)
```

# Format

The API command returns the bot's groups with additional details. Response interface:

```typescript
interface listgroups_extended.groups {
  // the name of the group
  name: string;
  // the group UUID
  uuid: string;
  // the comma-separated list of bot's permissions
  permissions: string;
  // 1 if group is open to join, 0 otherwise
  open: "0" | "1";
  // the group joining price (0 when free)
  fee: number;
}
```

# Return value

* This command returns complex response and available only when requesting JSON output (*dataType=json*).
* Also note that order of the group details (name, uuid etc) in the object may vary (see the order in example below).

## **Limiting the response length**

The result may be quite long for LSL HTTP query since it is limited to 1024 characters. To limit the result to specific group only, use *limit_name*and *limit_uuid* parameters. See “Examples”.

# Examples

The example of the groups list returned:

```json
{
  "action": "listgroups_extended",
  "result": "OK",
  "groups": [
    {
      "name": "HMG SYSTEM",
      "uuid": "051b19c0-2deb-a716-8894-1cf5701bf6e6",
      "open": 0,
      "fee": "0",
      "permissions": "JoinChat,AllowVoiceChat,AllowSetHome,Accountable,ReceiveNotices"
    },
    {
      "name": "Earn2Life - earn L$500-1000 a day",
      "uuid": "41ff4c6b-e3c0-a2b9-f53b-797e78532374",
      "fee": "0",
      "open": 0,
      "permissions": "Invite,Eject,AssignMemberLimited,RemoveMember,JoinChat,AllowFly,AllowLandmark,AllowVoiceChat,AllowSetHome,LandManageAllowed,LandManageBanned,LandEjectAndFreeze,ModerateChat,SendNotices,ReceiveNotices,StartProposal,VoteOnProposal,MemberVisible"
    },
    {
      "name": ".oO [KB] Kitty Boom Oo.",
      "uuid": "5611bcb8-8a0f-be6e-2e17-b3c6ec629716",
      "open": 0,
      "fee": "0",
      "permissions": "JoinChat,AllowVoiceChat,AllowSetHome,Accountable,ReceiveNotices"
    }
  ]
}
```

## **Limiting the response length**

The example of the *limit_name=Earn2* parameter usage:

```json
{
  "action": "listgroups_extended",
  "result": "OK",
  "groups": [
    {
      "name": "Earn2Life - earn L$500-1000 a day",
      "uuid": "41ff4c6b-e3c0-a2b9-f53b-797e78532374",
      "fee": "0",
      "open": 0,
      "permissions": "Invite,Eject,AssignMemberLimited,RemoveMember,JoinChat,AllowFly,AllowLandmark,AllowVoiceChat,AllowSetHome,LandManageAllowed,LandManageBanned,LandEjectAndFreeze,ModerateChat,SendNotices,ReceiveNotices,StartProposal,VoteOnProposal,MemberVisible"
    }
  ]
}
```