# API - Wrong displayGroupId

**URL:** https://community.xibo.org.uk/t/api-wrong-displaygroupid/29647
**Category:** Integrating with Xibo
**Created:** [July 11, 2023, 3:43pm UTC](https://community.xibo.org.uk/t/api-wrong-displaygroupid/29647 "2023-07-11T15:43:15Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![ProServ](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/proserv/32/9355_2.png) [@ProServ](https://community.xibo.org.uk/u/ProServ)
#### Post date: [July 11, 2023, 3:43pm UTC](https://community.xibo.org.uk/t/api-wrong-displaygroupid/29647/1 "2023-07-11T15:43:15Z")

</div>

Hi Team,

**Xibo CMS: 3.3.6**

I want to know the display groups attached to a screen  
On display API, **displayGroupId return always the displayId**.

And **displayGroups property** is not returned to reponse.

Exemple on display #1: {{url}}/api/display?displayId=2  
displayGroupId value is `2`

```auto
[
    {
        "displayId": 2,
        "displayTypeId": 0,
        "venueId": 0,
        "address": "",
        "isMobile": 0,
        "languages": null,
        "displayType": null,
        "screenSize": null,
        "isOutdoor": 0,
        "customId": "",
        "costPerPlay": null,
        "impressionsPerPlay": null,
        "ref1": null,
        "ref2": null,
        "ref3": null,
        "ref4": null,
        "ref5": null,
        "auditingUntil": 0,
        "display": "DSCS9X-TEST_PS",
        "description": null,
        "defaultLayoutId": 1,
        "license": "...",
        "licensed": 1,
        "loggedIn": 1,
        "lastAccessed": "2023-07-11 17:33:31",
        "incSchedule": 0,
        "emailAlert": 0,
        "alertTimeout": 0,
        "clientAddress": "192.168.240.105",
        "mediaInventoryStatus": 1,
        "macAddress": "c4:4e:ac:22:3e:0d",
        "lastChanged": "0",
        "numberOfMacAddressChanges": 0,
        "lastWakeOnLanCommandSent": "0",
        "wakeOnLanEnabled": 0,
        "wakeOnLanTime": "",
        "broadCastAddress": "",
        "secureOn": "",
        "cidr": "",
        "latitude": null,
        "longitude": null,
        "clientType": "android",
        "clientVersion": "3",
        "clientCode": 305,
        "displayProfileId": 2,
        "currentLayoutId": 1,
        "screenShotRequested": 0,
        "storageAvailableSpace": "24.14 GiB",
        "storageTotalSpace": "24.65 GiB",
        **"displayGroupId": 2,**
        "currentLayout": "Default Layout",
        "defaultLayout": "Default Layout",
        "xmrChannel": "cb62517d9ce6a103ba3901272dcc7edc",
        "xmrPubKey": "...",
        "lastCommandSuccess": 0,
        "deviceName": null,
        "timeZone": "UTC",
        "tags": null,
        "bandwidthLimit": 0,
        "newCmsAddress": null,
        "newCmsKey": null,
        "orientation": "landscape",
        "resolution": "1920x1080",
        "commercialLicence": null,
        "teamViewerSerial": null,
        "webkeySerial": null,
        "groupsWithPermissions": null,
        "createdDt": "2023-07-06 13:17:58",
        "modifiedDt": "2023-07-11 17:33:33",
        "folderId": 1,
        "permissionsFolderId": 1,
        "countFaults": 0,
        "lanIpAddress": null,
        "bandwidthLimitFormatted": 0
    }
]

```

And for Display #1: {{url}}/api/display?displayId=1  
displayGroupId value is `1`

```auto
[
    {
        "displayId": 1,
        "displayTypeId": 0,
        "venueId": 0,
        "address": "",
        "isMobile": 0,
        "languages": null,
        "displayType": null,
        "screenSize": null,
        "isOutdoor": 0,
        "customId": "",
        "costPerPlay": null,
        "impressionsPerPlay": null,
        "ref1": "",
        "ref2": "",
        "ref3": "",
        "ref4": "",
        "ref5": "",
        "auditingUntil": 0,
        "display": "PS-PC102",
        "description": "",
        "defaultLayoutId": 1,
        "license": "...",
        "licensed": 1,
        "loggedIn": 0,
        "lastAccessed": "2023-07-06 17:05:10",
        "incSchedule": 0,
        "emailAlert": 0,
        "alertTimeout": 0,
        "clientAddress": "192.168.250.110",
        "mediaInventoryStatus": 3,
        "macAddress": "FE:D6:36:CB:F6:71",
        "lastChanged": "0",
        "numberOfMacAddressChanges": 0,
        "lastWakeOnLanCommandSent": "0",
        "wakeOnLanEnabled": 0,
        "wakeOnLanTime": "",
        "broadCastAddress": "",
        "secureOn": "",
        "cidr": "",
        "latitude": null,
        "longitude": null,
        "clientType": "windows",
        "clientVersion": "3 R309.1",
        "clientCode": 309,
        "displayProfileId": 1,
        "currentLayoutId": null,
        "screenShotRequested": 0,
        "storageAvailableSpace": "44.75 GiB",
        "storageTotalSpace": "74.42 GiB",
        **"displayGroupId": 1,**
        "currentLayout": null,
        "defaultLayout": "Default Layout",
        "xmrChannel": "a34400a398c775e7f45c9767bd011dc0",
        "xmrPubKey": "...",
        "lastCommandSuccess": 0,
        "deviceName": "PS-PC102",
        "timeZone": "",
        "tags": null,
        "bandwidthLimit": 0,
        "newCmsAddress": null,
        "newCmsKey": null,
        "orientation": "landscape",
        "resolution": "1024x768",
        "commercialLicence": "3",
        "teamViewerSerial": null,
        "webkeySerial": null,
        "groupsWithPermissions": null,
        "createdDt": "2023-07-06 12:58:33",
        "modifiedDt": "2023-07-06 17:15:00",
        "folderId": 1,
        "permissionsFolderId": 1,
        "countFaults": 0,
        "lanIpAddress": null,
        "bandwidthLimitFormatted": 0
    }
]

```

---

<div class="post-metadata">

### Author: ![ProServ](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/proserv/32/9355_2.png) [@ProServ](https://community.xibo.org.uk/u/ProServ)
#### Post date: [July 11, 2023, 3:45pm UTC](https://community.xibo.org.uk/t/api-wrong-displaygroupid/29647/2 "2023-07-11T15:45:45Z")

</div>

I’ve only one displayGroup with id #3.

{{url}}/api/displaygroup

```auto
[
    {
        "displayGroupId": 3,
        "displayGroup": "Groupe Ecran Flux",
        "description": "",
        "isDisplaySpecific": 0,
        "isDynamic": 0,
        "dynamicCriteria": "",
        "dynamicCriteriaLogicalOperator": "OR",
        "dynamicCriteriaTags": "",
        "dynamicCriteriaExactTags": "0",
        "dynamicCriteriaTagsLogicalOperator": "OR",
        "userId": 1,
        "tags": null,
        "bandwidthLimit": "0",
        "groupsWithPermissions": null,
        "createdDt": "2023-07-06 14:36:22",
        "modifiedDt": "2023-07-06 20:21:01",
        "folderId": 1,
        "permissionsFolderId": 1,
        "ref1": "",
        "ref2": "",
        "ref3": "",
        "ref4": "",
        "ref5": ""
    }
]

```

---

<div class="post-metadata">

### Author: ![dan](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/dan/32/9115_2.png) [@dan](https://community.xibo.org.uk/u/dan)
#### Post date: [July 11, 2023, 5:46pm UTC](https://community.xibo.org.uk/t/api-wrong-displaygroupid/29647/3 "2023-07-11T17:46:04Z")

</div>

If you include `&embed=displaygroups` to the display API request the displaygroups property will get populated with the groups that display belongs to.

The `displayGroupId` property on the response is the **display specific display group** (every display has its own display group which only it belongs to), and is used for scheduling to that individual display.

---

<div class="post-metadata">

### Author: ![ProServ](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/proserv/32/9355_2.png) [@ProServ](https://community.xibo.org.uk/u/ProServ)
#### Post date: [August 4, 2023, 2:30pm UTC](https://community.xibo.org.uk/t/api-wrong-displaygroupid/29647/4 "2023-08-04T14:30:45Z")

</div>

Ok, Thanks Dan,  
May be document this on swagger ?

---

<div class="post-metadata">

### Author: ![dan](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/dan/32/9115_2.png) [@dan](https://community.xibo.org.uk/u/dan)
#### Post date: [August 7, 2023, 6:55pm UTC](https://community.xibo.org.uk/t/api-wrong-displaygroupid/29647/5 "2023-08-07T18:55:07Z")

</div>

I think it is already documented here: [Swagger UI](https://xibosignage.com/manual/api/#/display/displaySearch)
