---
updatedAt: 2025-08-01T20:17:33.000Z
agentTools:
  projectIndex: https://synaccess-pdus.readme.io/llms.txt
---

# Groups

Groups are user created list of outlets. Outlets are designated by user. Groups can be used to manage sets of equipment together.

### Endpoints

```endpoint
GET    /api/groups                       Returns list of all outlet groups
POST   /api/groups                       Creates a group of outlets.   
PUT    /api/groups/:group_id             Modifies individual group
DELETE /api/groups/:group_id             Permanently remove group.
```

<br />

### Group Object

```json
{
  "groupName": "Modem/Router Equipment",
  "id": "1",
  "groupRebootSequenceDelay": 3,
  "outlets": [
    {
      "outletName": "Outlet 20",
      "id": "20-572662306",
      "pwrOnState": "PREV",
      "outletIndex": 8,
      "currentRms": 0,
      "state": "On",
      "bankId": 572662306,
      "watts": 0
    },
    {
      "outletName": "Outlet 21",
      "id": "21-572662306",
      "pwrOnState": "PREV",
      "outletIndex": 9,
      "currentRms": 4.20,
      "state": "On",
      "bankId": 572662306,
      "watts": 5.04
    },
    ...
  ]
}
```

| Key                          | Type     | Description                                                                            |
| :--------------------------- | :------- | :------------------------------------------------------------------------------------- |
| **groupName**                | *string* | User defined name for group                                                            |
| **id**                       | *string* | Unique Identifier for Group                                                            |
| **groupRebootSequenceDelay** | *number* | When rebooting group of outlets, number of seconds to wait before each outlet turns on |
| **outlets**                  | *array*  | Array of [Outlet Objects](#Outlet-Object)                                              |

<br />

<br />

### Get List of Groups

Returns a list of all groups that have been created.

```endpoint
GET    /api/groups       Returns list of all outlet groups
```

#### Example Request

```curl
curl 'http://192.168.1.100/api/groups' \
  --header 'Authorization: Bearer j2d36cG2ciHKDDqFc3k'
```

#### Response

Expected response is an array of [Group Objects](#Group-Object)

```json
{
  "groupName": "Modem/Router Equipment",
  "id": "1",
  "groupRebootSequenceDelay": 3,
  "outlets": [
    {
      "outletName": "Outlet 20",
      "id": "20-572662306",
      "pwrOnState": "PREV",
      "outletIndex": 8,
      "currentRms": 0,
      "state": "On",
      "bankId": 572662306,
      "watts": 0
    },
    {
      "outletName": "Outlet 21",
      "id": "21-572662306",
      "pwrOnState": "PREV",
      "outletIndex": 9,
      "currentRms": 4.20,
      "state": "On",
      "bankId": 572662306,
      "watts": 5.04
    },
    ...
  ]
}
```

### Create Group

```endpoint
POST   /api/groups         Creates a group of outlets.            
```

#### Request

Follows [Authentication Scheme](#Authentication-Scheme).

```json
{
  "groupName": "Example Group 1", // required
  "outlets": ["2-858993459", "7-858993459"] // required
}
```

**groupName** *required*\
Name string up to 100 characters

**outlets** *optional*\
Outlets array of outlet UUIDs. Required at least 1.

**groupRebootSequenceDelay** *optional*\
Sequence delay in seconds. When group outlets reboot, they boot consecutively and with this sequence delay. Maximum group reboot sequence delay is 99 seconds.

#### Example Request

```curl
curl 'http://192.168.1.100/api/groups' \
--header 'Authorization: Bearer j2d36cG2ciHKDDqFc3k' \
--data '{"groupName":"Example Group 1","outlets":["2-858993459","7-858993459"]}'
```

#### Response

Expected response is the newly created [Group Object](#Group-Object) with new group uuid.

```json
{
  "groupName": "Modem/Router Equipment",
  "id": "2",
  "groupRebootSequenceDelay": 3,
  "outlets": [
    {
      "outletName": "Outlet 20",
      "id": "20-572662306",
      "pwrOnState": "PREV",
      "outletIndex": 8,
      "currentRms": 0,
      "state": "On",
      "bankId": 572662306,
      "watts": 0
    },
    {
      "outletName": "Outlet 21",
      "id": "21-572662306",
      "pwrOnState": "PREV",
      "outletIndex": 9,
      "currentRms": 4.20,
      "state": "On",
      "bankId": 572662306,
      "watts": 5.04
    },
    ...
  ]
}
```

### Modify Group

```endpoint
PUT    /api/groups/:group_id           Modifies individual group
```

#### Request

Follows [Authentication Scheme](#Authentication-Scheme).\
To modify the outlets inside of group, update the outlet array of outlet UUIDs.
`:group_id` is to be replaced by `Group UUID`

```json
{
  "groupName": "Storage Equipment 2",
  "outlets": ["7-858993459", "8-858993459", "3-858993459"]
}
```

##### Example Request

```curl
curl 'http://192.168.1.100/api/groups/0u912084N12dM5b05GU' \
--header 'Authorization: Bearer j2d36cG2ciHKDDqFc3k' \
--data '{"groupName":"Storage Equipment 2","outlets":["7-858993459","8-858993459","2-858993459"]}'
```

#### Response

Expected response is a [Group Object](#Group-Object)

```json
{
  "groupName": "Modem/Router Equipment",
  "id": "2",
  "groupRebootSequenceDelay": 3,
  "outlets": [
    {
      "outletName": "Outlet 20",
      "id": "20-572662306",
      "pwrOnState": "PREV",
      "outletIndex": 8,
      "currentRms": 0,
      "state": "On",
      "bankId": 572662306,
      "watts": 0
    },
    {
      "outletName": "Outlet 21",
      "id": "21-572662306",
      "pwrOnState": "PREV",
      "outletIndex": 9,
      "currentRms": 4.203895392974451e-44,
      "state": "On",
      "bankId": 572662306,
      "watts": 5.048878302815963e-42
    }...
  ]
}
```

### Switch Group Outlets

```endpoint
PUT /api/groups/:group_id Modify (switch) a group
```

#### Request

Follows [Authentication Scheme](#Authentication-Scheme).\
To change the outlet states, use the key value `state`, and it's options: `"ON"`, `"OFF"`, `"REBOOT"`

```json
{
  "state": "OFF"
}
```

##### Example Request

```curl
curl 'http://192.168.1.100/api/groups/0u912084N12dM5b05GU' \
--header 'Authorization: Bearer j2d36cG2ciHKDDqFc3k' \
--data '{"state": "OFF"}'
```

#### Response

Expected response is a [Group Object](#Group-Object)

```json
{
  "groupName": "Modem/Router Equipment",
  "id": "2",
  "groupRebootSequenceDelay": 3,
  "outlets": [
    {
      "outletName": "Outlet 20",
      "id": "20-572662306",
      "pwrOnState": "PREV",
      "outletIndex": 8,
      "currentRms": 0,
      "state": "OFF",
      "bankId": 572662306,
      "watts": 0
    },
    {
      "outletName": "Outlet 21",
      "id": "21-572662306",
      "pwrOnState": "PREV",
      "outletIndex": 9,
      "currentRms": 4.203895392974451e-44,
      "state": "OFF",
      "bankId": 572662306,
      "watts": 5.048878302815963e-42
    }...
  ]
}
```

### Remove a Group

```endpoint
DELETE /api/groups/:group_id    Permanently remove group.
```

#### Request

Follows [Authentication Scheme](#Authentication-Scheme)\
`:group_id` should be replaced with `Group UUID`

```json
{} // no request parameters
```

##### Example Request

```curl
curl -X DELETE 'http://192.168.1.100/api/groups/0u912084N12dM5b05GU' \
--header 'Cookie: SPID=j2d36cG2ciHKDDqFc3k'
```

#### Response

Expected Response is a **200 HTTP Response code** for successful permanent deletion of group.\
 

```curl
200
```