Yealink Forums

Full Version: Device Manager API call for models
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
(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.
Reference URL's