API - Wrong displayGroupId

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

[
    {
        "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

[
    {
        "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
    }
]

I’ve only one displayGroup with id #3.

{{url}}/api/displaygroup

[
    {
        "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": ""
    }
]

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.

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

1 Like

I think it is already documented here: Swagger UI