Searching by display through the API

Should this work to get only a display named PROTO1?

https://abc.com/xibo18alpha/web/api/display?display=PROTO1&access_token=t7WvXHnnFrNLyWAgCiZUBhmqOOUzN6vC5wXOp0lR

The response returned appears to be every display(We only have two connected)

[
    {
        "displayId": 2,
        "isAuditing": "0",
        "display": "colins tablet",
        "description": null,
        "defaultLayoutId": 4,
        "license": "<REMOVED>",
        "licensed": "1",
        "loggedIn": "1",
        "lastAccessed": "1449118035",
        "incSchedule": "1",
        "emailAlert": "0",
        "alertTimeout": "0",
        "clientAddress": "10.0.1.128",
        "mediaInventoryStatus": "1",
        "macAddress": "A8:7C:01:A4:DE:38",
        "lastChanged": null,
        "numberOfMacAddressChanges": "0",
        "lastWakeOnLanCommandSent": null,
        "wakeOnLanEnabled": "0",
        "wakeOnLanTime": null,
        "broadCastAddress": null,
        "secureOn": null,
        "cidr": null,
        "latitude": null,
        "longitude": null,
        "versionInstructions": null,
        "clientType": "android",
        "clientVersion": "1.7",
        "clientCode": "57",
        "displayProfileId": 3,
        "currentLayoutId": 0,
        "screenShotRequested": "0",
        "storageAvailableSpace": "2147483647",
        "storageTotalSpace": "2147483647",
        "displayGroupId": 2,
        "currentLayout": null,
        "defaultLayout": "TEST2",
        "displayGroups": [],
        "xmrChannel": null,
        "xmrPubKey": null,
        "lastCommandSuccess": "2",
        "buttons": []
    },
    {
        "displayId": 1,
        "isAuditing": "0",
        "display": "PROTO1",
        "description": null,
        "defaultLayoutId": 3,
        "license": "<REMOVED>",
        "licensed": "1",
        "loggedIn": 1,
        "lastAccessed": "1449117918",
        "incSchedule": "0",
        "emailAlert": "0",
        "alertTimeout": "0",
        "clientAddress": "10.0.1.114",
        "mediaInventoryStatus": "1",
        "macAddress": "6c:fa:a7:5a:ac:7a",
        "lastChanged": null,
        "numberOfMacAddressChanges": "0",
        "lastWakeOnLanCommandSent": null,
        "wakeOnLanEnabled": "0",
        "wakeOnLanTime": null,
        "broadCastAddress": null,
        "secureOn": null,
        "cidr": null,
        "latitude": null,
        "longitude": null,
        "versionInstructions": null,
        "clientType": "android",
        "clientVersion": "1.7",
        "clientCode": "57",
        "displayProfileId": 0,
        "currentLayoutId": 0,
        "screenShotRequested": "0",
        "storageAvailableSpace": "2147483647",
        "storageTotalSpace": "2147483647",
        "displayGroupId": 1,
        "currentLayout": null,
        "defaultLayout": "TEST",
        "displayGroups": [],
        "xmrChannel": null,
        "xmrPubKey": null,
        "lastCommandSuccess": "2",
        "buttons": []
    }
]

If you are using the latest develop code, then yes that should do partial matching on displays with proto1 in their name - i.e. not colins tablet.

This was fixed quite recently due to a bug you reported (all routes should now support their ID/Name parameter - where name is the object name). The swagger.json has been updated accordingly.

Might I take the time to recommend getting Postman from the Chrome Store? It is free for basic functionality and would allow you to test these calls outside your API application.

Dan,

We have reloaded everything again using the latest code as of yesterday. (Still can’t get zmq installed correctly for whatever reason, but that is another topic :grinning:)

Postman is installed and configured. We attempted to search for a display named “PROTO1”. Again in postman we get every display returned. Could this problem somehow be related to running on Windows? Or am I still just completely missing something?

Update: If we use displayId it does return only the matching screen,

Not working: macAddress, display

Don’t know if working because all displays have matching params: clientVersion, displayGroupId

I’ve just twigged what the problem is - obvious once you realise!

There is a simple patch in the commit attached to that issue which should start things working for you… although please be aware that your postman screenshot shows that you’ve entered the param in the “header” when it should go in URL params.

Thank you Dan for the code update. We will try that out and let you know soon how that works for us.

Postman - Yes I did figure out shortly after I posted that the screen shot was not quite right.

Display searches via the API appear to be working now. Thank you Dan.

1 Like

This topic was automatically closed 21 hours after the last reply. New replies are no longer allowed.