Yealink Forums
Device Manager API call for models - Printable Version

+- Yealink Forums (http://forum.yealink.com/forum)
+-- Forum: IP Phone Series (/forumdisplay.php?fid=4)
+--- Forum: Yealink Device Management Platform (/forumdisplay.php?fid=61)
+--- Thread: Device Manager API call for models (/showthread.php?tid=43296)



Device Manager API call for models - jangliss - 10-16-2019 08:49 PM

I'm not sure if this is the right area as I didn't find anything specifically on APIs with Device Manager.

When querying Device Manager for the list of models (api/open/v1/manager/model/getList), I am not getting back any results. Per the API documentation, it says we can also supply a optional filter (Boolean) to show only models of devices we already have in Device Manager, or all devices.

Regardless of if I call the API as any of the following the results are the same:
  • api/open/v1/manager/model/getList
  • api/open/v1/manager/model/getList?filter=true
  • api/open/v1/manager/model/getList?filter=false
  • api/open/v1/manager/model/getList?filter=1
  • api/open/v1/manager/model/getList?filter=0

The results I end up with are always

Code:
{
    "ret": 0,
    "data": [],
    "error": null
}

I don't get any errors, or signature issues, just no data. What am I missing?


RE: Device Manager API call for models - jangliss - 10-17-2019 08:23 PM

(10-16-2019 08:49 PM)jangliss Wrote:  I'm not sure if this is the right area as I didn't find anything specifically on APIs with Device Manager.

=====8<--------------------------------------------------------

I don't get any errors, or signature issues, just no data. What am I missing?

I've identified the cause of the issue. Bad documentation. The API Documentation that is referenced on the System Management > API page says that "getList" for models is a GET request. However the request is supposed to be a POST, and has additional requirements. I identified this by performing a network monitor when adding a device. The body of the POST request should look something like:

Code:
{"clientTypes":["sip"],"filter":true}

Documentation should be updated.